Exemple #1
0
        public DialogResult ShowAddDialog(object newObject, QValidateHandler handler)
        {
            forAdd       = true;
            this.handler = handler;
            this.newObj  = newObject;
            propertyGridControl1.SelectedObject = this.newObj;
            DialogResult result = this.ShowDialog();

            return(result);
        }
Exemple #2
0
 public DialogResult ShowEditDialog(object obj, QValidateHandler handler)
 {
     forAdd = false;
     if (obj is ICloneable)
     {
         this.handler = handler;
         this.obj     = obj;
         this.newObj  = ((ICloneable)obj).Clone();
         propertyGridControl1.SelectedObject = NewObj;
         DialogResult result = this.ShowDialog();
         return(result);
     }
     else
     {
         throw new Exception("Only ICloneable objects are supported.");
     }
 }