Beispiel #1
0
        private void AddRuleButton_Click(object sender, RoutedEventArgs e)
        {
            RuleWindow window = new RuleWindow();

            window.Closed += delegate
            {
                if (window.Result != null)
                {
                    AddRule(window.Result);
                }
            };
            window.Show();
        }
Beispiel #2
0
        private void EditRuleButton_Click(object sender, RoutedEventArgs e)
        {
            if (GetSelectedRule() == null)
            {
                return;
            }

            int        Index  = RulesListBox.SelectedIndex;
            RuleWindow window = new RuleWindow((Rule)GetSelectedRule());

            window.Closed += delegate
            {
                if (window.Result != null)
                {
                    EditRule(Index, window.Result);
                }
            };
            window.Show();
        }
        private void EditRuleButton_Click(object sender, RoutedEventArgs e)
        {
            if (GetSelectedRule() == null)
                return;

            int Index = RulesListBox.SelectedIndex;
            RuleWindow window = new RuleWindow((Rule)GetSelectedRule());
            window.Closed += delegate
            {
                if (window.Result != null)
                    EditRule(Index, window.Result);
            };
            window.Show();
        }
 private void AddRuleButton_Click(object sender, RoutedEventArgs e)
 {
     RuleWindow window = new RuleWindow();
     window.Closed += delegate
     {
         if (window.Result != null)
             AddRule(window.Result);
     };
     window.Show();
 }