Exemplo n.º 1
0
        public void Routing(string router)
        {
            EventArgsRoute e = new EventArgsRoute(router);

            if (router.Equals(Constants.MAIN_SETTING))
            {
                routeingEvent(MainSettingView, e);
                SetCurrentControl(MainSettingView);
            }
            else if (router.Equals(Constants.PLAYER_SETTING))
            {
                routeingEvent(PlayerSettingView, e);
                SetCurrentControl(PlayerSettingView);
            }
            else if (router.Equals(Constants.SIZE_SETTING))
            {
                routeingEvent(SizeSettingView, e);
                SetCurrentControl(SizeSettingView);
            }
            else if (router.Equals(Constants.LANGUAGE_SETTING))
            {
                routeingEvent(LanguageSettingView, e);
                SetCurrentControl(LanguageSettingView);
            }
            else if (router.Equals(Constants.SOUND_SETTING))
            {
                routeingEvent(SoundSettingView, e);
                SetCurrentControl(SoundSettingView);
            }
            else if (router.Equals(Constants.TIME_SETTING))
            {
                routeingEvent(TimeSettingView, e);
                SetCurrentControl(TimeSettingView);
            }
            else if (router.Equals(Constants.GAME_MODE))
            {
                routeingEvent(GameModeSettingView, e);
                SetCurrentControl(GameModeSettingView);
            }
            else if (router.Equals(Constants.APPEARANCE_SETTING))
            {
                routeingEvent(AppearanceSettingView, e);
                SetCurrentControl(AppearanceSettingView);
            }
            else if (router.Equals(Constants.LOAD_GAME))
            {
                routeingEvent(LoadGameView, e);
                SetCurrentControl(LoadGameView);
            }
            else
            {
                throw new Exception();
            }
        }
Exemplo n.º 2
0
        public void Routing(string router)
        {
            EventArgsRoute e = new EventArgsRoute(router);

            if (router.Equals(Constants.OVERVIEW))
            {
                routeingEvent(OverviewView, e);
                SetCurrentControl(OverviewView);
            }
            else if (router.Equals(Constants.GAME_MODE))
            {
                routeingEvent(GameModeView, e);
                SetCurrentControl(GameModeView);
            }
            else if (router.Equals(Constants.SIZE_SETTING))
            {
                routeingEvent(SizeView, e);
                SetCurrentControl(SizeView);
            }
            else if (router.Equals(Constants.PLAYER_SETTING))
            {
                routeingEvent(PlayerView, e);
                SetCurrentControl(PlayerView);
            }
            else if (router.Equals(Constants.MAIN))
            {
                mainViewEvent(MainView, e);
                routeingEvent(MainView, e);
                SetCurrentControl(MainView);
            }
            else if (router.Equals(Constants.LOAD_GAME))
            {
                routeingEvent(LoadGameView, e);
                SetCurrentControl(LoadGameView);
            }
            else
            {
                throw new Exception();
            }
        }