private void newToolStripMenuItem_Click(object sender, EventArgs e) { using (var form = new MultipleReplaceNewGroup(string.Empty)) { if (form.ShowDialog(this) == DialogResult.OK && form.GroupName.Length > 0) { var newGroup = new MultipleSearchAndReplaceGroup { Enabled = true, Name = form.GroupName, Rules = new List <MultipleSearchAndReplaceSetting>() }; Configuration.Settings.MultipleSearchAndReplaceGroups.Add(newGroup); UpdateViewFromModel(Configuration.Settings.MultipleSearchAndReplaceGroups, newGroup); } } }
private void ToolStripMenuItemRenameClick(object sender, EventArgs e) { if (_currentGroup == null) { return; } using (var form = new MultipleReplaceNewGroup(_currentGroup.Name)) { if (form.ShowDialog(this) == DialogResult.OK && form.GroupName.Length > 0) { _currentGroup.Name = form.GroupName; UpdateViewFromModel(Configuration.Settings.MultipleSearchAndReplaceGroups, _currentGroup); } } }
private void ToolStripMenuItemRenameClick(object sender, EventArgs e) { if (_currentGroup == null) return; using (var form = new MultipleReplaceNewGroup(_currentGroup.Name)) { if (form.ShowDialog(this) == DialogResult.OK && form.GroupName.Length > 0) { _currentGroup.Name = form.Name; UpdateViewFromModel(Configuration.Settings.MultipleSearchAndReplaceGroups, _currentGroup); } } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { using (var form = new MultipleReplaceNewGroup(string.Empty)) { if (form.ShowDialog(this) == DialogResult.OK && form.GroupName.Length > 0) { var newGroup = new MultipleSearchAndReplaceGroup { Enabled = true, Name = form.GroupName, Rules = new List<MultipleSearchAndReplaceSetting>() }; Configuration.Settings.MultipleSearchAndReplaceGroups.Add(newGroup); UpdateViewFromModel(Configuration.Settings.MultipleSearchAndReplaceGroups, newGroup); } } }