//Change Password private void noFocusBorderBtn4_Click(object sender, EventArgs e) { if (materialSingleLineTextField1.Text.Trim(' ').Length != 0 && materialSingleLineTextField2.Text.Trim(' ').Length != 0 && materialSingleLineTextField3.Text.Trim(' ').Length != 0) { if (materialSingleLineTextField3.Text.Trim(' ').Length >= 6) { if (materialSingleLineTextField3.Text == materialSingleLineTextField1.Text) { Networking.ChangePass(materialSingleLineTextField2.Text, materialSingleLineTextField3.Text, form); } else { MetroMessageBox.Show(this, "The password does not match the confirmation.", "Could not change password", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 125); } } else { MetroMessageBox.Show(this, "Your new password has to be at least 6 characters long!", "Could not change password", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 125); } } else { MetroMessageBox.Show(this, "Please make sure your entries are completely and correct!", "Could not change password", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 125); } }