private void btnSignUp_Click_1(object sender, EventArgs e)
        {
            SignUp sign = new SignUp();

            if (sign.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ActiveUser   = new UserActive(sign.user);
                DialogResult = DialogResult.OK;
                Close();
            }
        }
 public void check()
 {
     foreach (User user in users)
     {
         if (user.UserName == tbUserName.Text)
         {
             flag         = true;
             ActiveUser   = new UserActive(user);
             DialogResult = System.Windows.Forms.DialogResult.OK;
             Close();
         }
     }
     if (!flag)
     {
         MessageBox.Show("Username is not correct!", "Attention!", MessageBoxButtons.OK);
         if (DialogResult == DialogResult.OK)
         {
             Close();
         }
     }
 }