void Frm_disclaimFormClosing(object sender, FormClosingEventArgs e) { if (!agree) { Environment.Exit(0); } else { SettingConfUtils.SetConfig("ShowLicenseStartup", checkBox1.Checked); } }
private static void Main(string[] args) { if (mutex.WaitOne(TimeSpan.Zero, true)) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (SettingConfUtils.GetConfig("ShowLicenseStartup", true)) { Application.Run(new frm_disclaim()); } Application.Run(new MainForm()); mutex.ReleaseMutex(); } else { MessageBox.Show("SharpLNP already running!"); } }
void Button1Click(object sender, EventArgs e) { agree = true; SettingConfUtils.SetConfig("ShowLicenseStartup", checkBox1.Checked); Close(); }