public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if (context != null && context.Instance != null && provider != null) { IWindowsFormsEditorService edSvc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService)); if (edSvc != null) { ActionAttachEvent aae = context.Instance as ActionAttachEvent; if (aae != null) { ClassPointer root = aae.Class; if (root != null) { ILimnorDesignerLoader loader = root.GetCurrentLoader(); if (loader != null) { EventHandlerMethod ehm = aae.GetHandlerMethod(); if (ehm != null) { DlgMethod dlg = ehm.GetEditDialog(Rectangle.Empty, loader); dlg.DisableAnimate(); if (edSvc.ShowDialog(dlg) == System.Windows.Forms.DialogResult.OK) { ehm.OnFinishEdit(aae.ActionId, loader); } } } } } } } return(value); }
public bool IsSameObjectRef(IObjectIdentity objectIdentity) { ActionAttachEvent aa = objectIdentity as ActionAttachEvent; if (aa != null) { return(this.ActionId == aa.ActionId); } return(false); }
public IAction CreateNewCopy() { ActionAttachEvent aa = new ActionAttachEvent(_class); if (_eventAction != null) { aa._eventAction = _eventAction; } return(aa); }
public bool IsSameMethod(IAction act) { ActionAttachEvent aa = act as ActionAttachEvent; if (aa != null) { return(aa.ActionId == this.ActionId); } return(false); }
protected override void loadEventAction() { if (AssignedActions0 == null) { if (_attachedActionId != 0) { ActionAttachEvent aae = Class.GetActionInstance(_attachedActionId) as ActionAttachEvent; if (aae != null) { SetHandlerOwner(aae.AssignedActions); } } } }