static DTGamePageVM() { GamePageVM = new GamePageVM(CardImages); for (int i = 0; i < 10; i++) { GamePageVM.Cards[i].ImgName = "c1"; } GamePageVM.CardsOnDesk1.ImgName = "c1"; GamePageVM.CardsOnDesk2.ImgName = "dq"; GamePageVM.CardsOnDesk3.ImgName = "hk"; GamePageVM.PlayerName1 = "Askolds"; GamePageVM.PlayerName2 = "Aivars"; GamePageVM.PlayerName3 = "Haralds"; GamePageVM.Message = "Neviens negrib būt lielais, spēlēsim galda zoli"; GamePageVM.IsNameHighlighted1 = true; GamePageVM.IsYesNoPanelVisible = true; GamePageVM.IsButtonZoleVisible = true; }
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(); }