private void tabExportTool_Selected(object sender, TabControlEventArgs e) { //Update the validation summary section images based on the validation status FormValidation.validationCheck(_titleValidationResult, imgTitleStatus); FormValidation.validationCheck(_summaryValidationResult, imgSummaryStatus); FormValidation.validationCheck(_mapDocumentValidationResult, imgDocumentStatus); FormValidation.validationCheck(_datumValidationResult, imgDatumStatus); FormValidation.validationCheck(_projectionValidationResult, imgProjectionStatus); FormValidation.validationCheck(_scaleValidationResult, imgScaleStatus); FormValidation.validationCheck(_dateValidationResult, imgDateStatus); FormValidation.validationCheck(_timeValidationResult, imgTimeStatus); FormValidation.validationCheck(_paperSizeValidationResult, imgPaperSizeStatus); FormValidation.validationCheck(_imageryDateValidationResult, imgImageDateStatus); FormValidation.validationCheck(_dataSourcesValidationResult, imgDataSourcesStatus); FormValidation.validationCheck(_operationIdValidationResult, imgOperationIdStatus); FormValidation.validationCheck(_glideNumberValidationResult, imgGlideNumberStatus); FormValidation.validationCheck(_locationValidationResult, imgLocationStatus); FormValidation.validationCheck(_themeValidationResult, imgThemeStatus); FormValidation.validationCheck(_countriesValidationResult, imgCountriesStatus); FormValidation.validationCheck(_statusValidationResult, imgStatusStatus); FormValidation.validationCheck(_accessValidationResult, imgAccessStatus); FormValidation.validationCheck(_accessNoteValidationResult, imgAccessNoteStatus); FormValidation.validationCheck(_qualityControlValidationResult, imgQualityControlStatus); FormValidation.validationCheck(_languageValidationResult, imgLanguageStatus); }
private void tbxImageLocation_TextChanged(object sender, EventArgs e) { _locationValidationResult = FormValidation.validateLocation(tbxImageLocation, eprLocationWarning); }
private void tbxGlideNo_TextChanged(object sender, EventArgs e) { _glideNumberValidationResult = FormValidation.validateGlideNumber(tbxGlideNo, eprGlideNumberWarning, eprGlideNumberError); }
private void tbxOperationId_TextChanged(object sender, EventArgs e) { _operationIdValidationResult = FormValidation.validateOperationId(tbxOperationId, eprOperationIdWarning, eprOperationIdError); }
private void tbxMapTitle_TextChanged(object sender, EventArgs e) { _titleValidationResult = FormValidation.validateMapTitle(tbxMapTitle, eprMaptitleWarning, eprMapTitleError); }
private void tbxLanguage_TextChanged(object sender, EventArgs e) { _languageValidationResult = FormValidation.validateLanguage(tbxLanguage, eprLanguageWarning, eprLanguageError); }
private void tbxImageAccessNotes_TextChanged(object sender, EventArgs e) { _accessNoteValidationResult = FormValidation.validateAccessNote(tbxImageAccessNotes, eprAccessNoteWarning); }
private void cboStatus_TextChanged(object sender, EventArgs e) { _statusValidationResult = FormValidation.validateStatus(cboStatus, eprStatusWarning); }
private void tbxDate_TextChanged(object sender, EventArgs e) { _dateValidationResult = FormValidation.validateDate(tbxDate, eprDateWarning, eprDateError); }
private void tbxTime_TextChanged(object sender, EventArgs e) { _timeValidationResult = FormValidation.validateTime(tbxTime, eprTimeWarning, eprTimeError); }
private void tbxPaperSize_TextChanged(object sender, EventArgs e) { _paperSizeValidationResult = FormValidation.validatePaperSize(tbxPaperSize, eprPaperWarning, eprPaperError); }
private void tbxDataSources_TextChanged(object sender, EventArgs e) { _dataSourcesValidationResult = FormValidation.validateDataSources(tbxDataSources, eprDataSourcesWarning, eprDataSourcesError); }
private void tbxImageDate_TextChanged(object sender, EventArgs e) { _imageryDateValidationResult = FormValidation.validateImageryDate(tbxImageDate, eprImageryDate); }
private void tbxMapSummary_TextChanged(object sender, EventArgs e) { _summaryValidationResult = FormValidation.validateMapSummary(tbxMapSummary, eprMapSummaryWarning, eprMapSummaryError); }
private void cboTheme_TextChanged(object sender, EventArgs e) { _themeValidationResult = FormValidation.validateTheme(cboTheme, eprThemeWarning); }
private void tbxCountries_TextChanged(object sender, EventArgs e) { _countriesValidationResult = FormValidation.validateCountries(tbxCountries, eprCountriesWarning); }
private void tbxScale_TextChanged(object sender, EventArgs e) { _scaleValidationResult = FormValidation.validateScale(tbxScale, eprScaleWarning, eprScaleError); }
private void cboAccess_TextChanged(object sender, EventArgs e) { _accessValidationResult = FormValidation.validateAccess(cboAccess, eprAccessWarning); }
private void tbxProjection_TextChanged(object sender, EventArgs e) { _projectionValidationResult = FormValidation.validateProjection(tbxProjection, eprProjectionWarning, eprProjectionError); }
private void cboQualityControl_TextChanged(object sender, EventArgs e) { _qualityControlValidationResult = FormValidation.validateQualityControl(cboQualityControl, eprQualityControlWarning); }
private void tbxDatum_TextChanged(object sender, EventArgs e) { _datumValidationResult = FormValidation.validateDatum(tbxDatum, eprDatumWarning, eprDatumError); }
private void tbxMapDocument_TextChanged(object sender, EventArgs e) { _mapDocumentValidationResult = FormValidation.validateMapDocument(tbxMapDocument, eprMapDocumentWarning, eprMapDocumentError); }
private void frmMain_Load(object sender, EventArgs e) { //Form validation methods _titleValidationResult = FormValidation.validateMapTitle(tbxMapTitle, eprMaptitleWarning, eprMapTitleError); _summaryValidationResult = FormValidation.validateMapSummary(tbxMapSummary, eprMapSummaryWarning, eprMapSummaryError); _mapDocumentValidationResult = FormValidation.validateMapDocument(tbxMapDocument, eprMapDocumentWarning, eprMapDocumentError); _datumValidationResult = FormValidation.validateDatum(tbxDatum, eprDatumWarning, eprDatumError); _projectionValidationResult = FormValidation.validateProjection(tbxProjection, eprProjectionWarning, eprProjectionError); _scaleValidationResult = FormValidation.validateScale(tbxScale, eprScaleWarning, eprScaleError); _dateValidationResult = FormValidation.validateDate(tbxDate, eprDateWarning, eprDateError); _timeValidationResult = FormValidation.validateTime(tbxTime, eprTimeWarning, eprTimeError); _paperSizeValidationResult = FormValidation.validatePaperSize(tbxPaperSize, eprPaperWarning, eprPaperError); _imageryDateValidationResult = FormValidation.validateImageryDate(tbxImageDate, eprImageryDate); _dataSourcesValidationResult = FormValidation.validateDataSources(tbxDataSources, eprDataSourcesWarning, eprDataSourcesError); _operationIdValidationResult = FormValidation.validateOperationId(tbxOperationId, eprOperationIdWarning, eprOperationIdError); _glideNumberValidationResult = FormValidation.validateGlideNumber(tbxGlideNo, eprGlideNumberWarning, eprGlideNumberError); _locationValidationResult = FormValidation.validateLocation(tbxImageLocation, eprLocationWarning); _themeValidationResult = FormValidation.validateTheme(cboTheme, eprThemeWarning); _countriesValidationResult = FormValidation.validateCountries(tbxCountries, eprCountriesWarning); _statusValidationResult = FormValidation.validateStatus(cboStatus, eprStatusWarning); _accessValidationResult = FormValidation.validateAccess(cboAccess, eprAccessWarning); _accessNoteValidationResult = FormValidation.validateAccessNote(tbxImageAccessNotes, eprAccessNoteWarning); _qualityControlValidationResult = FormValidation.validateQualityControl(cboQualityControl, eprQualityControlWarning); _languageValidationResult = FormValidation.validateLanguage(tbxLanguage, eprLanguageWarning, eprLanguageError); var dict = new Dictionary <string, string>(); dict = MapAction.PageLayoutProperties.getLayoutTextElements(_pMxDoc, _targetMapFrame); //Update form text boxes with values from the map if (dict.ContainsKey("title")) { tbxMapTitle.Text = dict["title"]; } if (dict.ContainsKey("summary")) { tbxMapSummary.Text = dict["summary"]; } if (dict.ContainsKey("mxd_name")) { tbxMapDocument.Text = dict["mxd_name"]; } if (dict.ContainsKey("data_sources")) { tbxDataSources.Text = dict["data_sources"]; } // Update form values from the config xml var dictXML = new Dictionary <string, string>(); string path = MapAction.Utilities.getCrashMoveFolderPath(); string filePath = path + @"\operation_config.xml"; dictXML = MapAction.Utilities.getOperationConfigValues(filePath); if (dictXML.ContainsKey("GlideNo")) { tbxGlideNo.Text = dictXML["GlideNo"]; } if (dictXML.ContainsKey("Language")) { tbxLanguage.Text = dictXML["Language"]; } if (dictXML.ContainsKey("Country")) { tbxCountries.Text = dictXML["Country"]; } string operational_id = dictXML["OperationId"]; Debug.WriteLine("Op ID: " + operational_id); if (dictXML.ContainsKey("OperationId")) { tbxOperationId.Text = dictXML["OperationId"]; } if (dictXML.ContainsKey("DefaultPathToExportDir")) { tbxExportZipPath.Text = dictXML["DefaultPathToExportDir"]; } if (dictXML.ContainsKey("DefaultJpegResDPI")) { nudJpegResolution.Value = Convert.ToDecimal(dictXML["DefaultJpegResDPI"]); } if (dictXML.ContainsKey("DefaultPdfResDPI")) { nudPdfResolution.Value = Convert.ToDecimal(dictXML["DefaultPdfResDPI"]); } if (dictXML.ContainsKey("DefaultEmfResDPI")) { nudEmfResolution.Value = Convert.ToDecimal(dictXML["DefaultPdfResDPI"]); } // Set the spatial reference information on load var dictSpatialRef = new Dictionary <string, string>(); dictSpatialRef = MapAction.Utilities.getDataFrameSpatialReference(_pMxDoc, _targetMapFrame); tbxDatum.Text = dictSpatialRef["datum"]; tbxProjection.Text = dictSpatialRef["projection"]; // Set the 'metadata' tab elements var date = System.DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"); var time = System.DateTime.Now.ToString("HH:mm"); tbxDate.Text = date; tbxTime.Text = time; tbxPaperSize.Text = MapAction.PageLayoutProperties.getPageSize(_pMxDoc, _targetMapFrame); tbxScale.Text = MapAction.PageLayoutProperties.getScale(_pMxDoc, _targetMapFrame); }