コード例 #1
0
ファイル: Main.cs プロジェクト: fossabot/redshift-tray
        private void RedshiftInstance_OnRedshiftQuit(object sender, RedshiftQuitArgs e)
        {
            if (!e.ManualKill)
            {
                Application.Current.Dispatcher.Invoke(() =>
                {
                    MessageBox.Show(string.Format("Redshift crashed with the following output:{0}{0}{1}", Environment.NewLine, e.ErrorOutput), "Redshift Tray", MessageBoxButton.OK, MessageBoxImage.Error);

                    SettingsWindow settingsWindow;
                    if (!Common.WindowExistsFocus(out settingsWindow))
                    {
                        settingsWindow = new SettingsWindow();
                        if ((bool)settingsWindow.ShowDialog())
                        {
                            LoadSettings();
                            StartRedshiftAutomatic();
                        }
                        else
                        {
                            Application.Current.Shutdown(-1);
                        }
                    }
                });
            }
        }
コード例 #2
0
ファイル: redshift.cs プロジェクト: fossabot/redshift-tray
        private void RedshiftQuit(bool manualKill)
        {
            if (OnRedshiftQuit != null)
            {
                RedshiftQuitArgs e = new RedshiftQuitArgs();
                e.ManualKill     = manualKill;
                e.StandardOutput = GetStandardOutput();
                e.ErrorOutput    = GetErrorOutput();

                OnRedshiftQuit(this, e);
            }
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: Nepochal/redshift-tray
        private void RedshiftInstance_OnRedshiftQuit(object sender, RedshiftQuitArgs e)
        {
            if(!e.ManualKill)
              {
            Application.Current.Dispatcher.Invoke(() =>
            {
              MessageBox.Show(string.Format("Redshift crashed with the following output:{0}{0}{1}", Environment.NewLine, e.ErrorOutput), "Redshift Tray", MessageBoxButton.OK, MessageBoxImage.Error);

              SettingsWindow settingsWindow;
              if(!Common.WindowExistsFocus(out settingsWindow))
              {
            settingsWindow = new SettingsWindow();
            if((bool)settingsWindow.ShowDialog())
            {
              LoadSettings();
              StartRedshiftAutomatic();
            }
            else
            {
              Application.Current.Shutdown(-1);
            }
              }
            });
              }
        }
コード例 #4
0
ファイル: redshift.cs プロジェクト: Nepochal/redshift-tray
        private void RedshiftQuit(bool manualKill)
        {
            if(OnRedshiftQuit != null)
              {
            RedshiftQuitArgs e = new RedshiftQuitArgs();
            e.ManualKill = manualKill;
            e.StandardOutput = GetStandardOutput();
            e.ErrorOutput = GetErrorOutput();

            OnRedshiftQuit(this, e);
              }
        }