示例#1
0
 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);
 }
示例#2
0
 private void tbxImageLocation_TextChanged(object sender, EventArgs e)
 {
     _locationValidationResult = FormValidation.validateLocation(tbxImageLocation, eprLocationWarning);
 }
示例#3
0
 private void tbxGlideNo_TextChanged(object sender, EventArgs e)
 {
     _glideNumberValidationResult = FormValidation.validateGlideNumber(tbxGlideNo, eprGlideNumberWarning, eprGlideNumberError);
 }
示例#4
0
 private void tbxOperationId_TextChanged(object sender, EventArgs e)
 {
     _operationIdValidationResult = FormValidation.validateOperationId(tbxOperationId, eprOperationIdWarning, eprOperationIdError);
 }
示例#5
0
 private void tbxMapTitle_TextChanged(object sender, EventArgs e)
 {
     _titleValidationResult = FormValidation.validateMapTitle(tbxMapTitle, eprMaptitleWarning, eprMapTitleError);
 }
示例#6
0
 private void tbxLanguage_TextChanged(object sender, EventArgs e)
 {
     _languageValidationResult = FormValidation.validateLanguage(tbxLanguage, eprLanguageWarning, eprLanguageError);
 }
示例#7
0
 private void tbxImageAccessNotes_TextChanged(object sender, EventArgs e)
 {
     _accessNoteValidationResult = FormValidation.validateAccessNote(tbxImageAccessNotes, eprAccessNoteWarning);
 }
示例#8
0
 private void cboStatus_TextChanged(object sender, EventArgs e)
 {
     _statusValidationResult = FormValidation.validateStatus(cboStatus, eprStatusWarning);
 }
示例#9
0
 private void tbxDate_TextChanged(object sender, EventArgs e)
 {
     _dateValidationResult = FormValidation.validateDate(tbxDate, eprDateWarning, eprDateError);
 }
示例#10
0
 private void tbxTime_TextChanged(object sender, EventArgs e)
 {
     _timeValidationResult = FormValidation.validateTime(tbxTime, eprTimeWarning, eprTimeError);
 }
示例#11
0
 private void tbxPaperSize_TextChanged(object sender, EventArgs e)
 {
     _paperSizeValidationResult = FormValidation.validatePaperSize(tbxPaperSize, eprPaperWarning, eprPaperError);
 }
示例#12
0
 private void tbxDataSources_TextChanged(object sender, EventArgs e)
 {
     _dataSourcesValidationResult = FormValidation.validateDataSources(tbxDataSources, eprDataSourcesWarning, eprDataSourcesError);
 }
示例#13
0
 private void tbxImageDate_TextChanged(object sender, EventArgs e)
 {
     _imageryDateValidationResult = FormValidation.validateImageryDate(tbxImageDate, eprImageryDate);
 }
示例#14
0
 private void tbxMapSummary_TextChanged(object sender, EventArgs e)
 {
     _summaryValidationResult = FormValidation.validateMapSummary(tbxMapSummary, eprMapSummaryWarning, eprMapSummaryError);
 }
示例#15
0
 private void cboTheme_TextChanged(object sender, EventArgs e)
 {
     _themeValidationResult = FormValidation.validateTheme(cboTheme, eprThemeWarning);
 }
示例#16
0
 private void tbxCountries_TextChanged(object sender, EventArgs e)
 {
     _countriesValidationResult = FormValidation.validateCountries(tbxCountries, eprCountriesWarning);
 }
示例#17
0
 private void tbxScale_TextChanged(object sender, EventArgs e)
 {
     _scaleValidationResult = FormValidation.validateScale(tbxScale, eprScaleWarning, eprScaleError);
 }
示例#18
0
 private void cboAccess_TextChanged(object sender, EventArgs e)
 {
     _accessValidationResult = FormValidation.validateAccess(cboAccess, eprAccessWarning);
 }
示例#19
0
 private void tbxProjection_TextChanged(object sender, EventArgs e)
 {
     _projectionValidationResult = FormValidation.validateProjection(tbxProjection, eprProjectionWarning, eprProjectionError);
 }
示例#20
0
 private void cboQualityControl_TextChanged(object sender, EventArgs e)
 {
     _qualityControlValidationResult = FormValidation.validateQualityControl(cboQualityControl, eprQualityControlWarning);
 }
示例#21
0
 private void tbxDatum_TextChanged(object sender, EventArgs e)
 {
     _datumValidationResult = FormValidation.validateDatum(tbxDatum, eprDatumWarning, eprDatumError);
 }
示例#22
0
 private void tbxMapDocument_TextChanged(object sender, EventArgs e)
 {
     _mapDocumentValidationResult = FormValidation.validateMapDocument(tbxMapDocument, eprMapDocumentWarning, eprMapDocumentError);
 }
示例#23
0
        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);
        }