public LanguageProficiencyViewModel()
        {
            DoStuffCommand = new RelayCommand(DoWork, param => canExecute);

            foreach (var item in AllProficiencies)
            {
                item.PropertyChanged += EnumBase_PropertyChanged;
            }
        }
 public ArmorProficiencyViewModel()
 {
     DoStuffCommand = new RelayCommand(DoWork, param => canExecute);
     ConfirmCommand = new TypeCommand<Window>(ConfirmStuff);
     foreach (var item in AllProficiencies)
     {
         item.PropertyChanged += EnumBase_PropertyChanged;
     }
 }
        public LanguageProficiencyViewModel(ObservableCollection<EnumBase> selectedEnums)
        {
            DoStuffCommand = new RelayCommand(DoWork, param => canExecute);
            ConfirmCommand = new TypeCommand<Window>(ConfirmStuff);
            SelectedProficiencies = selectedEnums;

            foreach (var item in AllProficiencies)
            {
                item.PropertyChanged += EnumBase_PropertyChanged;
            }
            foreach (var item in SelectedProficiencies)
            {
                foreach (var item2 in AllProficiencies)
                {
                    if (item.Description == item2.Description)
                    {
                        item2.IsChecked = true;
                    }
                }
            }
        }
Пример #4
0
        //Constuctor

        public RaceCreationViewModel()
        {
            
            //Test Things
            AddAbilityBonusCommand = new TypeCommand<StackPanel>(AddAbility);
            TestCommand = new RelayCommand(Test, param =>canExecute);
            //Commands
            CreateRaceCommand = new RelayCommand(AddRaceToDB, param =>canExecute);
            AddArmorProficiencyCommand = new RelayCommand(AddArmorProficiencies, param=>canExecute);
            AddWeaponProficiencyCommand = new RelayCommand(AddWeaponProficiencies, param=>canExecute);
            AddToolProficiencyCommand = new RelayCommand(AddToolProficiencies, param=>canExecute);
            AddSkillProficiencyCommand = new RelayCommand(AddSkillProficiencies, param => canExecute);
            AddLanguagesProficiencyCommand = new RelayCommand(AddLanguageProficiencies, param => canExecute);
            ResetAllCommand = new RelayCommand(ResetAll);
            ParentSelectedCommand = new RelayCommand(ParentSelected, param => canExecute);
            ParentToggledCommand = new RelayCommand(ParentToggled, param => canExecute);

            //ViewModels
            WeaponProficiencyViewModel = new WeaponProficiencyViewModel(SelectedWeaponProficiencies);
            ArmorProficiencyViewModel = new ArmorProficiencyViewModel(SelectedArmorProficiencies);
            ToolProficiencyViewModel = new ToolProficiencyViewModel(SelectedToolProficiencies);
            SkillProficiencyViewModel = new SkillProficiencyViewModel(SelectedSkillProficiencies);
            LanguageProficiencyViewModel = new LanguageProficiencyViewModel(SelectedLanguageProficiencies);

            CurrentVM = WeaponProficiencyViewModel;
            PropertyChanged += SelectedParentRace_PropertyChanged;
        }
 // CONSTRUCTORS
 public CharacterCreationViewModel()
 {
     TestCommand = new RelayCommand(Test);
     NewCharacter = new Character();
     //Strength = NewCharacter.Str.Value;
     //Dexterity = NewCharacter.Dex.Value;
     //Constitution = NewCharacter.Con.Value;
     //Intelligence = NewCharacter.Int.Value;
     //Wisdom = NewCharacter.Wis.Value;
     //Charisma = NewCharacter.Chr.Value;
     RaceViewModelTest = new RaceViewModelTest();
     SelectedRace = new Race();
     RaceViewModelTest.TestName = "Changed Name";
     //PropertyChanged += CharacterCreationViewModel_PropertyChanged;
     PropertyChanging +=CharacterCreationViewModel_PropertyChanging;
 }
Пример #6
0
 public TestViewModel()
 {
     ButtonCommand = new RelayCommand(Command);
     SelectedRace = AllRaces[3];
 }