示例#1
0
 public BattlesViewModel(FarmingTools farmingTools)
     : base(farmingTools) 
 {
     AddActionCommand = new DelegateCommand<Object>(AddAction);
     DeleteActionCommand = new DelegateCommand<Object>(DeleteAction);
     ClearActionsCommand = new DelegateCommand(ClearActions);
 }
示例#2
0
 public HealingViewModel(FarmingTools farmingTools)
     : base(farmingTools) 
 {
     AddHealingCommand = new DelegateCommand(AddHealingItem);
     DeleteHealingCommand = new DelegateCommand<Object>(DeleteHealing);
     ClearHealingCommand = new DelegateCommand(ClearHealing);
 }
示例#3
0
 public TargetsViewModel(FarmingTools farmingTools)
     : base(farmingTools)
 {
     this.AddCommand = new DelegateCommand(AddTargetCommand);
     this.DeleteCommand = new DelegateCommand(DeleteTargetCommand);
     this.ClearCommand = new DelegateCommand(ClearTargetsCommand);
 }
示例#4
0
        /// <summary>
        /// A single point of access method that returns a FarmingTools object.
        /// The object returned will be based on the FFACE instance provided or
        /// if no object was previously created, it will create one for you.
        /// </summary>
        /// <param name="fface"></param>
        /// <returns></returns>
        public static FarmingTools GetInstance(FFACE fface)
        {
            if (_farmingTools == null || !_fface.Equals(fface))
            {
                _farmingTools = new FarmingTools(fface);
            }

            return(_farmingTools);
        }
示例#5
0
        /// <summary>
        /// A single point of access method that returns a FarmingTools object.
        /// The object returned will be based on the FFACE instance provided or
        /// if no object was previously created, it will create one for you. 
        /// </summary>
        /// <param name="fface"></param>
        /// <returns></returns>
        public static FarmingTools GetInstance(FFACE fface)
        {
            if (_farmingTools == null || !_fface.Equals(fface))
            {
                _farmingTools = new FarmingTools(fface);
            }

            return _farmingTools;
        }
示例#6
0
        public RoutesViewModel(FarmingTools farmingTools) : base(farmingTools) 
        {
            WaypointRecorder.Tick += new EventHandler(RouteRecorder_Tick);
            WaypointRecorder.Interval = new TimeSpan(0, 0, 1);

            ClearRouteCommand = new DelegateCommand(ClearRoute);
            RecordRouteCommand = new DelegateCommand<Object>(RecordRoute);
            SaveCommand = new DelegateCommand(SaveRoute);
            LoadCommand = new DelegateCommand(LoadRoute);
        }
示例#7
0
        public MainViewModel(FarmingTools farmingTools) : base(farmingTools)
        {
            // Get events from view models to update the status bar's text.
            App.EventAggregator.GetEvent<StatusBarUpdateEvent>().Subscribe((a) => { StatusBarText = a; });

            // Tell the user the program has loaded the player's data
            App.InformUser("Bot Loaded: " + farmingTools.FFACE.Player.Name);
            
            // Create start command handler.
            StartCommand = new DelegateCommand(Start);
        }
示例#8
0
 public RestingViewModel(FarmingTools farmingTools) : base(farmingTools) { }
 public CastingModel(FFACE fface)
 {
     this._fface = fface;
     this._ftools = FarmingTools.GetInstance(fface);
 }
示例#10
0
 public IgnoredViewModel(FarmingTools farmingTools) : base(farmingTools) 
 {
     AddIgnoredUnitCommand = new DelegateCommand(AddIgnoredUnit);
     DeleteIgnoredUnitCommand = new DelegateCommand(DeleteIgnoredUnit);
     ClearIgnoredUnitsCommand = new DelegateCommand(ClearIgnoredUnits);
 }
示例#11
0
 public WeaponsViewModel(FarmingTools farmingTools) : base(farmingTools) 
 {
     SetCommand = new DelegateCommand(SetWeaponSkill);
 }
示例#12
0
 protected ViewModelBase(FarmingTools farmingTools)
 {
     this.ftools = farmingTools;
 }