Example #1
0
 public void OnEdit()
 {
     if (comp.Identification == 0)
     {
         int hashcode = comp.GetHashCode();
         comp.Identification = hashcode;
         TypeDescriptor.GetProperties(typeof(WebControlDescription))["Identification"].SetValue(comp, hashcode);
     }
     if (!string.IsNullOrEmpty(comp.DataBase))
     {
         ControlDescriptionEditorDialog form = new ControlDescriptionEditorDialog(comp);
         form.ShowDialog();
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("the property of webcontroldescription hasn't be set correctly");
     }
 }
Example #2
0
 public void OnEdit(object sender, EventArgs e)
 {
     if ((this.Component as WebControlDescription).Identification == 0)
     {
         int hashcode = this.Component.GetHashCode();
         (this.Component as WebControlDescription).Identification = hashcode;
         TypeDescriptor.GetProperties(typeof(WebControlDescription))["Identification"].SetValue(this.Component, hashcode);
     }
     if (!string.IsNullOrEmpty((this.Component as WebControlDescription).DataBase))
     {
         ControlDescriptionEditorDialog form = new ControlDescriptionEditorDialog(this.Component);
         form.ShowDialog();
     }
     else
     {
         System.Windows.Forms.MessageBox.Show("the property of webcontroldescription hasn't be set correctly");
     }
 }
Example #3
0
 public override void DoDefaultAction()
 {
     if (!string.IsNullOrEmpty((this.Component as ControlDescription).DataBase))
     {
         ControlDescriptionEditorDialog form = new ControlDescriptionEditorDialog(this.Component);
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("the property of controldescription hasn't be set correctly");
     }
 }