private void metroLink1_Click(object sender, EventArgs e) { if (formmenu == null) { formmenu = new MainMenuForm(); } this.Visible = false; formmenu.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { try { conn.Connect(); if (conn.DbAuthentication(this, metroTextBox1.Text)) { MainMenuForm form2 = new MainMenuForm(); form2.Show(); Hide(); } } catch (Exception) { throw; } finally { conn.Disconnect(); } }