/// <summary> /// Validates the form /// </summary> /// <returns>Returns True if the form is valid</returns> private bool ValidateForm() { bool result = false; bool bValidLineNumber = DeleteLineValidator.ValidateTextBox(lineTXTBX, errorProvider1, "Please enter a valid number", true, false); bool bValidateExText = DeleteLineValidator.ValidateTextBox(folderTXTBX, errorProvider1, "Please select a folder!", false, true);; bool bValidateFolderText = DeleteLineValidator.ValidateTextBox(extensionsTXTBX, errorProvider1, "Please enter a file extension e.g. *.txt", false, false); if (bValidLineNumber && bValidateExText && bValidateFolderText) { result = true; } return(result); }
/// <summary> /// Checks if the folder textbox is valid /// </summary> /// <returns>Returns true if folder textbox is populated</returns> private bool ValidateFolderText() { bool bStatus = DeleteLineValidator.ValidateTextBox(folderTXTBX, errorProvider1, "Please select a folder!", false, true); return(bStatus); }
/// <summary> /// Checks if the line number textbox is valid /// </summary> /// <returns>Returns true if line number textbox is populated</returns> private bool ValidateLineNumberText() { bool bStatus = DeleteLineValidator.ValidateTextBox(lineTXTBX, errorProvider1, "Please enter a valid number", true, false); return(bStatus); }
/// <summary> /// Checks if the File Extension textbox is valid /// </summary> /// <returns>Returns true if File Extension textbox is populated</returns> private bool ValidateExText() { bool bStatus = DeleteLineValidator.ValidateTextBox(extensionsTXTBX, errorProvider1, "Please enter a file extension e.g. *.txt", false, false); return(bStatus); }