Ejemplo n.º 1
0
        /// <summary>
        /// Refresh the controls according to the underlying object.
        /// </summary>
        public void RefreshView()
        {
            if (classobj == null)
            {
                return;
            }
            // general tab
            this.textBoxName.Text       = classobj.name;
            this.textBoxTitle.Text      = classobj.title;
            this.textBoxExpression.Text = classobj.getExpressionString();
            this.textBoxText.Text       = classobj.getTextString();
            // display tab
            if (classobj.status == mapscript.MS_OFF)
            {
                checkBoxVisible.CheckState = CheckState.Unchecked;
            }
            else
            {
                checkBoxVisible.CheckState = CheckState.Checked;
            }

            checkBoxQueryable.Checked = (classobj.template != null && classobj.template.Length > 0);

            if (classobj.minscaledenom >= 0)
            {
                textBoxMinZoom.Text = classobj.minscaledenom.ToString();
            }
            else
            {
                textBoxMinZoom.Text = "";
            }
            if (classobj.maxscaledenom >= 0)
            {
                textBoxMaxZoom.Text = classobj.maxscaledenom.ToString();
            }
            else
            {
                textBoxMaxZoom.Text = "";
            }

            SetDirty(false);
        }