コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
        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);
                }
            }
        }
コード例 #4
0
 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);
         }
     }
 }