示例#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();
            }
        }
示例#2
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);
            }
        }
示例#3
0
 private void btnUpdateTimezone_Click(object sender, EventArgs e)
 {
     tbxTimezone.Text = LayoutToolAutomatedValues.getConfigTimezone();
 }