Ejemplo n.º 1
0
        public NinjaInfoVM(NinjaVM selectedNinja)
        {
            this.SelectedNinja = selectedNinja;

            ShowInventoryCommand = new RelayCommand(ShowInventoryWindow);
            ShowShopCommand      = new RelayCommand(ShowShopWindow);
        }
Ejemplo n.º 2
0
 public EditNinjaVM(NinjaVM selectedNinja)
 {
     NewName       = selectedNinja.Name;
     NewGold       = selectedNinja.Gold.ToString();
     SelectedNinja = selectedNinja;
     UpdateCommand = new GenericCommand(Edit, CanEdit);
 }
Ejemplo n.º 3
0
        public EditItemVM(NinjaVM selectedNinja, ShopVM shop)
        {
            UpdatedAgility      = shop.SelectedItem.Agility.ToString();
            UpdatedName         = shop.SelectedItem.Name;
            UpdatedPrice        = shop.SelectedItem.Price.ToString();
            UpdatedStrength     = shop.SelectedItem.Strength.ToString();
            UpdatedIntelligence = shop.SelectedItem.Intelligence.ToString();
            UpdatedAgility      = shop.SelectedItem.Agility.ToString();

            this.Shop       = shop;
            _selectedNinja  = selectedNinja;
            UpdatedCategory = shop.SelectedItem.Category;
            EditItemCommand = new RelayCommand(Edit, CanEdit);
        }
Ejemplo n.º 4
0
 public AddNinjaVM(NinjaListVM ninjas)
 {
     _ninjas    = ninjas;
     Ninja      = new NinjaVM();
     AddCommand = new GenericCommand(Add, CanAdd);
 }
Ejemplo n.º 5
0
        public InventoryVM(NinjaVM selectedNinja)
        {
            SelectedNinja = selectedNinja;

            ClearInventoryCommand = new GenericCommand(Clear, CanClear);
        }