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
        public static void validateGlideNumber(Control control, ErrorProvider eprWarning, ErrorProvider eprError)
        {
            eprWarning.SetIconPadding(control, 33);
            eprError.SetIconPadding(control, 33);
            string automatedValue = LayoutToolAutomatedValues.getGlideNo();

            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 #3
0
 private void btnGlideNo_Click(object sender, EventArgs e)
 {
     tbxGlideNumber.Text = LayoutToolAutomatedValues.getGlideNo();
 }