/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges(ClassRepo repo) { string newCrlf = string.Empty; // Default if (radio1.Checked) { newCrlf = "true"; } if (radio2.Checked) { newCrlf = "input"; } if (radio3.Checked) { newCrlf = "false"; } if (radio4.Checked) { newCrlf = string.Empty; // This value will remove the setting } if (newCrlf != crlf) { ClassConfig.SetLocal(repo, "core.autocrlf", newCrlf); } }
/// <summary> /// Apply changed settings /// </summary> public void ApplyChanges(ClassRepo repo) { if (textBoxUserName.Tag != null) { // Change the repo config and our internal variable so we dont need to reload ClassConfig.SetLocal(repo, "user.name", textBoxUserName.Text.Trim()); repo.UserName = textBoxUserName.Text; textBoxUserName.Tag = null; } if (textBoxUserEmail.Tag != null) { // Change the repo config and our internal variable so we dont need to reload ClassConfig.SetLocal(repo, "user.email", textBoxUserEmail.Text.Trim()); repo.UserEmail = textBoxUserEmail.Text; textBoxUserEmail.Tag = null; } }