상속: System.EventArgs
예제 #1
0
 void HandleEvents123(object sender, MyEventInfo eventInfo)
 {
     switch (eventInfo.Event)
     {
         case MyEvents.Event_1: { break; }
         case MyEvents.Event_2: { break; }
         case MyEvents.Event_3: { break; }
     }
 }
예제 #2
0
    public void DispatchEvent(MyEvents gridEvent)
    {
        System.EventHandler<MyEventInfo> eventToDispatch = null;
        switch (gridEvent)
        {
            case MyEvents.Event_1: { eventToDispatch = Event_1; break; }
            case MyEvents.Event_2: { eventToDispatch = Event_2; break; }
            case MyEvents.Event_3: { eventToDispatch = Event_3; break; }
            case MyEvents.Event_4: { eventToDispatch = Event_4; break; }
            case MyEvents.Event_5: { eventToDispatch = Event_5; break; }
        }

        if (eventToDispatch == null) return;

        var eventInfo = new MyEventInfo() { Event = gridEvent };
        eventToDispatch(this, eventInfo);
    }
예제 #3
0
        internal MetaClass FindMember(string xmlMemberId)
        {
            char memberType = xmlMemberId[0];

            xmlMemberId = xmlMemberId.Substring(2);

            switch (memberType)
            {
            case 'T':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyClassInfo myClassInfo = myAssemblyInfo.FindNamespaceMember(xmlMemberId);

                    if (myClassInfo != null)
                    {
                        return(myClassInfo);
                    }
                }

                break;
            }

            case 'M':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyInvokableMemberInfo myInvokableMemberInfo = myAssemblyInfo.FindMethodOrConstructor(xmlMemberId, true);

                    if (myInvokableMemberInfo != null)
                    {
                        return(myInvokableMemberInfo);
                    }
                }

                break;
            }

            case 'F':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyFieldInfo myFieldInfo = myAssemblyInfo.FindField(xmlMemberId, true);

                    if (myFieldInfo != null)
                    {
                        return(myFieldInfo);
                    }
                }

                break;
            }

            case 'P':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyPropertyInfo myPropertyInfo = myAssemblyInfo.FindProperty(xmlMemberId, true);

                    if (myPropertyInfo != null)
                    {
                        return(myPropertyInfo);
                    }
                }

                break;
            }

            case 'E':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyEventInfo myEventInfo = myAssemblyInfo.FindEvent(xmlMemberId, true);

                    if (myEventInfo != null)
                    {
                        return(myEventInfo);
                    }
                }

                break;
            }

            case 'N':
            {
                foreach (MyAssemblyInfo myAssemblyInfo in assemblies.Values)
                {
                    MyNamespaceInfo myNamespaceInfo = myAssemblyInfo.FindNamespace(xmlMemberId);

                    if (myNamespaceInfo != null)
                    {
                        return(myNamespaceInfo);
                    }
                }

                break;
            }
            }

            return(null);
        }
 void HandleEvent5(object sender, MyEventInfo eventInfo)
 {
 }
예제 #5
0
 void CellCallback(EventTableviewCell cell, MyEventInfo info)
 {
     m_tableView.NotifyCellDimensionsChanged(info.index);
 }
예제 #6
0
    void HandleEvent5(object sender, MyEventInfo eventInfo)
    {

    }
예제 #7
0
        /// <summary>
        /// 递归绑定事件
        /// </summary>
        /// <param name="treeList"></param>
        /// <param name="treeNode"></param>
        /// <param name="eventInfo"></param>
        /// <param name="eventInfoList"></param>
        private void LoadEventInfoTreeNode(DevExpress.XtraTreeList.TreeList treeList, TreeListNode treeNode, MyEventInfo eventInfo, List <MyEventInfo> eventInfoList)
        {
            int    grade    = eventInfo.EVENTINFO_GRADE;
            string parentid = eventInfo.EVENTINFO_ID;

            foreach (MyEventInfo item in eventInfoList)
            {
                if (item.EVENTINFO_PARENTID == parentid && item.EVENTINFO_GRADE - grade == 1)
                {
                    TreeListNode typeNode = treeList.AppendNode(new Object[] { item.EVENTINFO_ID, item.EVENTINFO_CODE, item.EVENTINFO_NAME, item.EVENTINFO_PARENTID, item.EVENTINFO_IFDETAIL, item.EVENTINFO_GRADE, item.EVENTINFO_IFINVALID, item.EVENTINFO_NOTE, item.EVENTINFO_CREATETIME, item.EVENTINFO_LASTMODIFIEDTIME, item.EVENTINFO_MODIFICATIONTIMES }, treeNode);
                    typeNode.StateImageIndex = 0;
                    //递归绑定子事件
                    LoadEventInfoTreeNode(treeList, typeNode, item, eventInfoList);
                }
            }
        }