コード例 #1
0
 protected override void OnSizeChanged(EventArgs e)
 {
     base.OnSizeChanged(e);
     if (WindowState.Equals(FormWindowState.Minimized) && Properties.Settings.Default.MinimizeToTray)
     {
         Hide();
         if (Properties.Settings.Default.FirstTimeTray != false)
         {
             NotifyArea.ShowStatusTray(Languages.Parse("Information"), Languages.Parse("MinimizedToTray"), ToolTipIcon.Info);
             Properties.Settings.Default.FirstTimeTray = false;
             Properties.Settings.Default.Save();
         }
     }
 }
コード例 #2
0
ファイル: BASSControl.cs プロジェクト: walney/KMC
        public static void BASSCloseStream(string message, string title, int type)
        {
            // Reset
            ReleaseResources(false, true);

            // Show message
            if (type == 0)
            {
                if (Properties.Settings.Default.ShowBalloon)
                {
                    MainWindow.Delegate.Invoke((MethodInvoker) delegate {
                        NotifyArea.ShowStatusTray(title, message, ToolTipIcon.Info);
                    });
                }
                else
                {
                    MainWindow.Delegate.Invoke((MethodInvoker) delegate {
                        MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    });
                }
            }
            else
            {
                if (Properties.Settings.Default.ShowBalloon)
                {
                    MainWindow.Delegate.Invoke((MethodInvoker) delegate {
                        NotifyArea.ShowStatusTray(title, message, ToolTipIcon.Info);
                    });
                }
            }

            // Last stuff then BOOPERS
            MainWindow.KMCGlobals.CancellationPendingValue = MainWindow.KMCConstants.IDLE;
            MainWindow.KMCGlobals.CurrentStatusTextString  = null;
            BasicFunctions.PlayConversionStop();
        }