public AllGameSystemsViewModel([NotNull] params GameSystem[] gameSystems) { _allGameSystems = gameSystems; _characterOpener = new CharacterFileInteraction(_allGameSystems, true, _HaveGameSystemLoadChar); _createNewCharacter = new CharacterFileInteraction(_allGameSystems.Where(g => !g.IsReadOnly), false, _HaveGameSystemCreateChar); _currentCharacter = new TrackingNullableProperty<Character>(this, () => Character, () => IsValid, () => CharFileName); OpenCharCommand = new SimpleCommand(Always.Enabled, SwitchCharacter); CreateCharCommand = new SimpleCommand(_HasAtLeastOneWritableGameSystem, CreateNewCharacter); }
public AllGameSystemsViewModel([NotNull] params GameSystem[] gameSystems) { _allGameSystems = gameSystems; _characterOpener = new CharacterFileInteraction(_allGameSystems, true, _HaveGameSystemLoadChar); _createNewCharacter = new CharacterFileInteraction(_allGameSystems.Where(g => !g.IsReadOnly), false, _HaveGameSystemCreateChar); _currentCharacter = new TrackingNullableProperty <Character>(this, () => Character, () => IsValid, () => CharFileName); OpenCharCommand = new SimpleCommand(Always.Enabled, SwitchCharacter); CreateCharCommand = new SimpleCommand(_HasAtLeastOneWritableGameSystem, CreateNewCharacter); }