Inheritance: GitExtensionsForm
示例#1
0
        private bool Save()
        {
            if (!_checkSettingsLogic.CanFindGitCmd())
            {
                if (MessageBox.Show(this, _cantFindGitMessage.Text, _cantFindGitMessageCaption.Text,
                                    MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    return(false);
                }
            }

            foreach (var settingsPage in SettingsPages)
            {
                settingsPage.SaveSettings();
            }

            if (Settings.RunningOnWindows())
            {
                FormFixHome.CheckHomePath();
            }

            // TODO: to which settings page does this belong?
            GitCommandHelpers.SetEnvironmentVariable(true);

            // TODO: this method has a generic sounding name but only saves some specific settings
            Settings.SaveSettings();

            return(true);
        }
示例#2
0
        public static void CheckHomePath()
        {
            GitCommandHelpers.SetEnvironmentVariable();

            if (IsFixHome())
            {
                if (MessageBox.Show(string.Format(_gitGlobalConfigNotFound.Text, Environment.GetEnvironmentVariable("HOME")),
                                    _gitGlobalConfigNotFoundCaption.Text, MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    using (var frm = new FormFixHome()) frm.ShowDialog();
                }
            }
        }
示例#3
0
 private void ChangeHomeButton_Click(object sender, EventArgs e)
 {
     Save();
     using (var frm = new FormFixHome()) frm.ShowDialog(this);
     LoadSettings();
     Rescan_Click(null, null);
 }