Beispiel #1
0
        public DlgMethod GetEditDialog(Rectangle rcStart, ILimnorDesignerLoader loader)
        {
            if (Owner == null)
            {
                MathNode.Log(loader.DesignPane.Window as Form, new DesignerException("Calling EventHandlerMethod.Edit with null method owner"));
            }
            if (this.Owner == null)
            {
                this.Owner = loader.GetRootId();
            }
            DlgMethod dlg = this.CreateMethodEditor(rcStart);

            if (Parameters != null && Parameters.Count > 0)
            {
                if (typeof(object).Equals(Parameters[0].ObjectType) && string.CompareOrdinal(Parameters[0].Name, "sender") == 0)
                {
                    Parameters[0]          = new ParameterClass(this.Event.Owner.ObjectType, "sender", this);
                    Parameters[0].ReadOnly = true;
                }
                if (Parameters.Count > 1)
                {
                    if (typeof(EventArgs).Equals(Parameters[1].ObjectType) && string.CompareOrdinal(Parameters[1].Name, "e") == 0)
                    {
                        ICustomEventMethodDescriptor ce = this.Event.Owner.ObjectInstance as ICustomEventMethodDescriptor;
                        if (ce != null)
                        {
                            Type pType = ce.GetEventArgumentType(this.Event.Name);
                            if (pType != null)
                            {
                                Parameters[1]          = new ParameterClass(pType, "e", this);
                                Parameters[1].ReadOnly = true;
                            }
                        }
                    }
                }
            }
            dlg.LoadMethod(this, EnumParameterEditType.ReadOnly);
            return(dlg);
        }
 public void OnEventListChanged(ICustomEventMethodDescriptor owner, UInt32 objectId)
 {
     _objExplorer.OnEventListChanged(owner, objectId);
 }
Beispiel #3
0
 public void OnEventListChanged(ICustomEventMethodDescriptor owner, UInt32 objectId)
 {
 }