/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { if (textBoxUserName.Tag != null) { ClassConfig.SetGlobal("user.name", textBoxUserName.Text.Trim()); textBoxUserName.Tag = null; } if (textBoxUserEmail.Tag != null) { ClassConfig.SetGlobal("user.email", textBoxUserEmail.Text.Trim()); textBoxUserEmail.Tag = null; } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { if (textBoxAliases.Tag != null) { // Remove all aliases and then rebuild them if (ClassGit.Run("config --remove-section alias").Success() == false) { App.PrintLogMessage("ClassAliases: Error removing section aliases", MessageType.Error); } foreach (string[] def in textBoxAliases.Lines.Select(s => s.Trim().Split('=')).Where(def => def.Length == 2)) { ClassConfig.SetGlobal("alias." + def[0].Trim(), def[1].Trim()); } textBoxAliases.Tag = null; } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { if (checkBoxIgnoreCase.Tag != null) { ClassConfig.SetGlobal("core.ignorecase", checkBoxIgnoreCase.Checked.ToString()); checkBoxIgnoreCase.Tag = null; } Properties.Settings.Default.ShowDotGitFolders = checkBoxShowDotGit.Checked; Properties.Settings.Default.RepoDeepScan = checkBoxDeepScan.Checked; Properties.Settings.Default.RefreshOnChange = checkBoxRefreshOnChange.Checked; Properties.Settings.Default.ReaddOnChange = checkBoxReaddOnChange.Checked; Properties.Settings.Default.WarnOnTabs = checkBoxScanTabs.Checked; Properties.Settings.Default.WarnOnTabsExt = textBoxScanExt.Text; // If the auto-refresh settings were changed, run the commits refresh to (de)arm the code if (checkBoxRefreshOnChange.Tag != null || checkBoxReaddOnChange.Tag != null) { App.MainForm.SelectiveRefresh(FormMain.SelectveRefreshFlags.Commits); checkBoxRefreshOnChange.Tag = checkBoxReaddOnChange.Tag = null; } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { string newCrlf = "true"; // default if (radio1.Checked) { newCrlf = "true"; } if (radio2.Checked) { newCrlf = "input"; } if (radio3.Checked) { newCrlf = "false"; } if (newCrlf != crlf) { ClassConfig.SetGlobal("core.autocrlf", newCrlf); } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { // Default core.autocrlf setting is "true" on Windows and "false" on Linux string newCrlf = ClassUtils.IsMono() ? "false" : "true"; if (radio1.Checked) { newCrlf = "true"; } if (radio2.Checked) { newCrlf = "input"; } if (radio3.Checked) { newCrlf = "false"; } if (newCrlf != crlf) { ClassConfig.SetGlobal("core.autocrlf", newCrlf); } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges() { userControlEditGitignore.SaveGitIgnore(excludesFile); ClassConfig.SetGlobal("core.excludesfile", excludesFile); }