public DeRangeApp() { Application.ApplicationExit += new EventHandler(this.OnApplicationExit); setupNotifyIcon(); loadConfigFromIsolatedStorage(); checkOptions(); configWindow = new Forms.DeRange(config, this); }
void Import(bool replace, bool p_warn = false) { Stream importStream = GetImportFile(); bool cont = true; if (importStream != null) { if (replace & p_warn) { cont = MessageBox.Show("Current configuration will be cleared & replaced. OK to continue with import?", "Warning", MessageBoxButtons.YesNo) == DialogResult.Yes; } if (cont) { configWindow.CleanUp(); loadConfig(importStream, replace); configWindow = new Forms.DeRange(config, this); } } }