Beispiel #1
0
 public void BeginEdit()
 {
     if (inEdit)
     {
         return;
     }
     inEdit     = true;
     backupCopy = this.MemberwiseClone() as mymember;
 }
Beispiel #2
0
 public void EndEdit()
 {
     if (!inEdit)
     {
         return;
     }
     inEdit     = false;
     backupCopy = null;
 }
Beispiel #3
0
        public override ValidationResult Validate(object value,
                                                  System.Globalization.CultureInfo cultureInfo)
        {
            mymember item = (value as BindingGroup).Items[0] as mymember;

            if (item.weight > 500)
            {
                return(new ValidationResult(false,
                                            "weight is too high"));
            }
            else if (item.weight > 50)
            {
                return(new ValidationResult(false,
                                            "weight is too low"));
            }
            else
            {
                return(ValidationResult.ValidResult);
            }
        }