private void mi_delete(object sender, EventArgs e) { EventPath ep = this.Parent as EventPath; if (ep != null) { ClassPointer root = ep.Panes.Loader.GetRootId(); root.AskDeleteMethod(_method, this.FindForm()); } }
private void mi_removeAction(object sender, EventArgs e) { MenuItem mi = sender as MenuItem; if (mi != null) { ClassPointer root = _panes.Loader.GetRootId(); IAction act = mi.Tag as IAction; if (act != null) { root.AskDeleteAction(act, this.FindForm()); } else { TaskID tid = mi.Tag as TaskID; if (tid != null) { HandlerMethodID hid = tid as HandlerMethodID; if (hid != null) { root.AskDeleteMethod(hid.HandlerMethod, this.FindForm()); } else { if (tid.Action == null) { tid.LoadActionInstance(root); } if (tid.Action != null) { root.AskDeleteAction(tid.Action, this.FindForm()); } } } } } }