public MiniPlayerPlaylist(DopamineWindow parent, IPlaybackService playbackService, IRegionManager regionManager, IEventAggregator eventAggregator) { InitializeComponent(); this.parent = parent; this.playbackService = playbackService; this.regionManager = regionManager; this.eventAggregator = eventAggregator; SettingsClient.SettingChanged += (_, e) => { if (SettingsClient.IsSettingChanged(e, "Appearance", "ShowWindowBorder")) { this.WindowBorder.BorderThickness = new Thickness((bool)e.SettingValue ? 1 : 0); } }; this.eventAggregator.GetEvent <ToggledCoverPlayerAlignPlaylistVertically>().Subscribe(async alignPlaylistVertically => { this.alignCoverPlayerPlaylistVertically = alignPlaylistVertically; if (this.IsVisible) { await this.SetGeometry(); } }); }
protected override void InitializeShell() { base.InitializeShell(); this.InitializeWCFServices(); Application.Current.MainWindow = (Window)this.Shell; if (SettingsClient.Get <bool>("General", "ShowOobe")) { DopamineWindow oobeWin = Container.Resolve <Oobe>(); // These 2 lines are required to set the RegionManager of the child window. // If we don't do this, regions on child windows are never known by the Shell // RegionManager and navigation doesn't work RegionManager.SetRegionManager(oobeWin, Container.Resolve <IRegionManager>()); RegionManager.UpdateRegions(); // Show the OOBE window. Don't tell the Indexer to start. // It will get a signal to start when the OOBE window closes. LogClient.Info("Showing Oobe screen"); oobeWin.Show(); oobeWin.ForceActivate(); } else { LogClient.Info("Showing Main screen"); Application.Current.MainWindow.Show(); // We're not showing the OOBE screen, tell the IndexingService to start. Container.Resolve <IIndexingService>().RefreshCollectionAsync(); } }
public void SetApplicationWindows(DopamineWindow mainWindow, DopamineWindow playlistWindow, Window trayControlsWindow) { if (mainWindow != null) { this.mainWindow = mainWindow; } if (playlistWindow != null) { this.playlistWindow = playlistWindow; } if (trayControlsWindow != null) { this.trayControlsWindow = trayControlsWindow; } }
public MiniPlayerPlaylist(DopamineWindow parent, IPlaybackService playbackService, IRegionManager regionManager, IEventAggregator eventAggregator) { InitializeComponent(); this.parent = parent; this.playbackService = playbackService; this.regionManager = regionManager; this.eventAggregator = eventAggregator; this.eventAggregator.GetEvent <ToggledCoverPlayerAlignPlaylistVertically>().Subscribe(async alignPlaylistVertically => { this.alignCoverPlayerPlaylistVertically = alignPlaylistVertically; if (this.IsVisible) { await this.SetGeometry(); } }); }
private void ShowDialog(DopamineWindow win) { foreach (DopamineWindow dlg in this.openDialogs) { dlg.IsOverlayVisible = true; } this.openDialogs.Add(win); this.DialogVisibleChanged(this.openDialogs.Count > 0); win.ShowDialog(); this.openDialogs.Remove(win); this.DialogVisibleChanged(this.openDialogs.Count > 0); foreach (DopamineWindow dlg in this.openDialogs) { dlg.IsOverlayVisible = false; } }