protected TankViewModelBase(CommandBindingCollection commandBindings, ITank tank, HangarViewModel owner)
            : base(commandBindings, tank)
        {
            this.Owner = owner;

            this.BattleTiers = new BattleTiersViewModel(this.Tank.BattleTiers);
            this.Price       = new PriceViewModel(this.Tank.Price, this.Tank.CurrencyType);

            this.InitializeModuleViewModels();

            this.InitializeEquipmentAndConsumableViewModels();

            this.InitializeCrews();

            this.UpdateModificationContext();
        }
예제 #2
0
 public BenchmarkTankViewModel(CommandBindingCollection commandBindings, ITank tank, HangarViewModel owner)
     : base(commandBindings, tank, owner)
 {
 }
예제 #3
0
        public SearchResultItemViewModel(CommandBindingCollection commandBindings, ITankInfo tankInfo, HangarViewModel owner)
        {
            _commandBindings = commandBindings;
            this.Tank        = tankInfo;
            this.Owner       = owner;

            this.SelectTankCommand            = new RelayCommand(() => owner.SelectSearchResultTank(this.Tank));
            this.SelectAsReferenceTankCommand = new RelayCommand(() => owner.SelectSearchResultTankAsReferenceTank(this.Tank));
        }
예제 #4
0
 public static TankViewModelBase CreateTank(CommandBindingCollection commandBindings, ITank tank, HangarViewModel owner)
 {
     if (tank is Tank)
     {
         return(new TankViewModel(commandBindings, (Tank)tank, owner));
     }
     if (tank is BenchmarkTank)
     {
         return(new BenchmarkTankViewModel(commandBindings, tank, owner));
     }
     return(null);
 }