コード例 #1
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public VMMainPage(
            INavigationService navService,
            IMyCompanyClient clientService,
            IMessageService messageService,
            ITilesService tilesService,
            ISampleDataService sampleDataService,
            IDispatcherService dispatcherService)
        {
            this.navService        = navService;
            this.clientService     = clientService;
            this.messageService    = messageService;
            this.tilesService      = tilesService;
            this.sampleDataService = sampleDataService;
            this.dispatcherService = dispatcherService;

            loader = ResourceLoader.GetForCurrentView();
            InitializeCommands();


            if (base.IsInDesignMode)
            {
                InitializeMockedData();
            }

            if (!base.IsInDesignMode)
            {
                InitializeNotifications();
            }
        }
コード例 #2
0
 public DemoViewModel(ITilesService tilesService)
 {
     random            = new Random();
     this.tilesService = tilesService;
     gameTimer         = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(500)
     };
     gameTimer.Tick += GameTimerOnTick;
 }
コード例 #3
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public VMVisitDetailPage(
            INavigationService navService,
            IMyCompanyClient clientService,
            IMessageService messageService,
            ITilesService tilesService,
            ISampleDataService sampleDataService,
            IStorageService storageService,
            IDispatcherService dispatcherService)
        {
            this.navService        = navService;
            this.clientService     = clientService;
            this.messageService    = messageService;
            this.tilesService      = tilesService;
            this.sampleDataService = sampleDataService;
            this.storageService    = storageService;
            this.dispatcherService = dispatcherService;

            InitializeCommands();
            if (base.IsInDesignMode)
            {
                InitializeMockedData();
            }
        }
コード例 #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="tilesService"></param>
 public DashBoardController(ITilesService tilesService)
 {
     _tilesService = tilesService;
 }
コード例 #5
0
 public WrapperPageViewModel(ITilesService tilesService)
 {
     this.tilesService = tilesService;
     dispatcher        = CoreWindow.GetForCurrentThread().Dispatcher;
     CurrentViewModel  = new GameViewModel(tilesService, new IPlayer[] { new HumanPlayer(), new ComputerPlayer() });
 }
コード例 #6
0
 public GameViewModel(ITilesService tilesService, IList <IPlayer> players)
 {
     this.players      = players;
     this.tilesService = tilesService;
 }