Ejemplo n.º 1
0
    private void OpenHomeViews()
    {
        HomeGCManager.Instance.DoClearToHome();
        base.OpenViews();
        CtrlManager.OpenWindow(WindowID.MainBg, null);
        CtrlManager.OpenWindow(WindowID.MenuView, null);
        CtrlManager.OpenWindow(WindowID.MenuBottomBarView, null);
        CtrlManager.OpenWindow(WindowID.MenuTopBarView, null);
        if (LevelManager.CurBattleType != 0)
        {
            if (LevelManager.CurBattleType == 6)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                CtrlManager.OpenWindow(WindowID.CardView, null);
            }
            else if (LevelManager.CurBattleType == 9)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                CtrlManager.OpenWindow(WindowID.XLDView, null);
            }
            else if (LevelManager.Instance.IsZyBattleType || LevelManager.CurBattleType == 2)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                if (LevelManager.Instance.IsServerZyBattleType)
                {
                    Singleton <PveManager> .Instance.ResetState();

                    PvpManager.ResetState();
                }
            }
            else if (LevelManager.Instance.IsPvpBattleType)
            {
                if (!Singleton <PvpManager> .Instance.IsObserver)
                {
                    CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                }
                PvpManager.ResetState();
            }
            else if (LevelManager.CurBattleType != 11)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
            }
        }
        PvpLevelStorage.CheckFightAgain();
    }
    private void OpenHomeViews()
    {
        HomeGCManager.Instance.DoClearToHome();
        base.OpenViews();
        CtrlManager.CloseWindow(WindowID.BgView);
        CtrlManager.OpenWindow(WindowID.MainBg, null);
        CtrlManager.OpenWindow(WindowID.MenuView, null);
        CtrlManager.OpenWindow(WindowID.MenuBottomBarView, null);
        CtrlManager.OpenWindow(WindowID.MenuTopBarView, null);
        if (LevelManager.CurBattleType != 0)
        {
            if (LevelManager.CurBattleType == 6)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                CtrlManager.OpenWindow(WindowID.CardView, null);
            }
            else if (LevelManager.CurBattleType == 9)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                CtrlManager.OpenWindow(WindowID.XLDView, null);
            }
            else if (LevelManager.Instance.IsZyBattleType || LevelManager.CurBattleType == 2)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                if (LevelManager.Instance.IsServerZyBattleType)
                {
                    Singleton <PveManager> .Instance.ResetState();

                    PvpManager.ResetState();
                }
            }
            else if (LevelManager.Instance.IsPvpBattleType)
            {
                if (!Singleton <PvpManager> .Instance.IsObserver)
                {
                    CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
                }
                PvpManager.ResetState();
            }
            else if (LevelManager.CurBattleType != 11)
            {
                CtrlManager.OpenWindow(WindowID.ArenaModeView, null);
            }
        }
        PvpLevelStorage.CheckFightAgain();
        TimeSpan t        = ModelManager.Instance.Get_loginTime_diff_X();
        DateTime d        = ModelManager.Instance.Get_loginTime_DataTime();
        DateTime dateTime = d + t;
        bool     flag     = true;

        if (dateTime.Day == d.Day)
        {
            int isPass = ModelManager.Instance.Get_GetSignDay_X().isPass;
            if (isPass == 1)
            {
                CtrlManager.OpenWindow(WindowID.SignView, null);
                flag = false;
            }
        }
        else
        {
            Singleton <MenuView> .Instance.SetNews(6, "0");
        }
        if (flag)
        {
            this.OpenActivityView();
        }
        else
        {
            MobaMessageManager.RegistMessage(ClientV2C.signView_close, new MobaMessageFunc(this.OnMsg_OnSignViewClose));
        }
        Singleton <MenuView> .Instance.OpenSummonerRegisterView();
    }