Esempio n. 1
0
        private void BeComAddRuleClick(object sender, EventArgs e)
        {
            var rule       = new Rule();
            var ruleEditor = new RuleEditor(rule, true);

            ruleEditor.Location = Location;
            ruleEditor.ShowDialog();
            if (ruleEditor.Save)
            {
                rule = ruleEditor.Rule;
                if (BeTabs.SelectedTab.Name.Equals("TabCombat"))
                {
                    AddCondition(rule, BeComRules);
                }
                if (BeTabs.SelectedTab.Name.Equals("TabBuffs"))
                {
                    AddCondition(rule, BeBuffRules);
                }
                if (BeTabs.SelectedTab.Name.Equals("TabPull"))
                {
                    AddCondition(rule, BePullRules);
                }
                if (BeTabs.SelectedTab.Name.Equals("TabRest"))
                {
                    AddCondition(rule, BeRestRules);
                }
                if (BeTabs.SelectedTab.Name.Equals("TabPrePull"))
                {
                    AddCondition(rule, BePrePullRules);
                }
            }
        }
Esempio n. 2
0
 private void EditRule(Node node)
 {
     if (node.Tag is Rule)
     {
         var rule = (Rule)node.Tag;
         if (string.IsNullOrEmpty(rule.Script))
         {
             var ruleEditor = new RuleEditor(rule, true);
             ruleEditor.Location = Location;
             ruleEditor.ShowDialog();
             if (ruleEditor.Save)
             {
                 node.Tag  = rule;
                 node.Text = rule.Name;
             }
         }
         else
         {
             var scriptEditor = new ScriptEditor(rule);
             scriptEditor.Location = Location;
             scriptEditor.ShowDialog();
             if (scriptEditor.Save)
             {
                 node.Tag  = rule;
                 node.Text = rule.Name;
             }
         }
     }
 }
Esempio n. 3
0
 private void BeComAddRuleClick(object sender, EventArgs e)
 {
     var rule = new Rule();
     var ruleEditor = new RuleEditor(rule, false);
     ruleEditor.Location = Location;
     ruleEditor.ShowDialog();
     if (ruleEditor.Save)
     {
         rule = ruleEditor.Rule;
         if (BeTabs.SelectedTab.Name.Equals("TabCombat"))
         {
             AddCondition(rule, BeComRules);
         }
     }
 }
Esempio n. 4
0
 private void EditRule(Node node)
 {
     if (node.Tag is Rule)
     {
         var rule = (Rule) node.Tag;
         if (string.IsNullOrEmpty(rule.Script))
         {
             var ruleEditor = new RuleEditor(rule, true);
             ruleEditor.Location = Location;
             ruleEditor.ShowDialog();
             if (ruleEditor.Save)
             {
                 node.Tag = rule;
                 node.Text = rule.Name;
             }
         }
         else
         {
             var scriptEditor = new ScriptEditor(rule);
             scriptEditor.Location = Location;
             scriptEditor.ShowDialog();
             if (scriptEditor.Save)
             {
                 node.Tag = rule;
                 node.Text = rule.Name;
             }
         }
     }
 }