private void mi_createEventFireMethod(object sender, EventArgs e) { EventPath ep = this.Parent as EventPath; if (ep != null) { ClassPointer root = ep.Panes.Loader.GetRootId(); EventClass ec = this.CustomEvent; if (ec.ClassId == root.ClassId) { root.CreateFireEventAction(ec, ep.Panes.Loader.Writer, null, ep.FindForm()); } } }
void mnu_remove(object sender, EventArgs e) { EventPath ep = this.Parent as EventPath; if (ep != null) { ClassPointer root = ep.Panes.Loader.GetRootId(); PropertyOverride po = Property as PropertyOverride; if (po == null) { throw new DesignerException("Overriden property is not found. [{0}]", Property); } if (MessageBox.Show(ep.FindForm(), "Do you want to remove the override of this property?", "Property", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes) { root.DeleteProperty(po); } } }