Пример #1
0
        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
        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
        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
        private void RedshiftQuit(bool manualKill)
        {
            if(OnRedshiftQuit != null)
              {
            RedshiftQuitArgs e = new RedshiftQuitArgs();
            e.ManualKill = manualKill;
            e.StandardOutput = GetStandardOutput();
            e.ErrorOutput = GetErrorOutput();

            OnRedshiftQuit(this, e);
              }
        }