Exemple #1
0
 private void OnShowEqualizer(object o, EventArgs args)
 {
     if (EqualizerWindow.Instance == null)
     {
         EqualizerWindow eqwin = new EqualizerWindow(ServiceManager.Get <GtkElementsService> ().PrimaryWindow);
         eqwin.Show();
     }
     else
     {
         EqualizerWindow.Instance.Present();
     }
 }
Exemple #2
0
 public void ShowEqualizer()
 {
     if (HostedWindow.Configuration.ShowFullscreenDialogs)
     {
         AnyListenSettings.Instance.CurrentState.EqualizerIsOpen = !AnyListenSettings.Instance.CurrentState.EqualizerIsOpen;
     }
     else
     {
         if (!_equalizerIsOpen)
         {
             var rect = WindowHelper.GetWindowRectangle(this);
             _equalizerWindow = new EqualizerWindow(rect, ActualWidth);
             _equalizerWindow.Closed += (s, e) => _equalizerIsOpen = false;
             _equalizerWindow.BeginCloseAnimation += (s, e) => Activate();
             _equalizerWindow.Show();
             _equalizerIsOpen = true;
         }
         else
         {
             _equalizerWindow.Activate();
         }
     }
 }