Beispiel #1
0
        private void NewRuleClick(object sender, EventArgs e)
        {
            AddRule addRule = new AddRule(_settings);

            addRule.ShowDialog();
            DataBind();
        }
 private void OpenSelectedRuleForEdit()
 {
     ListViewItem item = _rulesList.SelectedItems.Cast<ListViewItem>().FirstOrDefault();
     if (item == null) return;
     Rule rule = (Rule) item.Tag;
     AddRule addRule = new AddRule(_settings, rule);
     addRule.ShowDialog();
     DataBind();
 }
Beispiel #3
0
        private void OpenSelectedRuleForEdit()
        {
            ListViewItem item = _rulesList.SelectedItems.Cast <ListViewItem>().FirstOrDefault();

            if (item == null)
            {
                return;
            }
            Rule    rule    = (Rule)item.Tag;
            AddRule addRule = new AddRule(_settings, rule);

            addRule.ShowDialog();
            DataBind();
        }
 private void NewRuleClick(object sender, EventArgs e)
 {
     AddRule addRule = new AddRule(_settings);
     addRule.ShowDialog();
     DataBind();
 }