private void frmMain_Load(object sender, EventArgs e) { //Populate the form with the xml data if it exists //dlgDefaultValuesOrExistingXml(); //get the preset path from the configuration file string path = MapAction.Utilities.getCrashMoveFolderPath(); string filepath = MapAction.Utilities.getOperationConfigFilePath(); //Check if the config file has been set and if it exists if (@path != "" && !MapAction.Utilities.detectOperationConfig()) { //If not, set the dialog to empty tbxPathToCrashMove.Text = "< File moved or deleted: " + path + " >"; } else if (!MapAction.Utilities.detectOperationConfig()) { //If the path is set and file exists, set the textbox to the path tbxPathToCrashMove.Text = string.Empty; } else if (File.Exists(@filepath)) { //If the path is set and file exists, set the textbox to the path tbxPathToCrashMove.Text = @path; populateDialogExistingConfigXml(@filepath); btnSave.Text = "Update XML"; } else { //If the path is set but doesn't exist, return a message to the user in the directory area tbxPathToCrashMove.Text = "other error"; } //Perform validation checks FormValidation.validateOperationName(tbxOperationName, eprOperationNameWarning); FormValidation.validateGlideNumber(tbxGlideNo, eprGlideNoWarning, eprGlideNoError); FormValidation.validateLanguage(cboLanguage, eprLanguageWarning); FormValidation.validateCountry(cboCountry, eprCountryWarning); FormValidation.validateTimezone(cboTimeZone, eprTimezoneWarning, eprTimezoneError); FormValidation.validateOperationID(tbxOperationId, eprOperationIdWarning); FormValidation.validateOrganisation(tbxSourceOrganisation, eprOrganisationWarning); FormValidation.validateUrl(tbxOrganisationUrl, eprUrlWarning); FormValidation.validatePrimaryEmail(tbxPrimaryEmail, eprPrimaryEmailWarning, eprPrimaryEmailError); FormValidation.validateDisclaimer(tbxDislaimerText, eprDisclaimerWarning); FormValidation.validateDonor(tbxDonorText, eprDonorTextWarning); FormValidation.validateExportPath(tbxExportToolPath, eprExportPath); }
private void tbxExportToolPath_TextChanged(object sender, EventArgs e) { FormValidation.validateExportPath(tbxExportToolPath, eprExportPath); }
private void tbxDonorText_TextChanged(object sender, EventArgs e) { FormValidation.validateDonor(tbxDonorText, eprDonorTextWarning); }
private void tbxDislaimerText_TextChanged(object sender, EventArgs e) { FormValidation.validateDisclaimer(tbxDislaimerText, eprDisclaimerWarning); }
private void tbxOrganisationUrl_TextChanged(object sender, EventArgs e) { FormValidation.validateUrl(tbxOrganisationUrl, eprUrlWarning); }
private void tbxSourceOrganisation_TextChanged(object sender, EventArgs e) { FormValidation.validateOrganisation(tbxSourceOrganisation, eprOrganisationWarning); }
private void tbxOperationId_TextChanged(object sender, EventArgs e) { FormValidation.validateOperationID(tbxOperationId, eprOperationIdWarning); }
private void cboTimeZone_TextChanged(object sender, EventArgs e) { FormValidation.validateTimezone(cboTimeZone, eprTimezoneWarning, eprTimezoneError); }
private void cboCountry_TextChanged(object sender, EventArgs e) { FormValidation.validateCountry(cboCountry, eprCountryWarning); }
private void cboLanguage_TextChanged(object sender, EventArgs e) { FormValidation.validateLanguage(cboLanguage, eprLanguageWarning); }
private void tbxPrimaryEmail_TextChanged(object sender, EventArgs e) { FormValidation.validatePrimaryEmail(tbxPrimaryEmail, eprPrimaryEmailWarning, eprPrimaryEmailError); }
private void tbxGlideNo_TextChanged(object sender, EventArgs e) { FormValidation.validateGlideNumber(tbxGlideNo, eprGlideNoWarning, eprGlideNoError); }
private void tbxOperationName_TextChanged(object sender, EventArgs e) { FormValidation.validateOperationName(tbxOperationName, eprOperationNameWarning); }