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;
}
}