Example #1
0
        private void SetAsDefaultCheckbox_Click(object sender, EventArgs e)
        {
            if (SetAsDefaultCheckbox.Checked)
            {
                _manager.ClearAutoStart();
                SetAsDefaultCheckbox.Checked = false;
                return;
            }

            var    selected = KSPInstancesListView.SelectedItems[0];
            string instName = selected?.Tag as string;

            if (instName == null)
            {
                return;
            }

            try
            {
                _manager.SetAutoStart(instName);
                SetAsDefaultCheckbox.Checked = true;
            }
            catch (NotKSPDirKraken k)
            {
                GUI.user.RaiseError(Properties.Resources.ManageKspInstancesNotValid, k.path);
            }
        }
Example #2
0
        private void ResetAutoStartChoice_Click(object sender, EventArgs e)
        {
            KSPManager.ClearAutoStart();

            Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location);
            Application.Exit();
        }