예제 #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();
        }