Esempio n. 1
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();
            }
        }
Esempio n. 2
0
        public static void validateMapProducer(Control control, ErrorProvider eprWarning, ErrorProvider eprError)
        {
            eprWarning.SetIconPadding(control, 33);
            eprError.SetIconPadding(control, 33);
            string automatedValue = LayoutToolAutomatedValues.getProducedByText();

            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);
            }
        }
Esempio n. 3
0
 private void btnUpdateOrganisationDetails_Click(object sender, EventArgs e)
 {
     tbxMapProducer.Text = LayoutToolAutomatedValues.getProducedByText();
 }