Пример #1
0
        private void GeometricEffectLinePage_Load(object sender, EventArgs e)
        {
            if (base.m_pGeometricEffect == null)
            {
                base.m_pGeometricEffect = new BasicLineSymbolClass();
            }
            int graphicAttributeCount =
                ((base.m_pGeometricEffect as IBasicLineSymbol).Stroke as IGraphicAttributes).GraphicAttributeCount;
            IGraphicAttributes stroke = (base.m_pGeometricEffect as IBasicLineSymbol).Stroke as IGraphicAttributes;
            int    attrId             = stroke.get_ID(0);
            string str = stroke.get_Name(attrId);

            this.textBox1.Text = stroke.get_Value(attrId).ToString();
            this.textBox1.Tag  = attrId;
            attrId             = stroke.get_ID(1);
            str = stroke.get_Name(attrId);
            this.comboBox1.SelectedIndex = (int)stroke.get_Value(attrId);
            this.comboBox1.Tag           = attrId;
            attrId = stroke.get_ID(2);
            str    = stroke.get_Name(attrId);
            this.comboBox2.SelectedIndex = (int)stroke.get_Value(attrId);
            this.comboBox2.Tag           = attrId;
            attrId = stroke.get_ID(3);
            str    = stroke.get_Name(attrId);
            object obj2 = stroke.get_Value(attrId);

            this.symbolItem1.Symbol = obj2;
            this.symbolItem1.Tag    = attrId;
            this.m_CanDo            = true;
        }
Пример #2
0
 private void solidColorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.m_CanDo = false;
     if (!this.solidColorToolStripMenuItem.Checked)
     {
         this.solidColorToolStripMenuItem.Checked = true;
         this.hatchToolStripMenuItem.Checked      = false;
         this.gradientToolStripMenuItem.Checked   = false;
         IFillPattern       pattern    = new SolidColorPatternClass();
         IGraphicAttributes attributes = pattern as IGraphicAttributes;
         int    attrId = attributes.get_ID(0);
         string str    = attributes.get_Name(attrId);
         this.symbolItem1.Tag    = attrId;
         this.symbolItem1.Symbol = attributes.get_Value(attrId);
         this.panel1.Visible     = true;
         this.panel4.Visible     = false;
         this.panel3.Visible     = false;
         int height = this.panel2.Bottom + this.panel1.Height;
         base.Size = new Size(base.Width, height);
         try
         {
             (base.m_pGeometricEffect as IBasicFillSymbol).FillPattern = pattern;
         }
         catch
         {
         }
     }
     this.m_CanDo = true;
 }
Пример #3
0
 private void gradientToolStripMenuItem_Click(object sender, EventArgs e)
 {
     this.m_CanDo = false;
     if (!this.gradientToolStripMenuItem.Checked)
     {
         this.gradientToolStripMenuItem.Checked   = true;
         this.solidColorToolStripMenuItem.Checked = false;
         this.hatchToolStripMenuItem.Checked      = false;
         IFillPattern       pattern    = new GradientPatternClass();
         IGraphicAttributes attributes = pattern as IGraphicAttributes;
         this.panel1.Visible = false;
         this.panel4.Visible = false;
         this.panel3.Visible = true;
         int height = this.panel2.Bottom + this.panel3.Height;
         base.Size = new Size(base.Width, height);
         int    attrId = attributes.get_ID(0);
         string str    = attributes.get_Name(attrId);
         this.symbolItemColor1.Symbol = attributes.get_Value(attrId);
         this.symbolItemColor1.Tag    = attrId;
         attrId = attributes.get_ID(1);
         str    = attributes.get_Name(attrId);
         this.symbolItemColor2.Symbol = attributes.get_Value(attrId);
         this.symbolItemColor2.Tag    = attrId;
         attrId                       = attributes.get_ID(2);
         str                          = attributes.get_Name(attrId);
         this.comboBox1.Tag           = attrId;
         this.comboBox1.SelectedIndex = (int)attributes.get_Value(attrId);
         attrId                       = attributes.get_ID(3);
         str                          = attributes.get_Name(attrId);
         this.comboBox2.Tag           = attrId;
         this.comboBox2.SelectedIndex = (int)attributes.get_Value(attrId);
         attrId                       = attributes.get_ID(4);
         str                          = attributes.get_Name(attrId);
         this.txtInterval.Tag         = attrId;
         this.txtInterval.Text        = attributes.get_Value(attrId).ToString();
         attrId                       = attributes.get_ID(5);
         str                          = attributes.get_Name(attrId);
         this.txtPercent.Tag          = attrId;
         this.txtPercent.Text         = attributes.get_Value(attrId).ToString();
         attrId                       = attributes.get_ID(5);
         str                          = attributes.get_Name(attrId);
         this.txtAngleGrad.Tag        = attrId;
         this.txtAngleGrad.Text       = attributes.get_Value(attrId).ToString();
         try
         {
             (base.m_pGeometricEffect as IBasicFillSymbol).FillPattern = pattern;
         }
         catch
         {
         }
     }
     this.m_CanDo = true;
 }
Пример #4
0
        private void GeometricEffectFillPage_Load(object sender, EventArgs e)
        {
            int    num2;
            string str;
            int    num3;

            if (base.m_pGeometricEffect == null)
            {
                base.m_pGeometricEffect = new BasicFillSymbolClass();
            }
            IGraphicAttributes fillPattern =
                (base.m_pGeometricEffect as IBasicFillSymbol).FillPattern as IGraphicAttributes;

            switch (fillPattern.GraphicAttributeCount)
            {
            case 1:
                num2 = fillPattern.get_ID(0);
                str  = fillPattern.get_Name(num2);
                this.symbolItem1.Symbol = fillPattern.get_Value(num2);
                this.symbolItem1.Tag    = num2;
                this.panel1.Visible     = true;
                this.panel4.Visible     = false;
                this.panel3.Visible     = false;
                num3      = this.panel2.Bottom + this.panel1.Height;
                base.Size = new Size(base.Width, num3);
                this.solidColorToolStripMenuItem.Checked = true;
                break;

            case 5:
                this.panel1.Visible = false;
                this.panel4.Visible = true;
                this.panel3.Visible = false;
                num3      = this.panel2.Bottom + this.panel4.Height;
                base.Size = new Size(base.Width, num3);
                num2      = fillPattern.get_ID(0);
                str       = fillPattern.get_Name(num2);
                this.HatchsymbolItem.Symbol = fillPattern.get_Value(num2);
                this.HatchsymbolItem.Tag    = num2;
                num2 = fillPattern.get_ID(1);
                str  = fillPattern.get_Name(num2);
                this.txtWidth.Text = fillPattern.get_Value(num2).ToString();
                this.txtWidth.Tag  = num2;
                num2 = fillPattern.get_ID(2);
                str  = fillPattern.get_Name(num2);
                this.txtAngle.Text = fillPattern.get_Value(num2).ToString();
                this.txtAngle.Tag  = num2;
                num2 = fillPattern.get_ID(3);
                str  = fillPattern.get_Name(num2);
                this.txtStep.Text = fillPattern.get_Value(num2).ToString();
                this.txtStep.Tag  = num2;
                num2 = fillPattern.get_ID(4);
                str  = fillPattern.get_Name(num2);
                this.txtOffset.Text = fillPattern.get_Value(num2).ToString();
                this.txtOffset.Tag  = num2;
                this.hatchToolStripMenuItem.Checked = true;
                break;

            case 7:
                this.panel1.Visible = false;
                this.panel4.Visible = false;
                this.panel3.Visible = true;
                num3      = this.panel2.Bottom + this.panel3.Height;
                base.Size = new Size(base.Width, num3);
                num2      = fillPattern.get_ID(0);
                str       = fillPattern.get_Name(num2);
                this.symbolItemColor1.Symbol = fillPattern.get_Value(num2);
                this.symbolItemColor1.Tag    = num2;
                num2 = fillPattern.get_ID(1);
                str  = fillPattern.get_Name(num2);
                this.symbolItemColor2.Symbol = fillPattern.get_Value(num2);
                this.symbolItemColor2.Tag    = num2;
                num2 = fillPattern.get_ID(2);
                str  = fillPattern.get_Name(num2);
                this.comboBox1.SelectedIndex = (int)fillPattern.get_Value(num2);
                this.comboBox1.Tag           = num2;
                num2 = fillPattern.get_ID(3);
                str  = fillPattern.get_Name(num2);
                this.comboBox2.SelectedIndex = (int)fillPattern.get_Value(num2);
                this.comboBox2.Tag           = num2;
                num2 = fillPattern.get_ID(4);
                str  = fillPattern.get_Name(num2);
                this.txtInterval.Text = fillPattern.get_Value(num2).ToString();
                this.txtInterval.Tag  = num2;
                num2 = fillPattern.get_ID(5);
                str  = fillPattern.get_Name(num2);
                this.txtPercent.Text = fillPattern.get_Value(num2).ToString();
                this.txtPercent.Tag  = num2;
                num2 = fillPattern.get_ID(6);
                str  = fillPattern.get_Name(num2);
                this.txtAngleGrad.Text = fillPattern.get_Value(num2).ToString();
                this.txtAngleGrad.Tag  = num2;
                this.gradientToolStripMenuItem.Checked = true;
                break;
            }
            this.m_CanDo = true;
        }