Exemple #1
0
        public static void CheckItemClick(SystemMenuIds id)
        {
            foreach (var toolBarItemData in activeItemList)
            {
                if ((SystemMenuIds)toolBarItemData.Id == id && toolBarItemData.InCD)
                {
                    return;
                }
            }

            PanelManager.DealPanel(new BattleForm()); //test
            return;

            switch (id)
            {
            case SystemMenuIds.SystemMenu:
                PanelManager.DealPanel(new SystemMenu());
                break;

            case SystemMenuIds.RoleForm:
                PanelManager.DealPanel(new RoleForm());
                break;

            case SystemMenuIds.ItemForm:
                PanelManager.DealPanel(new ItemForm());
                break;

            case SystemMenuIds.MinigameForm:
                PanelManager.DealPanel(new MinigameForm());
                break;
            }
        }
 private static void SetIconEnable(SystemMenuIds id, bool enable)
 {
     foreach (var toolBarItemData in menuItems)
     {
         if ((SystemMenuIds)toolBarItemData.Id == id)
         {
             toolBarItemData.Enable = enable;
             return;
         }
     }
 }
Exemple #3
0
 public static void ShowGameWindow(SystemMenuIds wid)
 {
     switch (wid)
     {
         case SystemMenuIds.GameUpToNumber:
             MainForm.Instance.DealPanel(new MGUpToNumber());break;
         case SystemMenuIds.GameBattleRobot:
             MainForm.Instance.DealPanel(new MGBattleRobot());break;
         case SystemMenuIds.GameIconsCatch:
             MainForm.Instance.DealPanel(new MGIconsCatch());break;
         case SystemMenuIds.GameThreeBody:
             MainForm.Instance.DealPanel(new MGThreeBody()); break;
         case SystemMenuIds.GameSeven:
             MainForm.Instance.DealPanel(new MGSeven()); break;
     }
 }
        static public void CheckItemClick(SystemMenuIds id)
        {
            foreach (ToolBarItemData toolBarItemData in activeItems)
            {
                if ((SystemMenuIds)toolBarItemData.Id == id && toolBarItemData.InCD)
                {
                    return;
                }
            }

            switch (id)
            {
                case SystemMenuIds.SystemMenu:
                    MainForm.Instance.DealPanel(new SystemMenu());
                    break;
                case SystemMenuIds.ItemForm:
                    MainForm.Instance.DealPanel(new ItemForm());
                    break;
                case SystemMenuIds.AchieveViewForm:
                    MainForm.Instance.DealPanel(new AchieveViewForm());
                    break;
                case SystemMenuIds.PeopleViewForm:
                    MainForm.Instance.DealPanel(new PeopleViewForm());
                    break;
                case SystemMenuIds.DeckViewForm:
                    MainForm.Instance.DealPanel(new DeckViewForm());
                    break;
                case SystemMenuIds.GameShopViewForm:
                    MainForm.Instance.DealPanel(new GameShopViewForm());
                    break;
                case SystemMenuIds.TaskForm:
                    MainForm.Instance.DealPanel(new TaskForm());
                    break;
                case SystemMenuIds.EquipmentForm:
                    MainForm.Instance.DealPanel(new EquipmentForm());
                    break;
                case SystemMenuIds.HeroSkillAttrForm:
                    MainForm.Instance.DealPanel(new HeroSkillAttrForm());
                    break;
                case SystemMenuIds.MergeWeaponForm:
                    MainForm.Instance.DealPanel(new MergeWeaponForm());
                    break;
                case SystemMenuIds.MagicBookViewForm:
                    MainForm.Instance.DealPanel(new MagicBookViewForm());
                    break;
                case SystemMenuIds.WorldMapViewForm:
                    MainForm.Instance.DealPanel(new WorldMapViewForm());
                    break;
                case SystemMenuIds.ConnectForm:
                    MainForm.Instance.DealPanel(new ConnectForm());
                    break;
                case SystemMenuIds.CommandForm:
                    CommandForm cmf = new CommandForm();
                    cmf.ShowDialog();
                    break;
                case SystemMenuIds.CardShopViewForm:
                    MainForm.Instance.DealPanel(new CardShopViewForm());
                    break;
                case SystemMenuIds.TournamentViewForm:
                    MainForm.Instance.DealPanel(new TournamentViewForm());
                    break;
                case SystemMenuIds.AddDayForm:
                    if (MessageBoxEx2.Show("是否花5钻石增加20点体力?") == DialogResult.OK)
                    {
                        if (UserProfile.InfoBag.PayDiamond(5))
                        {
                            UserProfile.InfoBasic.Ap += 20;
                        }
                    }
                    break;
                case SystemMenuIds.TreasureWheelForm:
                    MainForm.Instance.DealPanel(new TreasureWheelForm());
                    break;
                case SystemMenuIds.ExpBottle:
                    MainForm.Instance.DealPanel(new ExpBottleForm());
                    //if (MessageBoxEx2.Show("是否花5钻石将时间回到3小时前?") == DialogResult.OK)
                    //{
                    //    if (UserProfile.Profile.PayDiamond(5))
                    //    {
                    //        UserProfile.Profile.time.AddSeconds(-3 * 3600);
                    //    }
                    //}
                    break;
                case SystemMenuIds.QuestionForm:
                    MainForm.Instance.DealPanel(new QuestionForm());
                    break;
                case SystemMenuIds.FarmForm:
                    MainForm.Instance.DealPanel(new FarmForm());
                    break;
                case SystemMenuIds.ChangeCard:
                    MainForm.Instance.DealPanel(new ChangeCardForm());
                    break;
                case SystemMenuIds.BuyPiece:
                    MainForm.Instance.DealPanel(new BuyPieceForm());
                    break;
                case SystemMenuIds.GameUpToNumber:
                    if (UserProfile.Profile.InfoMinigame.Has((int)id))
                    {
                        if (MessageBoxEx2.Show("是否花5钻石再试一次?") != DialogResult.OK || !UserProfile.InfoBag.PayDiamond(5))
                        {
                            return;
                        }
                        UserProfile.Profile.InfoMinigame.Remove((int)id);
                    }
                    PanelManager.ShowGameWindow(id);
                    break;
                case SystemMenuIds.GameIconsCatch:
                    goto case SystemMenuIds.GameUpToNumber;
                case SystemMenuIds.GameBattleRobot:
                    goto case SystemMenuIds.GameUpToNumber;
                case SystemMenuIds.GameThreeBody:
                    goto case SystemMenuIds.GameUpToNumber;
                case SystemMenuIds.GameSeven:
                    goto case SystemMenuIds.GameUpToNumber;
            }
        }
 static private void SetIconEnable(SystemMenuIds id, bool enable)
 {
     foreach (ToolBarItemData toolBarItemData in menuItems)
     {
         if ((SystemMenuIds)toolBarItemData.Id == id)
         {
             toolBarItemData.Enable = enable;
             return;
         }
     }
 }
        public static void CheckItemClick(SystemMenuIds id)
        {
            foreach (var toolBarItemData in activeItems)
            {
                if ((SystemMenuIds)toolBarItemData.Id == id && toolBarItemData.InCD)
                {
                    return;
                }
            }

            switch (id)
            {
            case SystemMenuIds.SystemMenu:
                PanelManager.DealPanel(new SystemMenu());
                break;

            case SystemMenuIds.ItemForm:
                PanelManager.DealPanel(new ItemForm());
                break;

            case SystemMenuIds.AchieveViewForm:
                PanelManager.DealPanel(new AchieveViewForm());
                break;

            case SystemMenuIds.PeopleViewForm:
                PanelManager.DealPanel(new PeopleViewForm());
                break;

            case SystemMenuIds.DeckViewForm:
                PanelManager.DealPanel(new DeckViewForm());
                break;

            case SystemMenuIds.GameShopViewForm:
                PanelManager.DealPanel(new GameShopViewForm());
                break;

            case SystemMenuIds.TaskForm:
                PanelManager.DealPanel(new QuestForm());
                break;

            case SystemMenuIds.EquipmentForm:
                PanelManager.DealPanel(new EquipmentForm());
                break;

            case SystemMenuIds.HeroSkillAttrForm:
                PanelManager.DealPanel(new HeroSkillAttrForm());
                break;

            case SystemMenuIds.EquipComposeForm:
                PanelManager.DealPanel(new EquipComposeForm());
                break;

            case SystemMenuIds.MagicBookViewForm:
                PanelManager.DealPanel(new MagicBookViewForm());
                break;

            case SystemMenuIds.WorldMapViewForm:
                PanelManager.DealPanel(new WorldMapViewForm());
                break;

            case SystemMenuIds.ConnectForm:
                PanelManager.DealPanel(new ConnectForm());
                break;

            case SystemMenuIds.CardShopViewForm:
                PanelManager.DealPanel(new CardShopViewForm());
                break;

            case SystemMenuIds.TournamentViewForm:
                PanelManager.DealPanel(new TournamentViewForm());
                break;

            case SystemMenuIds.TreasureWheelForm:
                PanelManager.DealPanel(new TreasureWheelForm());
                break;

            case SystemMenuIds.ExpBottle:
                PanelManager.DealPanel(new ExpBottleForm());
                //if (MessageBoxEx2.Show("是否花5钻石将时间回到3小时前?") == DialogResult.OK)
                //{
                //    if (UserProfile.Profile.PayDiamond(5))
                //    {
                //        UserProfile.Profile.time.AddSeconds(-3 * 3600);
                //    }
                //}
                break;

            case SystemMenuIds.QuestionForm:
                PanelManager.DealPanel(new QuestionForm());
                break;

            case SystemMenuIds.MinigameForm:
                PanelManager.DealPanel(new MinigameForm());
                break;
            }
        }