コード例 #1
0
 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);
 }
コード例 #2
0
        public bool IsSameObjectRef(IObjectIdentity objectIdentity)
        {
            ActionAttachEvent aa = objectIdentity as ActionAttachEvent;

            if (aa != null)
            {
                return(this.ActionId == aa.ActionId);
            }
            return(false);
        }
コード例 #3
0
        public IAction CreateNewCopy()
        {
            ActionAttachEvent aa = new ActionAttachEvent(_class);

            if (_eventAction != null)
            {
                aa._eventAction = _eventAction;
            }
            return(aa);
        }
コード例 #4
0
        public bool IsSameMethod(IAction act)
        {
            ActionAttachEvent aa = act as ActionAttachEvent;

            if (aa != null)
            {
                return(aa.ActionId == this.ActionId);
            }
            return(false);
        }
コード例 #5
0
 protected override void loadEventAction()
 {
     if (AssignedActions0 == null)
     {
         if (_attachedActionId != 0)
         {
             ActionAttachEvent aae = Class.GetActionInstance(_attachedActionId) as ActionAttachEvent;
             if (aae != null)
             {
                 SetHandlerOwner(aae.AssignedActions);
             }
         }
     }
 }