首次上传

This commit is contained in:
hanqiangqiang
2026-06-15 10:56:30 +08:00
commit b0213b94d6
4160 changed files with 736101 additions and 0 deletions
@@ -0,0 +1,38 @@
using System.ComponentModel;
using OpenSEMI.ClientBase;
namespace MECF.Framework.UI.Client.ClientBase
{
public abstract class ValidatorBase
: IDataErrorInfo
{
private DataErrorInfo<ValidatorBase> DataErrorValidator;
#region Implementation of IDataErrorInfo
public string this[string propertyName]
{
get { return GetDataErrorInfo()[propertyName]; }
}
public string Error
{
get { return GetDataErrorInfo().Error; }
}
#endregion
public bool IsValid
{
get { return string.IsNullOrEmpty(Error); }
}
private DataErrorInfo<ValidatorBase> GetDataErrorInfo()
{
if (DataErrorValidator != null) return DataErrorValidator;
DataErrorValidator = new DataErrorInfo<ValidatorBase>(this);
return DataErrorValidator;
}
}
}