public SoftwareUpdateOverlayViewModel(SettingsViewModel settingsViewModel, ISoftwareUpdate softwareUpdate) : base(settingsViewModel) { SoftwareUpdate = softwareUpdate; this.WhenAnyValue(x => x.IsActive) .Where(x => x) .Subscribe(x => CheckForUpdates()); }
public SoftwareUpdateViewModel(ISoftwareUpdate softwareUpdate) { DisplayName = "check for updates"; SoftwareUpdate = softwareUpdate; this.WhenAnyValue(x => x.IsActive) .Where(x => x) .Subscribe(x => CheckForUpdates()); }
public OptionsMenuViewModel(IPlayShellViewModel playShellViewModel) { _shellViewModel = playShellViewModel; _softwareUpdate = _shellViewModel.SoftwareUpdate; _factory = _shellViewModel.Factory; _settings = _shellViewModel.Settings; OptionsMenu = new OptionsMenu(this); this.SetCommand(x => x.OptionsMenuCommand).Subscribe(x => OptionsMenu.IsOpen = !OptionsMenu.IsOpen); }
public PlayStartupManager(UserSettings settings, IShutdownHandler shutdownHandler, IFirstTimeLicense firstTimeLicense, ISystemInfo systemInfo, IUserSettingsStorage storage, ISoftwareUpdate softwareUpdate, Container container, ICacheManager cacheManager, Cache.ImageFileCache imageFileCache, IPreRequisitesInstaller prerequisitesInstaller, ContactList contactList, IContentManager contentManager, IDialogManager dialogManager, VersionRegistry versionRegistry, Lazy<IUpdateManager> updateManager) : base(systemInfo, cacheManager, dialogManager) { _settings = settings; _shutdownHandler = shutdownHandler; _firstTimeLicense = firstTimeLicense; _softwareUpdate = softwareUpdate; _container = container; _imageFileCache = imageFileCache; _prerequisitesInstaller = prerequisitesInstaller; _contactList = contactList; _contentManager = contentManager; _dialogManager = dialogManager; _versionRegistry = versionRegistry; _updateManager = updateManager; _systemInfo = systemInfo; _storage = storage; }
public PlayStartupManager(UserSettings settings, IShutdownHandler shutdownHandler, IFirstTimeLicense firstTimeLicense, ISystemInfo systemInfo, IUserSettingsStorage storage, ISoftwareUpdate softwareUpdate, Container container, ICacheManager cacheManager, Cache.ImageFileCache imageFileCache, IPreRequisitesInstaller prerequisitesInstaller, ContactList contactList, IContentManager contentManager, IDialogManager dialogManager, VersionRegistry versionRegistry, Lazy <IUpdateManager> updateManager, ISpecialDialogManager specialDialogManager) : base(cacheManager, dialogManager, specialDialogManager) { _settings = settings; _shutdownHandler = shutdownHandler; _firstTimeLicense = firstTimeLicense; _softwareUpdate = softwareUpdate; _container = container; _imageFileCache = imageFileCache; _prerequisitesInstaller = prerequisitesInstaller; _contactList = contactList; _contentManager = contentManager; _dialogManager = dialogManager; _versionRegistry = versionRegistry; _updateManager = updateManager; _systemInfo = systemInfo; _storage = storage; }
public UpdateAvailableCommandHandler(ISoftwareUpdate softwareUpdate) { _softwareUpdate = softwareUpdate; }
public PlayShellViewModel(IPlayStartupManager startupManager, IDialogManager dialogManager, IProcessManager processManager, IEventAggregator eventBus, ISystemInfo systemInfo, Func <NotificationsCenterViewModel> notificationsCenter, IStatusViewModel statusViewModel, SettingsViewModel settings, HomeViewModel home, Lazy <IContentManager> contentManager, Lazy <ContentViewModel> contentLazy, IUpdateManager updateManager, IViewModelFactory factory, ISoftwareUpdate softwareUpdate, ConnectViewModel connect, LocalMachineInfo machineInfo, UserSettings userSettings, IMediator mediator, IRestarter restarter) { _contentLazy = contentLazy; _restarter = restarter; using (this.Bench()) { _startupManager = startupManager; _dialogManager = dialogManager; _processManager = processManager; _eventBus = eventBus; _systemInfo = systemInfo; _contentManager = contentManager; UpdateManager = updateManager; SoftwareUpdate = softwareUpdate; UserSettings = userSettings; _mediator = mediator; _machineInfo = machineInfo; Router = new RoutingState(); Factory = factory; Connect = connect; Home = home; Settings = settings; StatusFlyout = statusViewModel; NotificationsCenter = notificationsCenter(); // TODO: Normally we would do this only on a user action, like when we would open the menu. It would require the Shell button to be separate from the menu though. ProfilesMenu = _mediator.Send(new GetProfilesMenuViewModelQuery()); DisplayName = GetTitle(); DidDetectAVRun = _systemInfo.DidDetectAVRun; SecurityStatus = _startupManager.GetSecurityWarning(); TrayIconContextMenu = new TrayIconContextMenu(this); RecentJumpList = new RecentJumpList(); OptionsMenu = new OptionsMenuViewModel(this); ScreenHistory = new ReactiveList <object>(); Activator = new ViewModelActivator(); Application.Current.Exit += (sender, args) => UpdateManager.Terminate(); Overlay = new OverlayConductor(); this.SetCommand(x => x.TrayIconDoubleclicked).Subscribe(x => SwitchWindowState()); this.SetCommand(x => x.Exit).Subscribe(x => { if (!IsBusy()) { _mediator.Send(new Shutdown()); } }); this.SetCommand(x => x.GoPremiumCommand) .Subscribe(x => BrowserHelper.TryOpenUrlIntegrated(new Uri(CommonUrls.MainUrl, "/gopremium"))); this.SetCommand(x => x.GoPremiumSettingsCommand) .Subscribe( x => BrowserHelper.TryOpenUrlIntegrated(new Uri(CommonUrls.ConnectUrl, "settings/premium"))); this.SetCommand(x => x.SwitchHome).Subscribe(x => SwitchHomeButton()); this.SetCommand(x => x.GoLatestNewsCommand).Subscribe(x => GoLatestNews()); this.SetCommand(x => x.SecuritySuiteCommand).Subscribe(x => BrowserHelper.TryOpenUrlIntegrated( "https://community.withsix.com")); this.SetCommand(x => x.GoBackCommand, this.WhenAnyValue(x => x.CanGoBack)) .Subscribe(GoBack); this.SetCommand(x => x.GoForwardCommand, this.WhenAnyValue(x => x.CanGoForward)) .Subscribe(GoForward); } }