static void Main() { DialogResult result; var registry = new RepositoryRegistry(); registry.Configure(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (var loginForm = new LoginUI()) result = loginForm.ShowDialog(); if (result == DialogResult.OK) { Application.Run(new MainUI()); } //Application.Run(new MainUI()); }
private void picLock_Click(object sender, EventArgs e) { var frmLogin = new LoginUI(this); frmLogin.ShowDialog(); }