public PlayerViewModel() { Hero1Model = new HeroViewModel(); Hero2Model = new HeroViewModel(); IsSelectionMode = false; AutoInvokeSkillCommands = new ObservableCollection<SkillCommand>(); ActiveSkillCommands = new ObservableCollection<SkillCommand>(); RulerGivenSkillCommands = new ObservableCollection<SkillCommand>(); PrivateDecks = new ObservableCollection<SpecialDeckViewModel>(); MultiChoiceCommands = new ObservableCollection<ICommand>(); submitCardUsageCommand = new SimpleRelayCommand(SubmitCardUsageCommand); cancelCardUsageCommand = new SimpleRelayCommand(CancelCardUsageCommand); abortCardUsageCommand = new SimpleRelayCommand(AbortCardUsageCommand); cancelSkillSelectionCommand = new SimpleRelayCommand(CancelSkillSelectionCommand) { CanExecuteStatus = true }; SubmitAnswerCommand = DisabledCommand; CancelAnswerCommand = DisabledCommand; AbortAnswerCommand = DisabledCommand; _possibleRoles = new ObservableCollection<Role>(); IsCardChoiceQuestionShown = false; Marks = new ObservableCollection<MarkViewModel>(); StatusMarks = new ObservableCollection<MarkViewModel>(); HandCards = new ObservableCollection<CardViewModel>(); _lastSelectedPlayers = new List<Player>(); _cardsInSwitchMode = new HashSet<CardViewModel>(); }
public PlayerViewModel() { IsSelectionMode = false; AutoInvokeSkillCommands = new ObservableCollection<SkillCommand>(); ActiveSkillCommands = new ObservableCollection<SkillCommand>(); DockedSkillCommands = new ObservableCollection<SkillCommand>(); RulerGivenSkillCommands = new ObservableCollection<SkillCommand>(); HeroSkillNames = new ObservableCollection<string>(); heroNameChars = new ObservableCollection<string>(); PrivateDecks = new ObservableCollection<PrivateDeckViewModel>(); MultiChoiceCommands = new ObservableCollection<ICommand>(); submitCardUsageCommand = new SimpleRelayCommand(SubmitCardUsageCommand); cancelCardUsageCommand = new SimpleRelayCommand(CancelCardUsageCommand); abortCardUsageCommand = new SimpleRelayCommand(AbortCardUsageCommand); SubmitAnswerCommand = DisabledCommand; CancelAnswerCommand = DisabledCommand; AbortAnswerCommand = DisabledCommand; _possibleRoles = new ObservableCollection<Role>(); _updateCardUsageStatusHandler = (o, e) => { _UpdateCardUsageStatus(); }; IsCardChoiceQuestionShown = false; Marks = new ObservableCollection<MarkViewModel>(); StatusMarks = new ObservableCollection<MarkViewModel>(); HandCards = new ObservableCollection<CardViewModel>(); verifierLock = new object(); _lastSelectedPlayers = new List<Player>(); }
private LobbyViewModel() { _chatCache = new List <KeyValuePair <string, string> >(); Rooms = new ObservableCollection <RoomViewModel>(); UpdateRoomCommand = new SimpleRelayCommand(o => UpdateRooms()) { CanExecuteStatus = true }; EnterRoomCommand = new SimpleRelayCommand(o => EnterRoom()) { CanExecuteStatus = true }; StartGameCommand = new SimpleRelayCommand(o => StartGame()) { CanExecuteStatus = false }; SpectateCommand = new SimpleRelayCommand(o => SpectateGame()) { CanExecuteStatus = true }; ReadyCommand = new SimpleRelayCommand(o => PlayerReady()) { CanExecuteStatus = true }; CancelReadyCommand = new SimpleRelayCommand(o => PlayerCancelReady()) { CanExecuteStatus = true }; }
public SeatViewModel() { ExitCommand = new SimpleRelayCommand((o) => { LobbyViewModel.Instance.ExitRoom(); }) { CanExecuteStatus = true }; JoinCommand = new SimpleRelayCommand((o) => { LobbyViewModel.Instance.JoinSeat(this); }) { CanExecuteStatus = true }; CloseCommand = new SimpleRelayCommand((o) => { LobbyViewModel.Instance.CloseSeat(this); }) { CanExecuteStatus = true }; OpenCommand = new SimpleRelayCommand((o) => { LobbyViewModel.Instance.OpenSeat(this); }) { CanExecuteStatus = true }; KickCommand = new SimpleRelayCommand((o) => { LobbyViewModel.Instance.KickPlayer(this); }) { CanExecuteStatus = true }; }
private LobbyViewModel() { Rooms = new ObservableCollection<RoomViewModel>(); CreateRoomCommand = new SimpleRelayCommand(o => CreateRoom()) { CanExecuteStatus = true }; UpdateRoomCommand = new SimpleRelayCommand(o => UpdateRooms()) { CanExecuteStatus = true }; EnterRoomCommand = new SimpleRelayCommand(o => EnterRoom()) { CanExecuteStatus = true }; StartGameCommand = new SimpleRelayCommand(o => StartGame()) { CanExecuteStatus = true }; }
private LobbyViewModel() { _chatCache = new List<KeyValuePair<string, string>>(); Rooms = new ObservableCollection<RoomViewModel>(); CreateRoomCommand = new SimpleRelayCommand(o => CreateRoom()) { CanExecuteStatus = true }; UpdateRoomCommand = new SimpleRelayCommand(o => UpdateRooms()) { CanExecuteStatus = true }; EnterRoomCommand = new SimpleRelayCommand(o => EnterRoom()) { CanExecuteStatus = true }; StartGameCommand = new SimpleRelayCommand(o => StartGame()) { CanExecuteStatus = false }; ReadyCommand = new SimpleRelayCommand(o => PlayerReady()) { CanExecuteStatus = true }; CancelReadyCommand = new SimpleRelayCommand(o => PlayerCancelReady()) { CanExecuteStatus = true}; }
public ReplayControllerViewModel() { SlowDownCommand = new SimpleRelayCommand((o) => { double speed = Controller.Speed; if (speed <= 0.5d) { return; } if (speed == 1.0d) { speed = 0.5d; } else { speed -= 1.0d; } Controller.Speed = speed; OnPropertyChanged("SpeedString"); }) { CanExecuteStatus = true }; SpeedUpCommand = new SimpleRelayCommand((o) => { double speed = Controller.Speed; if (speed >= 8.0) { return; } if (speed == 0.5d) { speed = 1.0d; } else { speed += 1.0d; } Controller.Speed = speed; OnPropertyChanged("SpeedString"); }) { CanExecuteStatus = true }; }
public ReplayControllerViewModel() { SlowDownCommand = new SimpleRelayCommand((o) => { double speed = Controller.Speed; if (speed <= 0.5d) return; if (speed == 1.0d) speed = 0.5d; else speed -= 1.0d; Controller.Speed = speed; OnPropertyChanged("SpeedString"); }) { CanExecuteStatus = true }; SpeedUpCommand = new SimpleRelayCommand((o) => { double speed = Controller.Speed; if (speed >= 8.0) return; if (speed == 0.5d) speed = 1.0d; else speed += 1.0d; Controller.Speed = speed; OnPropertyChanged("SpeedString"); }) { CanExecuteStatus = true }; }