private void DiffToolFix_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(CheckSettingsLogic.GetDiffToolFromConfig(CheckSettingsLogic.CommonLogic.ConfigFileSettingsSet.GlobalSettings))) { if (MessageBox.Show(this, _noDiffToolConfigured.Text, _noDiffToolConfiguredCaption.Text, MessageBoxButtons.YesNo) == DialogResult.Yes) { CheckSettingsLogic.SolveDiffToolForKDiff(); PageHost.LoadAll(); // apply settings to dialog controls (otherwise the later called SaveAndRescan_Click would overwrite settings again) } else { GotoPageGlobalSettings(); return; } } if (CheckSettingsLogic.GetDiffToolFromConfig(CheckSettingsLogic.CommonLogic.ConfigFileSettingsSet.GlobalSettings).Equals("kdiff3", StringComparison.CurrentCultureIgnoreCase)) { CheckSettingsLogic.SolveDiffToolPathForKDiff(); } if (CheckSettingsLogic.GetDiffToolFromConfig(CheckSettingsLogic.CommonLogic.ConfigFileSettingsSet.GlobalSettings).Equals("kdiff3", StringComparison.CurrentCultureIgnoreCase) && string.IsNullOrEmpty(GetGlobalSetting("difftool.kdiff3.path"))) { MessageBox.Show(this, _kdiff3NotFoundAuto.Text); GotoPageGlobalSettings(); return; } SaveAndRescan_Click(null, null); }
private void SaveAndRescan_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; PageHost.SaveAll(); PageHost.LoadAll(); CheckSettings(); Cursor.Current = Cursors.Default; }
private void SaveAndRescan_Click(object sender, EventArgs e) { using (WaitCursorScope.Enter()) { PageHost.SaveAll(); PageHost.LoadAll(); CheckSettings(); } }
private void translationConfig_Click(object sender, EventArgs e) { using (var frm = new FormChooseTranslation()) { frm.ShowDialog(this); // will set Settings.Translation } PageHost.LoadAll(); Translate(); SaveAndRescan_Click(null, null); }
private void GitBinFound_Click(object sender, EventArgs e) { if (!CheckSettingsLogic.SolveLinuxToolsDir()) { MessageBox.Show(this, _linuxToolsShNotFound.Text, _linuxToolsShNotFoundCaption.Text); PageHost.GotoPage(GitSettingsPage.GetPageReference()); return; } MessageBox.Show(this, string.Format(_shCanBeRun.Text, AppSettings.GitBinDir), _shCanBeRunCaption.Text); ////GitBinPath.Text = Settings.GitBinDir; PageHost.LoadAll(); // apply settings to dialog controls (otherwise the later called SaveAndRescan_Click would overwrite settings again) SaveAndRescan_Click(null, null); }
private void ChangeHomeButton_Click(object sender, EventArgs e) { PageHost.SaveAll(); using (var frm = new FormFixHome()) frm.ShowDialog(this); PageHost.LoadAll(); // TODO?: rescan // orginal: //// throw new NotImplementedException(@" //// Save(); //// using (var frm = new FormFixHome()) frm.ShowDialog(this); //// LoadSettings(); //// Rescan_Click(null, null); //// "); }
private void MergeToolFix_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(CommonLogic.GetGlobalMergeTool())) { if ( MessageBox.Show(this, _noMergeToolConfigured.Text, _noMergeToolConfiguredCaption.Text, MessageBoxButtons.YesNo) == DialogResult.Yes) { CommonLogic.SetGlobalMergeTool("kdiff3"); PageHost.LoadAll(); // apply settings to dialog controls (otherwise the later called SaveAndRescan_Click would overwrite settings again) } else { GotoPageGlobalSettings(); return; } } if (CommonLogic.IsMergeTool("kdiff3")) { CheckSettingsLogic.SolveMergeToolPathForKDiff(); } else if (_autoConfigMergeTools.Any(tool => CommonLogic.IsMergeTool(tool))) { CheckSettingsLogic.AutoConfigMergeToolCmd(); SetGlobalPathSetting( string.Format("mergetool.{0}.cmd", CommonLogic.GetGlobalMergeTool()), CheckSettingsLogic.GetMergeToolCmdText()); } if (CommonLogic.IsMergeTool("kdiff3") && string.IsNullOrEmpty(GetGlobalSetting("mergetool.kdiff3.path"))) { MessageBox.Show(this, _kdiff3NotFoundAuto.Text); GotoPageGlobalSettings(); return; } SaveAndRescan_Click(null, null); }