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(); }
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."); } }
private void frmCreateInfo_FormClosing(object sender, FormClosingEventArgs e) { frmDisplay frmDisplay = new frmDisplay(file); frmDisplay.Show(); }