Esempio n. 1
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            TrayManager.Init();
            TrayManager.NotifyIconInteracted += (ex) =>
            {
                if (ex.Type == TrayManager.InteractionType.CtxExit)
                {
                    Application.Current.Shutdown();
                    return;
                }

                if (SettingManager.Get("overlayMode"))
                {
                    HotkeyPressed();
                }
                else
                {
                    RestoreWindow();
                }
            };

            if (SettingManager.Get("overlayMode")) // Always show and ready to pop
            {
                TrayManager.Pop("Press CTRL+SHIFT+HOME to toggle the NexDirect overlay...", "NexDirect (Overlay Mode)");
            }
        }
Esempio n. 2
0
 private void _linkerClipboard(string url)
 {
     try
     {
         Clipboard.SetText(url);
     }
     catch (Exception e) { MessageBox.Show("Error copying link to clipboard:\n\n" + e.ToString()); }
     TrayManager.Pop("Beatmap link copied to clipboard.");
 }
Esempio n. 3
0
 protected override void OnClosed(EventArgs e)
 {
     if (SettingManager.Get("overlayMode"))
     {
         HotkeyManager.Unregister(HotkeyManager.GetRuntimeHandle(this)); // unload hotkey stuff
     }
     // unload tray icon to prevent it sticking there
     TrayManager.Unload();
     base.OnClosed(e);
 }