Beispiel #1
0
        public void OpenOptions(object obj)
        {
            OptionWindow optionWindow = new OptionWindow();

            optionWindow.Show();
            Console.WriteLine("openOptions");
        }
Beispiel #2
0
        private void MenuItem_Option_Click(object sender, RoutedEventArgs e)
        {
            OptionWindow w = new OptionWindow(_log);

            w.Top  = 0.4 * (App.ScreenHeight - w.Height);
            w.Left = 0.5 * (App.ScreenWidth - w.Width);
            w.Show();
        }
Beispiel #3
0
        private void OptionsButton_Click(object sender, RoutedEventArgs e)
        {
            OptionWindow optionWindow = new OptionWindow(m_workspace);

            optionWindow.Simplest.IsChecked    = OptionDifficultySetting.MaterialBalance == m_workspace.Difficulty;
            optionWindow.Medium.IsChecked      = OptionDifficultySetting.MaterialBalanceWithReactors == m_workspace.Difficulty;
            optionWindow.MostComplex.IsChecked = OptionDifficultySetting.MaterialAndEnergyBalance == m_workspace.Difficulty;
            optionWindow.Show();
        }
Beispiel #4
0
        // Note: KSP's GameEvents.onLevelWasLoaded has the lower-case 'on' instead of usual 'On'
        private void onLevelWasLoaded(GameScenes scene)
        {
            if (scene != GameScenes.SPACECENTER)
            {
                return;
            }

            if (!RTSettings.Instance.FirstStart)
            {
                return;
            }

            // open here the option dialog for the first start
            RTLog.Notify("First start of RemoteTech!");
            _optionWindow.Show();
            RTSettings.Instance.FirstStart = false;
        }
Beispiel #5
0
 private void Options_Click(object sender, RoutedEventArgs e)
 {
     if (_optionWindow == null)
     {
         _optionWindow = new OptionWindow(this);
         _optionWindow.Show();
         _optionWindow.UpdateGUI += OnUpdateGUI;
         Focusable = true;
     }
     else
     {
         if (!_optionWindow.IsLoaded)
         {
             _optionWindow = new OptionWindow(this);
             _optionWindow.Show();
             _optionWindow.UpdateGUI += OnUpdateGUI;
             Focusable = true;
         }
     }
     Focus();
 }