コード例 #1
0
        public ViewGameResultsViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            CloseCommand = new RelayCommand(x => this.Close());

            Height = 400;
            WindowTitle = "View Game Results";
        }
コード例 #2
0
        public PlayerGamesViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            CloseCommand = new RelayCommand(x => Close());
            RenamePlayerCommand = new RelayCommand(x => RenamePlayer(), x => CanRenamePlayer());

            Height = 400;
            Width = 385;
            WindowTitle = "View Player Games";
        }
コード例 #3
0
        public PlayerStatisticsViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            _players = new ObservableCollection<GetPlayerStatisticsDto>(_QueryService.GetPlayerStatistics());

            GamesCommand = new RelayCommand(x => NavigateToGamesView());
            PlayerDoubleClickCommand = new RelayCommand(x => PlayerDoubleClick());

            Height = 400;
            Width = 500;
            WindowTitle = "Player Statistics";
        }
コード例 #4
0
        public ViewGamesListViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            _games = new ObservableCollection<GetGamesListDto>(_QueryService.GetGamesList());

            PlayersCommand = new RelayCommand(x => NavigateToPlayersView());
            AddGameCommand = new RelayCommand(x => AddGame());
            DeleteGameCommand = new RelayCommand(x => DeleteGame(), x => CanDeleteGame());
            GameDoubleClickCommand = new RelayCommand(x => GameDoubleClick());

            Height = 400;
            Width = 385;
            WindowTitle = "View Games";
        }
コード例 #5
0
        public EnterGameResultsViewModel(ICommandService commandService, IQueryService queryService, IMainWindow mainWindow, ILog logger)
            : base(commandService, queryService, mainWindow, logger)
        {
            ResetPlayerCommands();

            AddPlayerCommand = new RelayCommand(x => this.AddPlayer(), x => this.CanAddPlayer());
            DeletePlayerCommand = new RelayCommand(x => this.DeletePlayer(), x => this.CanDeletePlayer());
            SaveGameCommand = new RelayCommand(x => this.SaveGame(), x => this.CanSaveGame());
            CancelCommand = new RelayCommand(x => this.Cancel());

            ClearNewPlayer();

            Height = 400;
            WindowTitle = "Enter Game Results";
        }