예제 #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)");
            }
        }
예제 #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.");
 }