コード例 #1
0
        public GameController(MainWindow mainWindow)
        {
            MainWindow = mainWindow;
            CardImages = new CardImages();

            GamePage           = new PageGame();
            PagePoints         = new PagePoints();
            PageStartUp        = new PageStartUp();
            PageSettings       = new PageSettings();
            PageLogIn          = new PageLogIn();
            PageCalendar       = new PageCalendar();
            PageRegHelp        = new PageRegHelp();
            PageRegister       = new PageRegister();
            PageLobby          = new PageLobby();
            PageNewGame        = new PageNewGame();
            PageNewPrivateGame = new PageNewPrivateGame();
            PageWait           = new PageWait();

            StartUpPageVM        = new StartUpPageVM();
            SettingsPageVM       = new SettingsPageVM();
            LogInPageVM          = new LogInPageVM();
            RegisterPageVM       = new RegisterPageVM();
            LobbyPageVM          = new LobbyPageVM();
            CalendarPageVM       = new CalendarPageVM();
            NewGamePageVM        = new NewGamePageVM();
            NewPrivateGamePageVM = new NewPrivateGamePageVM();
            GamePageVM           = new GamePageVM(CardImages);
            PointsPageVM         = new PointsPageVM();
            WaititngPageVM       = new WaititngPageVM();

            PageStartUp.DataContext        = StartUpPageVM;
            PageSettings.DataContext       = SettingsPageVM;
            PageLogIn.DataContext          = LogInPageVM;
            PageRegHelp.DataContext        = LogInPageVM;
            PageRegister.DataContext       = RegisterPageVM;
            PageLobby.DataContext          = LobbyPageVM;
            PageCalendar.DataContext       = CalendarPageVM;
            PageNewGame.DataContext        = NewGamePageVM;
            PageNewPrivateGame.DataContext = NewPrivateGamePageVM;
            GamePage.DataContext           = GamePageVM;
            PagePoints.DataContext         = PointsPageVM;
            PageWait.DataContext           = WaititngPageVM;


            StartUpPageVM.Started             += StartUpPageVM_Started;
            StartUpPageVM.BtPlayOnlineClicked += StartUpPageVM_BtPlayOnlineClicked;
            StartUpPageVM.BtSettingsClicked   += StartUpPageVM_BtSettingsClicked;

            SettingsPageVM.BtOkClicked += SettingsPageVM_BtOkClicked;

            LogInPageVM.BtLogInClicked        += LogInPageVM_BtLogInClicked;
            LogInPageVM.BtRegisterClicked     += LogInPageVM_BtRegisterClicked;
            LogInPageVM.BtCancelClicked       += LogInPageVM_BtCancelClicked;
            LogInPageVM.BtHelpClicked         += LogInPageVM_BtHelpClicked;
            LogInPageVM.BtCloeseHelpClicked   += LogInPageVM_BtCloeseHelpClicked;
            LogInPageVM.BtLogInAsGuestClicked += LogInPageVM_BtLogInAsGuestClicked;

            RegisterPageVM.BtCancelClicked   += RegisterPageVM_BtCancelClicked;
            RegisterPageVM.BtGetCodeClicked  += RegisterPageVM_BtGetCodeClicked;
            RegisterPageVM.BtRegisterClicked += RegisterPageVM_BtRegisterClicked;

            LobbyPageVM.BtBtExitClicked          += LobbyPageVM_BtBtExitClicked;
            LobbyPageVM.BtJoinGameClicked        += LobbyPageVM_BtJoinGameClicked;
            LobbyPageVM.BtCalendarClicked        += LobbyPageVM_BtCalendarClicked;
            LobbyPageVM.BtJoinPrivateGameClicked += LobbyPageVM_BtJoinPrivateGameClicked;

            CalendarPageVM.BtSendDataClicked  += CalendarPageVM_BtSendDataClicked;
            CalendarPageVM.BtBackClick        += CalendarPageVM_BtBackClick;
            CalendarPageVM.GetUserListClicked += CalendarPageVM_GetUserListClicked;

            NewGamePageVM.BtCancelClicked        += NewGamePageVM_BtCancelClicked;
            NewPrivateGamePageVM.BtJoinClicked   += NewPrivateGamePageVM_BtJoinClicked;
            NewPrivateGamePageVM.BtCancelClicked += NewPrivateGamePageVM_BtCancelClicked;

            GamePageVM.BtGoClicked      += Game_BtGoClicked;
            GamePageVM.YesNoZoleClick   += Game_YesNoZoleClick;
            GamePageVM.CardClicked      += Game_CardClicked;
            GamePageVM.DebugModeChanged += Game_DebugModeChanged;

            PointsPageVM.BtGoClicked  += Game_BtGoClicked;
            PointsPageVM.BtYesClicked += PointsPageVM_BtYesClicked;
            PointsPageVM.BtNoClicked  += PointsPageVM_BtNoClicked;

            GamePageVM.IsInDegugMode        = false;
            GamePageVM.IsDebugPromptVisible = Properties.Settings.Default.ShowDebugPrompt;

            GamePage.Height   = GamePageNormalHeight;
            MainWindow.Height = MainWindowNormalHeight;
            MainWindow.Width  = 820d * Locator.Scale;

            Init();
        }
コード例 #2
0
ファイル: GameVM.cs プロジェクト: Camel-RD/ZoleOnline
 public CalendarItemVM(CalendarPageVM owner)
 {
     Owner = owner;
 }