Exemple #1
0
        //Gets the automated values for Tab 1 and populates each textbox
        private void btnUpdateAll_Click(object sender, EventArgs e)
        {
            //Call the MapAction class library and the getLayoutElements function that returns a dictionare of the key value
            //pairs of each text element in the layout
            //IMxDocument pMxDoc = ArcMap.Application.Document as IMxDocument;
            Dictionary <string, string> dict = MapAction.PageLayoutProperties.getLayoutTextElements(_pMxDoc, "Main map");

            tbxScale.Text            = tbxScale.Text = updateScale();
            tbxSpatialReference.Text = getSpatialReference();
            tbxMapDocument.Text      = tbxMapDocument.Text = MapAction.PageLayoutProperties.getMxdTitle(ArcMap.Application);
            tbxGlideNumber.Text      = LayoutToolAutomatedValues.getGlideNo();
        }
Exemple #2
0
        //Update disclaimer tab 2 automated  value button

        //Gets the automated values for Tab 2 and populates each textbox
        private void btnUpdateAllTab2_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> dict = MapAction.PageLayoutProperties.getLayoutTextElements(_pMxDoc, "Main map");

            //If the elements are present in the map, update the values
            if (dict.ContainsKey("donor_credit") == true)
            {
                tbxDonorCredit.Text = LayoutToolAutomatedValues.getConfigDonorText();
            }
            if (dict.ContainsKey("timezone") == true)
            {
                tbxTimezone.Text = LayoutToolAutomatedValues.getConfigTimezone();
            }
            if (dict.ContainsKey("map_producer") == true)
            {
                tbxMapProducer.Text = LayoutToolAutomatedValues.getProducedByText();
            }
            if (dict.ContainsKey("disclaimer") == true)
            {
                tbxDisclaimer.Text = LayoutToolAutomatedValues.getConfigDisclaimer();
            }
        }
Exemple #3
0
        public static void validateTimezone(Control control, ErrorProvider eprWarning, ErrorProvider eprError)
        {
            eprWarning.SetIconPadding(control, 33);
            eprError.SetIconPadding(control, 33);
            string automatedValue = LayoutToolAutomatedValues.getConfigTimezone();

            if (validateEmptyField(control, eprWarning))
            {
                if (control.Text.Trim() != automatedValue && control.Text != string.Empty)
                {
                    eprError.SetIconAlignment(control, ErrorIconAlignment.MiddleRight);
                    eprError.SetError(control, "Text differs from automated value");
                }
                else
                {
                    eprError.SetError(control, "");
                }
            }
            else
            {
                eprError.SetError(control, "");
                validateEmptyField(control, eprWarning);
            }
        }
Exemple #4
0
 private void btnGlideNo_Click(object sender, EventArgs e)
 {
     tbxGlideNumber.Text = LayoutToolAutomatedValues.getGlideNo();
 }
Exemple #5
0
 private void btnUpdateDonorCredits_Click(object sender, EventArgs e)
 {
     tbxDonorCredit.Text = LayoutToolAutomatedValues.getConfigDonorText();
 }
Exemple #6
0
 private void btnUpdateOrganisationDetails_Click(object sender, EventArgs e)
 {
     tbxMapProducer.Text = LayoutToolAutomatedValues.getProducedByText();
 }
Exemple #7
0
 private void btnUpdateTimezone_Click(object sender, EventArgs e)
 {
     tbxTimezone.Text = LayoutToolAutomatedValues.getConfigTimezone();
 }
Exemple #8
0
 private void btnUpdateDisclaimer_Click(object sender, EventArgs e)
 {
     tbxDisclaimer.Text = LayoutToolAutomatedValues.getConfigDisclaimer();
 }