/// <inheritdoc/> protected override void DeskbandOnClosed() { base.DeskbandOnClosed(); _mainControl.CloseAudioband(); _mainControl.Hide(); _mainControl = null; }
/// <summary> /// Initializes a new instance of the <see cref="Deskband"/> class. /// </summary> public Deskband() { // Assign a fake main window since some libraries require one if (System.Windows.Application.Current?.MainWindow == null) { new System.Windows.Application().MainWindow = new Window(); } AudioBandLogManager.Initialize(); AppDomain.CurrentDomain.UnhandledException += (sender, args) => AudioBandLogManager.GetLogger("AudioBand").Error((Exception)args.ExceptionObject, "Unhandled Exception"); ConfigureDependencies(); _mainControl = _container.GetInstance <MainControl>(); this.Subscribe <FocusChangedMessage>(FocusCaptured); }
/// <summary> /// Initializes a new instance of the <see cref="Deskband"/> class. /// </summary> public Deskband() { AudioBandLogManager.Initialize(); AppDomain.CurrentDomain.UnhandledException += (sender, args) => AudioBandLogManager.GetLogger("AudioBand").Error((Exception)args.ExceptionObject, "Unhandled Exception"); _mainControl = new MainControl(Options, TaskbarInfo); }