static bool checkTOU() { var v = (int)Application.UserAppDataRegistry.GetValue("TermOfUse", 0); if (v != 1) { using (var f = new LicenseDialog()) { var r = f.ShowDialog(); if (r != DialogResult.Yes) { Application.Exit(); return false; } } Application.UserAppDataRegistry.SetValue("TermOfUse", 1, RegistryValueKind.DWord); } return true; }
static bool checkTOU() { var v = (int)Application.UserAppDataRegistry.GetValue("TermOfUse", 0); if (v != 1) { using (var f = new LicenseDialog()) { var r = f.ShowDialog(); if (r != DialogResult.Yes) { Application.Exit(); return(false); } } Application.UserAppDataRegistry.SetValue("TermOfUse", 1, RegistryValueKind.DWord); } return(true); }