コード例 #1
0
        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());
            }
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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();
        }
コード例 #5
0
 private void lnkPilots_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new PagePilotsFS());
 }
コード例 #6
0
 private void lnkFinances_Click(object sender, RoutedEventArgs e)
 {
     //PageNavigator.NavigateTo(new PageFinances());
     PageNavigator.NavigateTo(new PageFinances(GameObject.GetInstance().HumanAirline));
 }
コード例 #7
0
 private void lnkHome_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new PageAirline(GameObject.GetInstance().HumanAirline));
 }
コード例 #8
0
 private void lnkAirports_Click(object sender, RoutedEventArgs e)
 {
     //PageNavigator.NavigateTo(new PageAirports());
     PageNavigator.NavigateTo(new GUIModel.PagesModel.AirportsPageModel.PageAirports());
 }
コード例 #9
0
 private void lnkAirliners_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new GUIModel.PagesModel.AirlinersPageModel.PageAirliners());
 }
コード例 #10
0
 private void lnkRoutes_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new GUIModel.PagesModel.RoutesPageModel.PageRoutes());
 }
コード例 #11
0
 private void lnkAirlines_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new PageAirlines());
 }
コード例 #12
0
 private void lnkAlliances_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new GUIModel.PagesModel.AlliancesPageModel.PageAlliances());
     //PageNavigator.NavigateTo(new PageAlliances());
 }
コード例 #13
0
 private void lnkSettings_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new PageSettings());
 }
コード例 #14
0
 private void lnkNews_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateTo(new PageNewsBox());
 }
コード例 #15
0
 private void btnPrevious_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateBack();
 }
コード例 #16
0
 private void btnNext_Click(object sender, RoutedEventArgs e)
 {
     PageNavigator.NavigateForward();
 }