Exemplo n.º 1
0
        public BehaviorForm(BehaviorController behaviorController)
        {
            InitializeComponent();
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            _ourDirectory = executableDirectoryName;
            PveBehaviorSettings.LoadSettings();
            _behavior = behaviorController ?? new BehaviorController();
        }
Exemplo n.º 2
0
 private void LoadBehavior()
 {
     _behavior = new BehaviorController();
     ClearTree(BeComRules);
     ClearTree(BePullRules);
     ClearTree(BeRestRules);
     ClearTree(BeBuffRules);
     ClearTree(BePrePullRules);
     _behavior.Load(_ourDirectory + "\\Behaviors\\" + BeTBSelectBehavior.SelectedItem + ".xml");
     _behavior.CombatController.GetRules.Sort();
     _behavior.RestController.GetRules.Sort();
     _behavior.PullController.GetRules.Sort();
     _behavior.BuffController.GetRules.Sort();
     _behavior.PrePullController.GetRules.Sort();
     BeCombatDistance.Value     = _behavior.CombatDistance;
     BePullDistance.Value       = _behavior.PullDistance;
     BePrePullDistance.Value    = _behavior.PrePullDistance;
     BeEnableAutoAttack.Checked = _behavior.UseAutoAttack;
     BeSendPet.Checked          = _behavior.SendPet;
     BeGlobalCooldown.Value     = _behavior.GlobalCooldown;
     foreach (Rule rule in _behavior.CombatController.GetRules)
     {
         AddCondition(rule, BeComRules);
     }
     foreach (Rule rule in _behavior.PullController.GetRules)
     {
         AddCondition(rule, BePullRules);
     }
     foreach (Rule rule in _behavior.RestController.GetRules)
     {
         AddCondition(rule, BeRestRules);
     }
     foreach (Rule rule in _behavior.BuffController.GetRules)
     {
         AddCondition(rule, BeBuffRules);
     }
     foreach (Rule rule in _behavior.PrePullController.GetRules)
     {
         AddCondition(rule, BePrePullRules);
     }
     BeTabs.Enabled                      = true;
     BeBarRuleModifier.Enabled           = true;
     BeGMisc.Enabled                     = true;
     PveBehaviorSettings.LoadedBeharvior = BeTBSelectBehavior.SelectedItem.ToString();
     PveBehaviorSettings.SaveSettings();
 }
Exemplo n.º 3
0
 private void BehaviorFormFormClosing(object sender, FormClosingEventArgs e)
 {
     PveBehaviorSettings.AllowScripts = BtnAllowScripts.Checked;
     PveBehaviorSettings.SaveSettings();
     AskForSave();
 }