Beispiel #1
0
        private void btnNumberFormat_Click(object sender, EventArgs e)
        {
            frmElementProperty property = new frmElementProperty
            {
                Text = "数字格式属性"
            };
            NumericFormatPropertyPage page = new NumericFormatPropertyPage();

            property.AddPage(page);
            if (property.EditProperties(this.m_pNumberFormat))
            {
                this.m_IsPageDirty = true;
                if (this.OnValueChange != null)
                {
                    this.OnValueChange();
                }
            }
        }
        private void btnProperty_Click(object sender, EventArgs e)
        {
            frmElementProperty property = new frmElementProperty
            {
                Text = "格网标注属性"
            };
            bool flag = false;

            if (this.cboFormat.SelectedIndex == 0)
            {
                NumericFormatPropertyPage page = new NumericFormatPropertyPage();
                property.AddPage(page);
                INumberFormat format = (this.pGridLabel as IFormattedGridLabel).Format;
                flag = property.EditProperties(format);
                if (flag)
                {
                    (this.pGridLabel as IFormattedGridLabel).Format = format;
                }
            }
            else if (this.cboFormat.SelectedIndex == 1)
            {
                MixedLabelPropertyPage page2 = new MixedLabelPropertyPage();
                property.AddPage(page2);
                flag = property.EditProperties(this.pGridLabel);
            }
            else
            {
                CornerGridLabelPropertyPage page3 = new CornerGridLabelPropertyPage();
                property.AddPage(page3);
                PrincipalDigitsLabelPropertyPage page4 = new PrincipalDigitsLabelPropertyPage();
                property.AddPage(page4);
                flag = property.EditProperties(this.pGridLabel);
            }
            if (flag)
            {
                this.m_IsPageDirty = true;
                if (this.OnValueChange != null)
                {
                    this.OnValueChange();
                }
            }
        }