示例#1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            Account.Info inputInfo = new Account.Info(txtAccount.Text, txtUsername.Text, txtPassword.Text);
            if (acc.UniqueInfo(inputInfo))
            {
                acc.AddInfo(inputInfo);
            }
            frmDisplay frmDisplay = new frmDisplay(file);

            frmDisplay.Show();
            Hide();
        }
示例#2
0
 private void btnEnter_Click(object sender, EventArgs e)
 {
     if (!acc.Unique(txtUsername.Text))
     {
         acc = new Account(txtUsername.Text);
         if (acc.accountPassword == txtPassword.Text)
         {
             frmDisplay frmDisplay = new frmDisplay(txtUsername.Text);
             frmDisplay.Show();
             Hide();
         }
         else
         {
             MessageBox.Show("Password is incorrect.");
         }
     }
     else
     {
         MessageBox.Show("Username is incorrect.");
     }
 }
示例#3
0
        private void frmCreateInfo_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmDisplay frmDisplay = new frmDisplay(file);

            frmDisplay.Show();
        }