public PluginCategoryViewModel(IPresentationManager presentationManager, IInstallationManager installationManager, INavigationService nav, IApplicationHost appHost) { _presentationManager = presentationManager; _installationManager = installationManager; _nav = nav; _appHost = appHost; NavigateCommand = new RelayCommand(Navigate); }
public InstalledPluginListViewModel(IApplicationHost appHost, INavigationService nav, IInstallationManager installationManager, IPresentationManager presentationManager) { _appHost = appHost; _nav = nav; _installationManager = installationManager; _presentationManager = presentationManager; NavigateCommand = new RelayCommand(Navigate); }
public DefaultThemePageMasterCommandsViewModel(INavigationService navigationService, ISessionManager sessionManager, IPresentationManager presentationManager, IApiClient apiClient, ILogger logger, ITheaterApplicationHost appHost, IServerEvents serverEvents, IImageManager imageManager) : base(navigationService, sessionManager, presentationManager, apiClient, logger, appHost, serverEvents) { ImageManager = imageManager; UserCommand = new RelayCommand(i => ShowUserMenu()); LogoutCommand = new RelayCommand(i => Logout()); PowerOptionsEnabled = true; }
public DefaultThemePageContentViewModel(INavigationService navigationService, ISessionManager sessionManager, IApiClient apiClient, IImageManager imageManager, IPresentationManager presentation, IPlaybackManager playbackManager, ILogger logger, IApplicationHost appHost, IServerEvents serverEvents) : base(navigationService, sessionManager, playbackManager, logger, appHost, apiClient, presentation, serverEvents) { _imageManager = imageManager; NavigationService.Navigated += NavigationService_Navigated; SessionManager.UserLoggedIn += SessionManager_UserLoggedIn; SessionManager.UserLoggedOut += SessionManager_UserLoggedOut; UserCommand = new RelayCommand(i => ShowUserMenu()); DisplayPreferencesCommand = new RelayCommand(i => ShowDisplayPreferences()); }
public PageContentViewModel(INavigationService navigationService, ISessionManager sessionManager, IPlaybackManager playbackManager, ILogger logger, IApplicationHost appHost, IApiClient apiClient, IPresentationManager presentationManager, IServerEvents serverEvents) { NavigationService = navigationService; SessionManager = sessionManager; PlaybackManager = playbackManager; Logger = logger; AppHost = appHost; ApiClient = apiClient; PresentationManager = presentationManager; ServerEvents = serverEvents; NavigationService.Navigated += NavigationServiceNavigated; SessionManager.UserLoggedIn += SessionManagerUserLoggedIn; SessionManager.UserLoggedOut += SessionManagerUserLoggedOut; PlaybackManager.PlaybackStarted += PlaybackManager_PlaybackStarted; PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted; SettingsCommand = new RelayCommand(i => NavigationService.NavigateToSettingsPage()); HomeCommand = new RelayCommand(i => NavigationService.NavigateToHomePage()); FullscreenVideoCommand = new RelayCommand(i => NavigationService.NavigateToInternalPlayerPage()); RestartServerCommand = new RelayCommand(i => RestartServer()); RestartApplicationCommand = new RelayCommand(i => RestartApplication()); _dispatcher = Dispatcher.CurrentDispatcher; _clockTimer = new Timer(ClockTimerCallback, null, 0, 10000); IsLoggedIn = SessionManager.CurrentUser != null; var page = NavigationService.CurrentPage; IsOnHomePage = page is IHomePage; IsOnFullscreenVideo = page is IFullscreenVideoPage; ServerEvents.RestartRequired += ServerEvents_RestartRequired; ServerEvents.ServerRestarting += ServerEvents_ServerRestarting; ServerEvents.ServerShuttingDown += ServerEvents_ServerShuttingDown; ServerEvents.Connected += ServerEvents_Connected; AppHost.HasPendingRestartChanged += AppHostHasPendingRestartChanged; RefreshRestartApplicationNotification(); // If already connected, get system info now. RefreshRestartServerNotification(); }
public ImageViewerViewModel(IImageManager imageManager, IEnumerable<ImageViewerImage> initialImages) { ImageStretch = Stretch.Uniform; _images.AddRange(initialImages); _dispatcher = Dispatcher.CurrentDispatcher; _imageManager = imageManager; CustomCommand = new RelayCommand(o => { var img = _currentIndex == -1 ? null : Images[_currentIndex]; if (img != null) { CustomCommandAction(img); } }); FocusedCommand = new RelayCommand(o=> FocusedCommandAction()); }
public MasterCommandsViewModel(INavigationService navigationService, ISessionManager sessionManager, IPresentationManager presentationManager, IApiClient apiClient, ILogger logger, ITheaterApplicationHost appHost, IServerEvents serverEvents) { Dispatcher = Dispatcher.CurrentDispatcher; NavigationService = navigationService; SessionManager = sessionManager; PresentationManager = presentationManager; ApiClient = apiClient; Logger = logger; AppHost = appHost; ServerEvents = serverEvents; ServerEvents.RestartRequired += ServerEvents_RestartRequired; ServerEvents.ServerRestarting += ServerEvents_ServerRestarting; ServerEvents.ServerShuttingDown += ServerEvents_ServerShuttingDown; ServerEvents.Connected += ServerEvents_Connected; AppHost.HasPendingRestartChanged += AppHostHasPendingRestartChanged; SessionManager.UserLoggedIn += SessionManager_UserLoggedIn; SessionManager.UserLoggedOut += SessionManager_UserLoggedOut; NavigationService.Navigated += NavigationService_Navigated; HomeCommand = new RelayCommand(i => GoHome()); SearchCommand = new RelayCommand(i => GoSearch()); FullscreenVideoCommand = new RelayCommand(i => NavigationService.NavigateToInternalPlayerPage()); SettingsCommand = new RelayCommand(i => GoSettings()); GoBackCommand = new RelayCommand(i => GoBack()); RestartServerCommand = new RelayCommand(i => RestartServer()); RestartApplicationCommand = new RelayCommand(i => RestartApplication()); ShutdownApplicationCommand = new RelayCommand(i => ShutdownApplication()); ShutdownSystemCommand = new RelayCommand(i => appHost.ShutdownSystem()); RestartSystemCommand = new RelayCommand(i => appHost.RebootSystem()); SleepSystemCommand = new RelayCommand(i => appHost.SetSystemToSleep()); RefreshRestartServerNotification(); }