private void acceptEnabledButton_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (SQLHelper.AddPassword(labelTextBox.Text, passwordTextBox.Text, out bool DBErrorOccured)) { Cursor.Current = Cursors.Default; Close(); } else if (DBErrorOccured) { Cursor.Current = Cursors.Default; Messages.ShowDBErrorMsg(); } else { Cursor.Current = Cursors.Default; Messages.ShowEntryReqMsg(); } }