示例#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();
            }
        }
 public DemoViewModel(ITilesService tilesService)
 {
     random            = new Random();
     this.tilesService = tilesService;
     gameTimer         = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(500)
     };
     gameTimer.Tick += GameTimerOnTick;
 }
        /// <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;
 }
 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;
 }