RPS.Config.Config_FormClosing C# (CSharp) Method

Config_FormClosing() public method

public Config_FormClosing ( object sender, FormClosingEventArgs e ) : void
sender object
e FormClosingEventArgs
return void
        public void Config_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (screensaver.action == Screensaver.Actions.Config) {
                this.savePersistantConfig();
                Application.Exit();
            } else if (!this.screensaver.applicationClosing) {
                if (!this.syncMonitors()) {
                    // restart timer in-case sync option has changed.
                    for (int i = 1; i < this.screensaver.monitors.Length; i++) {
                        this.screensaver.monitors[i].timer.Start();
                    }
                }
                //Console.Beep();
                this.Hide();
                e.Cancel = true;
            }
        }