Ejemplo n.º 1
0
 public void Reset()
 {
     TrinitySetting.Reset(this);
 }
Ejemplo n.º 2
0
 public void Reset()
 {
     TrinitySetting.Reset(this);
     Initialization();
 }
        /// <summary>
        /// Initializes the Reset commands.
        /// </summary>
        private void InitializeResetCommand()
        {
            try
            {
                ResetMiscCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.Misc.Reset();
                });
                ResetBarbCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.Barbarian.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetCrusaderCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.Crusader.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetMonkCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.Monk.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetWizardCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.Wizard.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetWitchDoctorCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.WitchDoctor.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetDemonHunterCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Combat.DemonHunter.Reset();
                    _Model.Combat.AvoidanceRadius.Reset();
                });
                ResetWorldObjectCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.WorldObject.Reset();
                });
                ResetItemCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Loot.Pickup.Reset();
                });
                ResetItemRulesCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Loot.ItemRules.Reset();
                });
                ReloadScriptRulesCommand = new RelayCommand(
                    (parameter) =>
                {
                    try
                    {
                        _Model.CopyTo(_OriginalModel);
                        _OriginalModel.Save();
                        if (Trinity.StashRule == null)
                        {
                            Trinity.StashRule = new ItemRules.Interpreter();
                        }

                        if (Trinity.StashRule != null)
                        {
                            BotMain.PauseWhile(Trinity.StashRule.reloadFromUI);
                        }
                    }
                    catch (Exception ex)
                    {
                        Logger.Log("Exception in ReloadScriptRulesCommand: {0}", ex);
                    }
                }
                    );
                ResetTownRunCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Loot.TownRun.Reset();
                });
                ResetAdvancedCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Advanced.Reset();
                });
                ResetNotificationCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Notification.Reset();
                });

                ResetAllCommand = new RelayCommand(
                    (parameter) =>
                {
                    _Model.Reset();
                });
            }
            catch (Exception ex)
            {
                Logger.LogError("Exception initializing commands {0}", ex);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes the Reset commands.
        /// </summary>
        private void InitializeResetCommand()
        {
            ResetMiscCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.Misc.Reset();
            });
            ResetBarbCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.Barbarian.Reset();
                _Model.Combat.AvoidanceRadius.Reset();
            });
            ResetMonkCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.Monk.Reset();
                _Model.Combat.AvoidanceRadius.Reset();
            });
            ResetWizardCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.Wizard.Reset();
                _Model.Combat.AvoidanceRadius.Reset();
            });
            ResetWitchDoctorCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.WitchDoctor.Reset();
                _Model.Combat.AvoidanceRadius.Reset();
            });
            ResetDemonHunterCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Combat.DemonHunter.Reset();
                _Model.Combat.AvoidanceRadius.Reset();
            });
            ResetWorldObjectCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.WorldObject.Reset();
            });
            ResetItemCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Loot.Pickup.Reset();
            });
            ResetItemRulesCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Loot.ItemRules.Reset();
            });
            ReloadScriptRulesCommand = new RelayCommand(
                (parameter) =>
            {
                BotMain.PauseWhile(GilesTrinity.StashRule.reloadFromUI);
            }
                );
            ResetTownRunCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Loot.TownRun.Reset();
            });
            ResetAdvancedCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Advanced.Reset();
            });
            ResetNotificationCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Notification.Reset();
            });

            ResetAllCommand = new RelayCommand(
                (parameter) =>
            {
                _Model.Reset();
            });
        }