public PageGame() { InitializeComponent(); if (DesignMode.IsDesignModeEnabled) { BindingContext = new GamePageVM(); } }
public GameController(App app) { App = app; GamePage = new PageGame(); PagePoints = new PagePoints(); PageStartUp = new PageStartUp(); PageSettings = new PageSettings(); PageLogIn = new PageLogIn(); PagePlayerList = new PagePlayerList(); 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(); PointsPageVM = new PointsPageVM(); WaititngPageVM = new WaititngPageVM(); PageStartUp.BindingContext = StartUpPageVM; PageSettings.BindingContext = SettingsPageVM; PageLogIn.BindingContext = LogInPageVM; PageRegHelp.BindingContext = LogInPageVM; PageRegister.BindingContext = RegisterPageVM; PageLobby.BindingContext = LobbyPageVM; PagePlayerList.BindingContext = LobbyPageVM; PageCalendar.BindingContext = CalendarPageVM; PageNewGame.BindingContext = NewGamePageVM; PageNewPrivateGame.BindingContext = NewPrivateGamePageVM; GamePage.BindingContext = GamePageVM; PagePoints.BindingContext = PointsPageVM; PageWait.BindingContext = WaititngPageVM; StartUpPageVM.Started += StartUpPageVM_Started; StartUpPageVM.BtPlayOnlineClicked += StartUpPageVM_BtPlayOnlineClicked; StartUpPageVM.BtSettingsClicked += StartUpPageVM_BtSettingsClicked; StartUpPageVM.BtExitClicked += StartUpPageVM_BtExitClicked; 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.BtExitClicked += LobbyPageVM_BtExitClicked; LobbyPageVM.BtJoinGameClicked += LobbyPageVM_BtJoinGameClicked; LobbyPageVM.BtCalendarClicked += LobbyPageVM_BtCalendarClicked; LobbyPageVM.BtJoinPrivateGameClicked += LobbyPageVM_BtJoinPrivateGameClicked; LobbyPageVM.BtListPlayersClicked += LobbyPageVM_BtListPlayersClicked; LobbyPageVM.BtBackFromListClicked += LobbyPageVM_BtBackFromListClicked; 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; Init(); }