示例#1
0
 private void metroLink1_Click(object sender, EventArgs e)
 {
     if (formmenu == null)
     {
         formmenu = new MainMenuForm();
     }
     this.Visible = false;
     formmenu.Show();
 }
示例#2
0
 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();
     }
 }