private void InitiateLogInProtocols() { // Executing credential validation protocols before triggering a session or being denied one String message = SystemProtocols.ApplyCredentialsValidationProtocol(usernameTextBox.Text, passwordTextBox.Text); if (message == "INVALID USER") // provided username was not registered in the system { ClearTextBoxBuffer(); usernameTextBox.BackColor = Color.Red; // highlighting incorrect username } else if (message == "INACTIVE USER") // provided username belongs to an inactive/suspended account { MessageBox.Show("This user has been deacivated, please try with a different account."); ClearTextBoxBuffer(); } else if (message == "INCORRECT") // provided credentials were incorrect for that username { passwordTextBox.Text = ""; passwordTextBox.BackColor = Color.Red; // highlighting incorrect password } else // credentials were successfully validated { // Executing correct login protocols for new user session SystemProtocols.ApplyLogInProtocols(usernameTextBox.Text); ClearTextBoxBuffer(); FormsMenuList.loginForm.Hide(); // TODO: replace this with close once program is ancored to splash page // Summon Product Browser Form FormsMenuList.inventorySearchForm = new InventorySearchForm(); FormsMenuList.inventorySearchForm.Show(); } }