private void btnOk_Click(object sender, RoutedEventArgs e) { WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "2952"), Translator.GetInstance().GetString("MessageBox", "2952", "message"), WPFMessageBoxButtons.YesNo); if (result == WPFMessageBoxResult.Yes) { Skin selectedSkin = (Skin)cbSkin.SelectedItem; SkinObject.GetInstance().setCurrentSkin(selectedSkin); GeneralHelpers.GameSpeedValue speed = (GeneralHelpers.GameSpeedValue)Enum.ToObject(typeof(GeneralHelpers.GameSpeedValue), (int)slGameSpeed.Value); Language language = (Language)cbLanguage.SelectedItem; AppSettings.GetInstance().setLanguage(language); Settings.GetInstance().MailsOnLandings = cbMailOnLandings.IsChecked.Value; Settings.GetInstance().MailsOnBadWeather = cbMailOnBadWeather.IsChecked.Value; Settings.GetInstance().MinutesPerTurn = (int)cbTurnMinutes.SelectedItem; Settings.GetInstance().CurrencyShorten = cbShortenCurrency.IsChecked.Value; foreach (RadioButton rbAirportCode in rbAirportCodes) { if (rbAirportCode.IsChecked.Value) { Settings.GetInstance().AirportCodeDisplay = (Settings.AirportCode)rbAirportCode.Tag; } } PageNavigator.NavigateTo(new PageSettings()); } }
private void lnkTest_Click(object sender, RoutedEventArgs e) { //PageNavigator.NavigateTo(new PageTest()); //SerializedLoadSaveHelpers.SaveGame("Dugan"); SerializedLoadSaveHelpers.LoadGame("Dugan"); PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); HolidayYear.Clear(); GeneralHelpers.CreateHolidays(GameObject.GetInstance().GameTime.Year); Setup.SetupMergers(); }
private void hyperLink_Click(object sender, RoutedEventArgs e) { object o = ((Hyperlink)sender).Tag; string linkType = (string)((Hyperlink)sender).TargetName; switch (linkType) { case "airline": PageNavigator.NavigateTo(new PageAirline((Airline)o)); break; case "airport": PageNavigator.NavigateTo(new PageAirport((Airport)o)); break; case "airliner": PageNavigator.NavigateTo(new PageFleetAirliner((FleetAirliner)o)); break; } }
private void lnkNewGame_Click(object sender, RoutedEventArgs e) { GameObjectWorker.GetInstance().cancel(); WPFMessageBoxResult result = WPFMessageBox.Show(Translator.GetInstance().GetString("MessageBox", "1001"), Translator.GetInstance().GetString("MessageBox", "1001", "message"), WPFMessageBoxButtons.YesNo); if (result == WPFMessageBoxResult.Yes) { GameObjectWorker.GetInstance().cancel(); while (GameObjectWorker.GetInstance().isBusy()) { } PageNavigator.NavigateTo(new PageFrontMenu()); GameObject.RestartInstance(); Setup.SetupGame(); } //GameObjectWorker.GetInstance().start(); }
private void lnkPilots_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new PagePilotsFS()); }
private void lnkFinances_Click(object sender, RoutedEventArgs e) { //PageNavigator.NavigateTo(new PageFinances()); PageNavigator.NavigateTo(new PageFinances(GameObject.GetInstance().HumanAirline)); }
private void lnkHome_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline)); }
private void lnkAirports_Click(object sender, RoutedEventArgs e) { //PageNavigator.NavigateTo(new PageAirports()); PageNavigator.NavigateTo(new GUIModel.PagesModel.AirportsPageModel.PageAirports()); }
private void lnkAirliners_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new GUIModel.PagesModel.AirlinersPageModel.PageAirliners()); }
private void lnkRoutes_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new GUIModel.PagesModel.RoutesPageModel.PageRoutes()); }
private void lnkAirlines_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new PageAirlines()); }
private void lnkAlliances_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new GUIModel.PagesModel.AlliancesPageModel.PageAlliances()); //PageNavigator.NavigateTo(new PageAlliances()); }
private void lnkSettings_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new PageSettings()); }
private void lnkNews_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateTo(new PageNewsBox()); }
private void btnPrevious_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateBack(); }
private void btnNext_Click(object sender, RoutedEventArgs e) { PageNavigator.NavigateForward(); }