Ejemplo n.º 1
0
        public StartMenuViewModel(Game game)
        {
            this.game = game;

            storageBlockService = game.Services.GetRequiredService <IStorageBlockService>();
            asyncTaskService    = game.Services.GetRequiredService <IAsyncTaskService>();
            boxIntegration      = (game as BlockViewerGame).BoxIntegration;

            restoreSessionAction     = (state) => boxIntegration.RestoreSession();
            uploadDemoContentsAction = (state) => UploadDemoContents();
        }
Ejemplo n.º 2
0
        public StartMenuViewModel(Game game)
        {
            this.game = game;

            storageBlockService = game.Services.GetRequiredService<IStorageBlockService>();
            asyncTaskService = game.Services.GetRequiredService<IAsyncTaskService>();
            boxIntegration = (game as BlockViewerGame).BoxIntegration;

            restoreSessionAction = (state) => boxIntegration.RestoreSession();
            uploadDemoContentsAction = (state) => UploadDemoContents();
        }
Ejemplo n.º 3
0
        public BoxSetupViewModel(Game game)
        {
            if (game == null) throw new ArgumentNullException("game");

            asyncTaskService = game.Services.GetRequiredService<IAsyncTaskService>();
            boxIntegration = (game as BlockViewerGame).BoxIntegration;

            getTicketAsync = (state) => boxIntegration.GetTicket();
            getAuthTokenAsync = (state) => boxIntegration.GetAuthToken();
            prepareFolderTreeAsync = (state) => boxIntegration.PrepareFolderTree();
            saveSettingsAsync = (state) => boxIntegration.SaveSettings();
        }
Ejemplo n.º 4
0
        public BoxSetupViewModel(Game game)
        {
            if (game == null)
            {
                throw new ArgumentNullException("game");
            }

            asyncTaskService = game.Services.GetRequiredService <IAsyncTaskService>();
            boxIntegration   = (game as BlockViewerGame).BoxIntegration;

            getTicketAsync         = (state) => boxIntegration.GetTicket();
            getAuthTokenAsync      = (state) => boxIntegration.GetAuthToken();
            prepareFolderTreeAsync = (state) => boxIntegration.PrepareFolderTree();
            saveSettingsAsync      = (state) => boxIntegration.SaveSettings();
        }
Ejemplo n.º 5
0
 public ModalDialogService(IServiceProvider serviceProvider, IAsyncTaskService asyncTaskService)
 {
     _serviceProvider  = serviceProvider;
     _asyncTaskService = asyncTaskService;
 }