예제 #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) { }
예제 #9
0
 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;
 }