public NinjaCreateViewModel(NinjaListViewModel listViewModel, Entities database)
        {
            _loadout       = new Ninja();
            _loadoutName   = "New Ninja";
            _loadoutGold   = 500;
            _listViewModel = listViewModel;
            _database      = database;

            CancelCommand = new RelayCommand(Cancel);
            SaveCommand   = new RelayCommand(Save);
        }
示例#2
0
        public NinjaEditViewModel(NinjaListViewModel listViewModel, Entities database)
        {
            _loadout       = listViewModel.SelectedNinja;
            _loadoutName   = _loadout.Name;
            _loadoutGold   = _loadout.Gold;
            _listViewModel = listViewModel;
            _database      = database;

            CancelCommand = new RelayCommand(Cancel);
            SaveCommand   = new RelayCommand(Save);
        }