コード例 #1
0
ファイル: MailBoxWnd.cs プロジェクト: zwong91/Titan
        // 接受消息
        public override void OnMessage(WndMsgID msgID, UIMsgData msgData)
        {
            UIMsgCmdData data = msgData as UIMsgCmdData;

            switch (msgID)
            {
            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_LEAVE:
            {
                SetVisible(false);
            }
            break;

            case WndMsgID.WND_MSG_MAILBOX_OPEN:
            {
                UpdateMailBox();
            }
            break;

            case WndMsgID.WND_MSG_COMMON_LOGINMOBA:
            {
                this.UnloadView();
            }
            break;

            // WND_MAIL
            case WndMsgID.WND_MSG_MAIL_REQUESTMAILBASELIST:
            case WndMsgID.WND_MSG_MAIL_DETAILINFO:
            case WndMsgID.WND_MSG_MAIL_REQFASTRECVPLUS:
            case WndMsgID.WND_MSG_MAIL_RECVPLUSSUCCESS:
            {
                IUISubWnd mailWnd = GetSubWnd(MailBoxSubWndType.WND_MAIL);
                if (mailWnd != null)
                {
                    mailWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #2
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_LEAVE:
            {
            }
            break;

            case WndMsgID.WND_MSG_REFRESHCHARTRANKINGDATA:
            {
                if (m_wndView != null)
                {
                    UChartRankingMsgData msgData = data as UChartRankingMsgData;
                    m_wndView.RefreshRanking(msgData.nRanking, msgData.bShow);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTROLERANKDATA:
            case WndMsgID.WND_MSG_RECVREQUESTKILLRANKDATA:
            {
                IUISubWnd roleChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_ROLE);
                if (roleChartWnd != null)
                {
                    roleChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUEST_KING_OF_HERO_CHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTHERORANKDATA:
            case WndMsgID.WND_MSG_RECVREQUESTHEROTYPECHARTDATA:
            {
                IUISubWnd heroChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_HERO);
                if (heroChartWnd != null)
                {
                    heroChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTCLANCHARTDATA:
            {
                IUISubWnd clanChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_CLAN);
                if (clanChartWnd != null)
                {
                    clanChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTKINCHARTDATA:
            {
                IUISubWnd kinChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_KIN);
                if (kinChartWnd != null)
                {
                    kinChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTCURWEEKMASTERCHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTCURWEEKPRENTICECHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTLASTWEEKMASTERCHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTLASTWEEKPRENTICECHARTDATA:
            {
                IUISubWnd kinChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_MENTEROSHIP);
                if (kinChartWnd != null)
                {
                    kinChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTDONATECHARTDATA:
            {
                IUISubWnd donateChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_DONATIONCARD);
                if (donateChartWnd != null)
                {
                    donateChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUESTHEROCOUNTCHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTSKINCHARTDATA:
            case WndMsgID.WND_MSG_RECVREQUESTGEMSTONECHARTDATA:
            {
                IUISubWnd donateChartWnd = GetSubWnd(EMChartSubWndType.EMWNDTYPE_COLLECTION);
                if (donateChartWnd != null)
                {
                    donateChartWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RECVREQUSETSEARCHDATA:
            {
                foreach (IUISubWnd wnd in m_SubWndList)
                {
                    wnd.OnMessage(msgID, data);
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #3
0
ファイル: ClanDetailWnd.cs プロジェクト: zwong91/Titan
        // 接受消息
        public override void OnMessage(WndMsgID msgID, UIMsgData msgData)
        {
            UIMsgCmdData data = msgData as UIMsgCmdData;

            switch (msgID)
            {
            case WndMsgID.WND_MSG_CLAN_UPDATEMEMBER:
            {
                IUISubWnd clanMemberWnd = GetSubWnd(ClanListFrameWndType.WND_CLAN_MEMBER);
                if (clanMemberWnd != null)
                {
                    clanMemberWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_UPDATE_REQUESTCARDTIP:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnUpdateRequestcardTip();
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_BASEDATA:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnUpdateClanBaseData();
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_APPLY_MEMBER_TIP:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnUpdateAcceptMemberTip();
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_REQUESTCARD:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnGroupClanDonateBtnClick(true);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_REQUEST_CARDLIST:
            case WndMsgID.WND_MSG_CLAN_REQUEST_CARDLIST_INFO:
            case WndMsgID.WND_MSG_CLAN_UPDATE_CARDLIST:
            case WndMsgID.WND_MSG_CLAN_UPDATE_DONATELOG:
            {
                IUISubWnd clanDonateWnd = GetSubWnd(ClanListFrameWndType.WND_CLAN_DONATE);
                if (clanDonateWnd != null)
                {
                    clanDonateWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_RECV_EVENTLIST:
            {
                IUISubWnd clanEventWnd = GetSubWnd(ClanListFrameWndType.WND_CLAN_EVENT);
                if (clanEventWnd != null)
                {
                    clanEventWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_STATE_NOTICE:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnClanStateChange();
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #4
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_PLAYERBUTTONFRAME_OPENFRAME:
            {
                //UISystem.Instance.ShowWnd(WndID.WND_ID_SOCIALCONTACT, false);
                //UISystem.Instance.ShowWnd(WndID.WND_ID_CHART, false);
                SetVisible(true);

                if (m_wndView != null)
                {
                    OnMsgOpenFrame(data);
                }
            }
            break;

            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_ENTER:
            {
                LoadView();
            }
            break;

            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_LEAVE:
            {
                //SetVisible(false);
                UnloadView();
            }
            break;

            case WndMsgID.WND_MSG_PLAYERINFO_INITINFO:
            {
                IUISubWnd playerInfoWnd = GetSubWnd(PlayerSubWndType.WND_PLAYER);
                if (playerInfoWnd != null)
                {
                    playerInfoWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_PLAYERWARSTATISTIC_UPDATEWAR:
            case WndMsgID.WND_MSG_PLAYERWARSTATISTIC_VIEWSINGLEWAR:
            {
                IUISubWnd playerWarWnd = GetSubWnd(PlayerSubWndType.WND_WAR);
                if (playerWarWnd != null)
                {
                    playerWarWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_HEROPREVIEWFRAME_GETHEROINFO:
            case WndMsgID.WND_MSG_HERODETAIL_UPDATEGOLD:
            {
                IUISubWnd playerHeroWnd = GetSubWnd(PlayerSubWndType.WND_HERO);
                if (playerHeroWnd != null)
                {
                    playerHeroWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_RUNEPAGE_INITRUNEDATA:
            case WndMsgID.WND_MSG_RUNEPAGE_INITOTHERRUNEDATA:
            case WndMsgID.WND_MSG_RUNEPAGE_PUTRUNE:
            case WndMsgID.WND_MSG_RUNEPAGE_CHANGEPAGE:
            case WndMsgID.WND_MSG_WAR_MAIN_OPEN:
            {
                IUISubWnd playerRuneWnd = GetSubWnd(PlayerSubWndType.WND_RUNE);
                if (playerRuneWnd != null)
                {
                    playerRuneWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_PLAYERWARSTATISTIC_UPDATETOTAL:
            {
                IUISubWnd playerInfoWnd = GetSubWnd(PlayerSubWndType.WND_PLAYER);
                if (playerInfoWnd != null)
                {
                    playerInfoWnd.OnMessage(msgID, data);
                }

                IUISubWnd playerWarWnd = GetSubWnd(PlayerSubWndType.WND_WAR);
                if (playerWarWnd != null)
                {
                    playerWarWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_PLAYERWARSTATISTIC_VIEWACTORWAR:
            {
                IUISubWnd playerWarWnd = GetSubWnd(PlayerSubWndType.WND_WAR);
                if (playerWarWnd != null)
                {
                    playerWarWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_PLAYERINFO_REANMERESULT:
            {
                IUISubWnd playerInfoWnd = GetSubWnd(PlayerSubWndType.WND_PLAYER);
                if (playerInfoWnd != null)
                {
                    playerInfoWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_CROWNPAGE_UPDATEVIEW:
            case WndMsgID.WND_MSG_CROWNPAGE_OTHERUPDATEVIEW:
            case WndMsgID.WND_MSG_CROWNPAGE_OTHERPAGESINGLESHOW:
            case WndMsgID.WND_MSG_CROWNPAGE_SELFPAGESINGLESHOW:
            case WndMsgID.WND_MSG_CROWNPAGE_APPRAISALRET:
            case WndMsgID.WND_MSG_CROWNPAGE_ACTIVEGEMMODEL:
            {
                //IUISubWnd crownInfoWnd = GetSubWnd(PlayerSubWndType.WND_CROWN);
                IUIWnd crownInfoWnd = GetSubUIWnd(PlayerSubWndType.WND_CROWN);
                if (crownInfoWnd != null)
                {
                    crownInfoWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_OPEN_SOCIALSHARE_FRAME:
            case WndMsgID.WND_MSG_OPEN_GLORYMOMENT_VIDEO_FRAME:
            case WndMsgID.WND_MSG_OPEN_GLORYMOMENT_WARDATA:
            {
                if (m_wndView != null && m_wndView.GetCurSubWnd() != PlayerSubWndType.WND_MOMENT)
                {
                    if (EntityFactory.MainHeroView != null)
                    {
                        UIButtonType ButtonType = new UIButtonType((int)PlayerSubWndType.WND_MOMENT);
                        ButtonType.bIsRequestSelf = true;
                        ButtonType.nRequestPDBID  = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
                        OnMsgOpenFrame(ButtonType);
                    }
                }

                IUISubWnd playerMomentWnd = GetSubWnd(PlayerSubWndType.WND_MOMENT);
                if (playerMomentWnd != null)
                {
                    playerMomentWnd.OnMessage(msgID, data);
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #5
0
ファイル: SocialWnd.cs プロジェクト: zwong91/Titan
        // 接受消息
        public override void OnMessage(WndMsgID msgID, UIMsgData msgData)
        {
            UIMsgCmdData data = msgData as UIMsgCmdData;

            switch (msgID)
            {
            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_LEAVE:
            {
                SetVisible(false);
            }
            break;

            case WndMsgID.WND_MSG_SOCIALCONTACT_OPEN:
            {
                // 隐藏其他同级窗体
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_PLAYERFRAME_CLOSE, null);
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_HIGHLADDER_CLOSE, null);
                //UISystem.Instance.ShowWnd(WndID.WND_ID_CHART, false);

                SetVisible(true);
                if (m_wndView == null)
                {
                    Debug.LogWarning("open socialwnd failed.");
                    return;
                }

                if (EntityFactory.MainHeroView != null)
                {
                    if (msgData != null)
                    {
                        UIMsgCmdData cmdData = (UIMsgCmdData)msgData;
                        m_wndView.SetButtonSelect(cmdData.nParam);
                    }
                    else
                    {
                        if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_CLAN) > 0)
                        {
                            // 打开帮会页面
                            if (m_subWndList[(int)SocialSubWndType.WND_CLANDETAIL] != null && m_subWndList[(int)SocialSubWndType.WND_CLANDETAIL].IsVisible())
                            {
                                m_subWndList[(int)SocialSubWndType.WND_CLANDETAIL].SetVisible(true);
                            }
                            else
                            {
                                m_wndView.SetButtonSelect((int)SocialFrameButtonType.BTN_CLAN);
                            }
                        }
                        else
                        {
                            // 打开战队页面
                            m_wndView.SetButtonSelect((int)SocialFrameButtonType.BTN_KIN);
                            SwitchWndPage(SocialFrameButtonType.BTN_KIN);
                        }
                    }
                }
            }
            break;

            case WndMsgID.WND_MSG_SOCIALTOPSIDEBUTTON_OPEN:
            {
                // 隐藏其他同级窗体
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_PLAYERFRAME_CLOSE, null);
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_HIGHLADDER_CLOSE, null);
                //UISystem.Instance.ShowWnd(WndID.WND_ID_CHART, false);

                SetVisible(true);

                UIButtonType ButtonType = (UIButtonType)msgData;
                m_wndView.SetButtonSelect(ButtonType.nType);
            }
            break;

            case WndMsgID.WND_MSG_SOCIALCONTACT_REFRESH:
            {
                SwitchWndPage(m_curShowPageType);
            }
            break;

            case WndMsgID.WND_MSG_COMMON_LOGINMOBA:
            {
                this.UnloadView();
            }
            break;

            // WND_KIN
            case WndMsgID.WND_MSG_KIN_SHOWKINLIST:
            {
                ShowSubWnd(SocialSubWndType.WND_KIN);
            }
            break;

            case WndMsgID.WND_MSG_KIN_REQUESTKINLIST:
            case WndMsgID.WND_MSG_KIN_UPDATEKINLIST:
            {
                IUISubWnd kinWnd = GetSubWnd(SocialSubWndType.WND_KIN);
                if (kinWnd != null)
                {
                    kinWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            // WND_KINMEMBER
            case WndMsgID.WND_MSG_KIN_UPDATEAPPLY_TIPS:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnUpdateKinApllyTip();
                }

                IUISubWnd kinMemberWnd = GetSubWnd(SocialSubWndType.WND_KINMEMBER);
                if (kinMemberWnd != null)
                {
                    kinMemberWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_KIN_CREATESUCCESS:
            case WndMsgID.WND_MSG_KIN_JOIN_SUCCESS:
            case WndMsgID.WND_MSG_KIN_RETURN_TO_SELFKIN:
            {
                ShowSubWnd(SocialSubWndType.WND_KINMEMBER);
            }
            break;

            case WndMsgID.WND_MSG_KIN_RECEV_KINBASEDATA:
            case WndMsgID.WND_MSG_KIN_RECEV_MEMBERLIST:
            case WndMsgID.WND_MSG_KIN_UPDATSELF:
            case WndMsgID.WND_MSG_KIN_STRING_PROP_UPDATE:
            case WndMsgID.WND_MSG_KIN_NUM_PROP_UPDATE:
            case WndMsgID.WND_MSG_KIN_UPDATEMEMBER:
            case WndMsgID.WND_MSG_KIN_RECV_EVENTLIST:
            case WndMsgID.WND_MSG_KIN_RECV_GLORYDATA:
            {
                IUISubWnd kinMemberWnd = GetSubWnd(SocialSubWndType.WND_KINMEMBER);
                if (kinMemberWnd != null)
                {
                    kinMemberWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            // WND_CLANLIST
            case WndMsgID.WND_MSG_CLAN_SHOWCLANLIST:
            {
                ShowSubWnd(SocialSubWndType.WND_CLANLIST);
            }
            break;

            case WndMsgID.WND_MSG_CLAN_REQUESTCLANLIST:
            case WndMsgID.WND_MSG_CLAN_CREATESUCCEED:
            case WndMsgID.WND_MSG_CLAN_APPLYRET:
            {
                IUISubWnd clanlistWnd = GetSubWnd(SocialSubWndType.WND_CLANLIST);
                if (clanlistWnd != null)
                {
                    clanlistWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_APPLY_MEMBER_TIP:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnUpdateClanRedTip();
                }

                IUISubWnd clanDetailWnd = GetSubWnd(SocialSubWndType.WND_CLANDETAIL);
                if (clanDetailWnd != null)
                {
                    clanDetailWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            // WND_CLANDETAIL
            case WndMsgID.WND_MSG_CLAN_BASEDATA:
            case WndMsgID.WND_MSG_CLAN_UPDATEMEMBER:
            case WndMsgID.WND_MSG_CLAN_UPDATE_REQUESTCARDTIP:
            case WndMsgID.WND_MSG_CLAN_STATE_NOTICE:
            // ClanDetailWnd->ClanDonateWnd
            case WndMsgID.WND_MSG_CLAN_REQUEST_CARDLIST:
            case WndMsgID.WND_MSG_CLAN_REQUEST_CARDLIST_INFO:
            case WndMsgID.WND_MSG_CLAN_UPDATE_CARDLIST:
            case WndMsgID.WND_MSG_CLAN_UPDATE_DONATELOG:
            // ClanDetailWnd->ClanEventWnd
            case WndMsgID.WND_MSG_CLAN_RECV_EVENTLIST:
            {
                IUISubWnd clanDetailWnd = GetSubWnd(SocialSubWndType.WND_CLANDETAIL);
                if (clanDetailWnd != null)
                {
                    clanDetailWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_CLAN_REQUESTCARD:
            {
                // 隐藏其他同级窗体
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_PLAYERFRAME_CLOSE, null);
                //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_HIGHLADDER_CLOSE, null);
                //UISystem.Instance.ShowWnd(WndID.WND_ID_CHART, false);

                SetVisible(true);

                if (EntityFactory.MainHeroView != null)
                {
                    if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_CLAN) > 0)
                    {
                        // 打开帮会页面
                        m_wndView.SetButtonSelect((int)SocialFrameButtonType.BTN_CLAN);
                    }
                    else
                    {
                        // 打开战队页面
                        m_wndView.SetButtonSelect((int)SocialFrameButtonType.BTN_KIN);
                    }
                }

                IUISubWnd clanDetailWnd = GetSubWnd(SocialSubWndType.WND_CLANDETAIL);
                if (clanDetailWnd != null)
                {
                    clanDetailWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEPERSONBASE:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERLIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEFPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEIPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_MASTERISSUELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_PRENTICEISSUELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERFPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERIPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_OPNESUBPAGE:
            {
                IUISubWnd mentorshipWnd = GetSubWnd(SocialSubWndType.WND_MENTORSHIP);
                if (mentorshipWnd != null)
                {
                    mentorshipWnd.OnMessage(msgID, msgData);
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #6
0
ファイル: MentorshipWnd.cs プロジェクト: zwong91/Titan
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEPERSONBASE:
            {
                IUISubWnd personWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_PERSON);
                if (personWnd != null)
                {
                    personWnd.OnMessage(msgID, data);
                }

                IUISubWnd masterIssueWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_MASTERISSUE);
                if (masterIssueWnd != null)
                {
                    masterIssueWnd.OnMessage(msgID, data);
                }

                IUISubWnd prenticeIssueWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_PRENTICEISSUE);
                if (prenticeIssueWnd != null)
                {
                    prenticeIssueWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERLIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEFPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEIPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERFPRENTICELIST:
            case WndMsgID.WND_MSG_MENTORSHIP_UPDATEMASTERIPRENTICELIST:
            {
                IUISubWnd personWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_PERSON);
                if (personWnd != null)
                {
                    personWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_MENTORSHIP_MASTERISSUELIST:
            {
                IUISubWnd masterIssueWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_MASTERISSUE);
                if (masterIssueWnd != null)
                {
                    masterIssueWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_MENTORSHIP_PRENTICEISSUELIST:
            {
                IUISubWnd prenticeIssueWnd = GetSubWnd(MentorshipSubWndType.WND_MENTORSHIP_PRENTICEISSUE);
                if (prenticeIssueWnd != null)
                {
                    prenticeIssueWnd.OnMessage(msgID, data);
                }
            }
            break;

            case WndMsgID.WND_MSG_MENTORSHIP_OPNESUBPAGE:
            {
                if (data != null)
                {
                    UIMsgCmdData cmdData = (UIMsgCmdData)data;
                    m_wndView.SetButtonSelect(cmdData.nParam);
                }
            }
            break;

            default:
                break;
            }
        }
コード例 #7
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_SYSTEMSETTING_SHOW:
            {
                if (StageManager.Instance.getCurrentState() == Stage_ManagerDef.EStage_State.ESS_LOGIN)
                {
                    QuitApplication();
                }
                else
                {
                    SetVisible(!IsVisible());
                }
            }
            break;

            //切页,分发消息到子页面
            case WndMsgID.WND_MSG_SYSTEMSETTING_SWITCH:
                foreach (IUISubWnd wnd in m_subWndList)
                {
                    wnd.OnMessage(msgID, data);
                }
                break;

            //保存按钮
            case WndMsgID.WND_MSG_SYSTEMSETTING_SAVE:
                foreach (IUISubWnd wnd in m_subWndList)
                {
                    wnd.OnMessage(msgID, data);
                }
                break;

            //重置按钮
            case WndMsgID.WND_MSG_SYSTEMSETTING_RESTORE:
                foreach (IUISubWnd wnd in m_subWndList)
                {
                    wnd.OnMessage(msgID, data);
                }
                break;

            case WndMsgID.WND_MSG_SYSTEMSETTING_QUITGAME:
            {
                QuitGame();
            }
            break;

            //接受图像设置数据,并应用到UI上
            case WndMsgID.WND_MSG_SYSTEMSETTING_APPLYVEDIOSETTING:
            {
                IUISubWnd vedioWnd = GetSubWnd(SystemSettingSubWndType.WND_VEDIO);
                if (vedioWnd != null)
                {
                    vedioWnd.OnMessage(msgID, data);
                }
            }
            break;

            //重置技能控制页面
            case WndMsgID.WND_MSG_SYSTEMCONTROLSETTING_RESTORE:
            {
                IUISubWnd controlWnd = GetSubWnd(SystemSettingSubWndType.WND_CONTROL_DEFAULT);
                if (controlWnd != null)
                {
                    controlWnd.OnMessage(msgID, data);
                }
            }
            break;

            //刷新技能控制页面
            case WndMsgID.WND_MSG_SYSTEMCONTROLSETTING_REFRESH:
            {
                IUISubWnd controlWnd = GetSubWnd(SystemSettingSubWndType.WND_CONTROL_DEFAULT);
                if (controlWnd != null)
                {
                    controlWnd.OnMessage(msgID, data);
                }
            }
            break;

            //载入窗口后,默认切换到控制页面
            case WndMsgID.WND_MSG_COMMON_LOGINSTATE_ENTER:
            {
                this.LoadView();
                SwitchWndPage(SystemSettingFrameButtonType.BTN_CONTROL);

                bInWar = false;
            }
            break;

            case WndMsgID.WND_MSG_COMMON_BATTLESTATE_ENTER:
            {
                bInWar = true;
                if (m_wndView != null)
                {
                    IUISubWnd sysChartWnd = GetSubWnd(SystemSettingSubWndType.WND_GAME);
                    if (sysChartWnd != null)
                    {
                        sysChartWnd.OnMessage(msgID, data);
                    }
                }
            }
            break;

            case WndMsgID.WND_MSG_COMMON_BATTLESTATE_LEAVE:
            {
                bInWar = false;
            }
            break;

            case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_ENTER:
            {
                if (m_wndView != null)
                {
                    IUISubWnd sysChartWnd = GetSubWnd(SystemSettingSubWndType.WND_GAME);
                    if (sysChartWnd != null)
                    {
                        sysChartWnd.OnMessage(msgID, data);
                    }
                }
            }
            break;

            default:
                break;
            }
        }