private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) { if (!e.Url.ToString().StartsWith("http://jessenic.github.com/")) { WarningForm wf = new WarningForm(); wf.ShowDialog(); if (wf.exit) { wf.Dispose(); DeviceManagerSingleton.Cleanup(); this.Dispose(); } else { wf.Dispose(); } Process.Start(e.Url.ToString()); e.Cancel = true; } }
private void Form1_Shown(object sender, EventArgs e) { if (closeOnStart) closeMainForm(); #if !DEBUG else if (!Settings.Default.HideWarningOnStartup) { WarningForm wf = new WarningForm(); wf.ShowDialog(); if (wf.exit) { wf.Dispose(); closeMainForm(); } else { wf.Dispose(); } } #endif }