Esempio n. 1
0
 private void btnMeasuredGridStyle_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             if (this.rdoMeasuredGridStyle.SelectedIndex == 2)
             {
                 selector.SetSymbol(this.imapGrid_0.LineSymbol);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     this.imapGrid_0.LineSymbol = selector.GetSymbol() as ILineSymbol;
                 }
             }
             else if (this.rdoMeasuredGridStyle.SelectedIndex == 1)
             {
                 selector.SetSymbol(this.imapGrid_0.TickMarkSymbol);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     this.imapGrid_0.TickMarkSymbol = selector.GetSymbol() as IMarkerSymbol;
                 }
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 2
0
 private void btnShadowSelector_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             if (this.ishadow_0 != null)
             {
                 selector.SetSymbol(this.ishadow_0);
             }
             else
             {
                 selector.SetSymbol(new SymbolShadowClass());
             }
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 this.bool_0    = false;
                 this.ishadow_0 = selector.GetSymbol() as IShadow;
                 this.method_4();
                 IStyleGalleryItem styleGalleryItemAt =
                     this.cboShadow.GetStyleGalleryItemAt(this.cboShadow.Items.Count - 1);
                 if (styleGalleryItemAt != null)
                 {
                     if (styleGalleryItemAt.Name == "<定制>")
                     {
                         styleGalleryItemAt.Item = this.ishadow_0;
                     }
                     else
                     {
                         styleGalleryItemAt = new MyStyleGalleryItem
                         {
                             Name = "<定制>",
                             Item = this.ishadow_0
                         };
                         this.cboShadow.Add(styleGalleryItemAt);
                         this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1;
                     }
                 }
                 else
                 {
                     styleGalleryItemAt = new MyStyleGalleryItem
                     {
                         Name = "<定制>",
                         Item = this.ishadow_0
                     };
                     this.cboShadow.Add(styleGalleryItemAt);
                     this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1;
                 }
                 this.bool_0 = true;
                 this.method_0();
             }
         }
     }
     catch
     {
     }
 }
 private void btnStyleSelector_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             if (m_pScaleText != null)
             {
                 selector.SetSymbol(m_pScaleText);
             }
             else
             {
                 selector.SetSymbol(new ScaleTextClass());
             }
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 m_pScaleText = selector.GetSymbol() as IScaleText;
                 this.method_0();
                 IStyleGalleryItem styleGalleryItemAt =
                     this.cboStyle.GetStyleGalleryItemAt(this.cboStyle.Items.Count - 1);
                 if (styleGalleryItemAt != null)
                 {
                     if (styleGalleryItemAt.Name == "<定制>")
                     {
                         styleGalleryItemAt.Item = m_pScaleText;
                     }
                     else
                     {
                         styleGalleryItemAt = new MyStyleGalleryItem
                         {
                             Name = "<定制>",
                             Item = m_pScaleText
                         };
                         this.cboStyle.Add(styleGalleryItemAt);
                         this.cboStyle.SelectedIndex = this.cboStyle.Items.Count - 1;
                     }
                 }
                 else
                 {
                     styleGalleryItemAt = new MyStyleGalleryItem
                     {
                         Name = "<定制>",
                         Item = m_pScaleText
                     };
                     this.cboStyle.Add(styleGalleryItemAt);
                     this.cboStyle.SelectedIndex = this.cboStyle.Items.Count - 1;
                 }
                 this.method_4();
                 ScaleTextEventsClass.ScaleTextChage(this);
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 4
0
        private void btnSym_Click(object sender, EventArgs e)
        {
            if (this.btnSym.Style != null)
            {
                frmSymbolSelector selector = new frmSymbolSelector();
                selector.SetSymbol(this.btnSym.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.btnSym.Style = selector.GetSymbol();
                    switch (this.listBox1.SelectedIndex)
                    {
                    case 0:
                        NetworkAnalyst.m_pFlowSymbol.DeterminateFolwArrow = this.btnSym.Style as ISymbol;
                        break;

                    case 1:
                        NetworkAnalyst.m_pFlowSymbol.IndeterminateFolwArrow = this.btnSym.Style as ISymbol;
                        break;

                    case 2:
                        NetworkAnalyst.m_pFlowSymbol.UninitializedFolwArrow = this.btnSym.Style as ISymbol;
                        break;
                    }
                }
            }
        }
Esempio n. 5
0
        private void btnStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if ((this.rdoPointSymbol.Checked || this.rdoLineSymbol.Checked) || !this.rdoFillSymbol.Checked)
            {
            }
            selector.SetStyleGallery(this.istyleGallery_0);
            selector.SetSymbol(this.btnStyle.Style);
            if (selector.ShowDialog() == DialogResult.OK)
            {
                this.btnStyle.Style = selector.GetSymbol();
                if (this.rdoPointSymbol.Checked)
                {
                    this.imarkerSymbol_0 = this.btnStyle.Style as IMarkerSymbol;
                }
                else if (this.rdoLineSymbol.Checked)
                {
                    this.ilineSymbol_0 = this.btnStyle.Style as ILineSymbol;
                }
                else
                {
                    this.ifillSymbol_0 = this.btnStyle.Style as IFillSymbol;
                }
            }
        }
Esempio n. 6
0
 private void btnChangeSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         IFillSymbol       pSym     = this.symbolItem1.Symbol as IFillSymbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(ApplicationBase.StyleGallery);
             selector.SetSymbol(pSym);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 pSym = selector.GetSymbol() as IFillSymbol;
                 this.symbolItem1.Symbol = pSym;
                 this.bool_0             = false;
                 this.method_1(pSym);
                 this.bool_0 = true;
                 this.bool_1 = true;
                 this.method_6(e);
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 7
0
        private void styleButton1_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetSymbol(this.styleButton1.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.styleButton1.Style = selector.GetSymbol();
                    if (this.rdoLine.Checked)
                    {
                        this.ilineSymbol_0 = this.styleButton1.Style as ILineSymbol;
                    }
                    else
                    {
                        this.ifillSymbol_0 = this.styleButton1.Style as IFillSymbol;
                    }
                    this.bool_1 = true;
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Esempio n. 8
0
 private void btnLineSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         ISymbol           pSym     = null;
         if (this.m_FractionTextSymbol.LineSymbol != null)
         {
             pSym = (ISymbol)((IClone)this.m_FractionTextSymbol.LineSymbol).Clone();
         }
         else
         {
             pSym = new SimpleLineSymbolClass();
         }
         selector.SetSymbol(pSym);
         selector.SetStyleGallery(this.m_pSG);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.m_FractionTextSymbol.LineSymbol = selector.GetSymbol() as ILineSymbol;
             this.btnLineSymbol.Style             = this.m_FractionTextSymbol.LineSymbol;
             this.btnLineSymbol.Invalidate();
             this.method_0(e);
         }
     }
     catch
     {
     }
 }
Esempio n. 9
0
 private void styleButton1_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(new MyStyleGallery());
             selector.SetSymbol(this.styleButton1.Style);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 this.styleButton1.Style = selector.GetSymbol();
                 ElementWizardHelp.Style = this.styleButton1.Style;
                 this.bool_1             = true;
                 if (this.OnValueChange != null)
                 {
                     this.OnValueChange();
                 }
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 10
0
 private void btnSymbol_Click(object sender, EventArgs e)
 {
     if (this.chkListRender.SelectedIndex > -1)
     {
         try
         {
             frmSymbolSelector selector = new frmSymbolSelector();
             if (selector != null)
             {
                 selector.SetStyleGallery(this.m_pSG);
                 selector.SetSymbol(this.btnSymbol.Style);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     this.btnSymbol.Style = selector.GetSymbol();
                     IFeatureRenderer renderer =
                         this.ilist_1[this.chkListRender.SelectedIndex] as IFeatureRenderer;
                     (renderer as ISimpleRenderer).Symbol = this.btnSymbol.Style as ISymbol;
                 }
             }
         }
         catch
         {
         }
     }
 }
Esempio n. 11
0
        private void btnStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(ApplicationBase.StyleGallery);
                selector.SetSymbol(this.btnStyle.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.bool_1         = true;
                    this.btnStyle.Style = selector.GetSymbol();
                    if (this.rdoTick.Checked)
                    {
                        this.imarkerSymbol_0 = this.btnStyle.Style as IMarkerSymbol;
                    }
                    else
                    {
                        this.ilineSymbol_0 = this.btnStyle.Style as ILineSymbol;
                    }
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Esempio n. 12
0
        private void btnStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(GridAxisPropertyPage.m_pSG);
                selector.SetSymbol(this.btnStyle.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.btnStyle.Style = selector.GetSymbol();
                    if (this.radioGroup1.SelectedIndex == 0)
                    {
                        this.ilineSymbol_0 = this.btnStyle.Style as ILineSymbol;
                    }
                    else if (this.radioGroup1.SelectedIndex == 1)
                    {
                        this.imarkerSymbol_0 = this.btnStyle.Style as IMarkerSymbol;
                    }
                    this.bool_1 = true;
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Esempio n. 13
0
 private void btnSymbolSelector_Click(object sender, EventArgs e)
 {
     try
     {
         ITextSymbol       labelSymbol = m_pScaleBar.LabelSymbol;
         frmSymbolSelector selector    = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             selector.SetSymbol(labelSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 labelSymbol             = selector.GetSymbol() as ITextSymbol;
                 m_pScaleBar.LabelSymbol = labelSymbol;
                 this.bool_0             = false;
                 this.method_1(labelSymbol);
                 this.bool_0 = true;
                 this.method_4();
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 14
0
 private void btnChangeSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         ILineSymbol       pSym     = this.symbolItem1.Symbol as ILineSymbol;
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(ApplicationBase.StyleGallery);
             selector.SetSymbol(pSym);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 pSym = selector.GetSymbol() as ILineSymbol;
                 this.symbolItem1.Symbol = pSym;
                 this.bool_0             = false;
                 this.method_1(this.colorEdit1, pSym.Color);
                 this.txtWidth.Value = (decimal)pSym.Width;
                 this.bool_0         = true;
                 this.bool_1         = true;
                 this.method_5(e);
             }
         }
     }
     catch (Exception)
     {
     }
 }
Esempio n. 15
0
 private void styleButton1_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(ApplicationBase.StyleGallery);
             selector.SetSymbol(this.styleButton1.Style);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 this.styleButton1.Style         = selector.GetSymbol();
                 this.mapTemplateElement_0.Style = this.styleButton1.Style;
                 this.bool_1 = true;
                 if (this.OnValueChange != null)
                 {
                     this.OnValueChange();
                 }
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 16
0
        private void styleButton1_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(ApplicationBase.StyleGallery);
                selector.SetSymbol(this.styleButton1.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.styleButton1.Style = selector.GetSymbol();
                    if (this.rdoLine.Checked)
                    {
                        this.ilineSymbol_0          = this.styleButton1.Style as ILineSymbol;
                        this.txtOutBorderWidth.Text = (this.ilineSymbol_0.Width * 0.0352777778).ToString("0.##");
                    }
                    else
                    {
                        this.ifillSymbol_0 = this.styleButton1.Style as IFillSymbol;
                    }
                    this.bool_1 = true;
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Esempio n. 17
0
        private bool method_0()
        {
            IActiveView        activeView        = this._context.ActiveView;
            IGraphicsContainer graphicsContainer = activeView.GraphicsContainer;
            bool result;

            if (graphicsContainer == null)
            {
                result = false;
            }
            else
            {
                try
                {
                    frmSymbolSelector frmSymbolSelector = new frmSymbolSelector();
                    if (frmSymbolSelector == null)
                    {
                        result = false;
                        return(result);
                    }
                    IScaleBar scaleBar = new HollowScaleBar();
                    frmSymbolSelector.SetSymbol(scaleBar);
                    frmSymbolSelector.SetStyleGallery(this._context.StyleGallery);
                    if (frmSymbolSelector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        scaleBar = (frmSymbolSelector.GetSymbol() as IScaleBar);
                        if (scaleBar == null)
                        {
                            result = false;
                            return(result);
                        }
                        UID clsid = new UID
                        {
                            Value = "esriCarto.ScaleBar"
                        };
                        IMapFrame mapFrame = graphicsContainer.FindFrame(activeView.FocusMap) as IMapFrame;
                        scaleBar.Units = mapFrame.Map.DistanceUnits;
                        IMapSurroundFrame mapSurroundFrame = mapFrame.CreateSurroundFrame(clsid, scaleBar);
                        IElement          element          = mapSurroundFrame as IElement;
                        IEnvelope         envelope         = new Envelope() as IEnvelope;
                        envelope.PutCoords(2.0, 8.0, 9.0, 10.0);
                        IEnvelope envelope2 = new Envelope() as IEnvelope;
                        scaleBar.QueryBounds(this._context.ActiveView.ScreenDisplay, envelope, envelope2);
                        element.Geometry = envelope2;
                        INewElementOperation newElementOperation = new NewElementOperation();
                        newElementOperation.ActiveView = this._context.ActiveView;
                        newElementOperation.Element    = element;
                        this._context.OperationStack.Do(newElementOperation);
                        result = true;
                        return(result);
                    }
                }
                catch
                {
                }
                result = false;
            }
            return(result);
        }
Esempio n. 18
0
        private void RenderInfoListView_DoubleClick(object sender, EventArgs e)
        {
            int i;

            if (base.SelectedItems.Count > 0)
            {
                Rectangle itemRect = base.GetItemRect(base.SelectedIndices[0]);
                int       int0     = this.int_0;
                int       left     = itemRect.Left;
                int       width    = itemRect.Left;
                for (i = 0; i < base.Columns.Count; i++)
                {
                    left  = width;
                    width = width + base.Columns[i].Width;
                    if ((int0 <= left ? false : int0 < width))
                    {
                        break;
                    }
                }
                if (i == 0)
                {
                    try
                    {
                        frmSymbolSelector _frmSymbolSelector = new frmSymbolSelector();
                        _frmSymbolSelector.SetStyleGallery(this.istyleGallery_0);
                        ListViewItemEx item = base.Items[base.SelectedIndices[0]] as ListViewItemEx;
                        _frmSymbolSelector.SetSymbol(item.Style);
                        if (_frmSymbolSelector.ShowDialog() == DialogResult.OK)
                        {
                            item.Style = _frmSymbolSelector.GetSymbol();
                            this.method_1();
                            base.Invalidate();
                            if (this.onValueChangedHandler_0 != null)
                            {
                                this.onValueChangedHandler_0(base.SelectedIndices[0], item.Style);
                            }
                        }
                    }
                    catch
                    {
                    }
                }
                else if ((base.SelectedItems.Count != 1 ? false : this.ColumnEditables != null) && this.ColumnEditables[i])
                {
                    this.int_2          = i;
                    this.listViewItem_0 = base.SelectedItems[0];
                    TextBox   size   = this.textBox;
                    Rectangle bounds = this.listViewItem_0.Bounds;
                    size.Size = new Size(width - left, bounds.Height);
                    TextBox point = this.textBox;
                    bounds         = this.listViewItem_0.Bounds;
                    point.Location = new System.Drawing.Point(left, bounds.Y);
                    this.textBox.Show();
                    this.textBox.Text = this.listViewItem_0.SubItems[this.int_2].Text;
                    this.textBox.SelectAll();
                    this.textBox.Focus();
                }
            }
        }
Esempio n. 19
0
 private void RenderInfoListView_DoubleClick(object sender, EventArgs e)
 {
     if (base.SelectedItems.Count > 0)
     {
         Rectangle itemRect = base.GetItemRect(base.SelectedIndices[0]);
         int       num      = this.int_0;
         int       left     = itemRect.Left;
         int       num3     = itemRect.Left;
         int       index    = 0;
         while (index < base.Columns.Count)
         {
             left  = num3;
             num3 += base.Columns[index].Width;
             if ((num > left) && (num < num3))
             {
                 break;
             }
             index++;
         }
         if (index != 0)
         {
             if (((base.SelectedItems.Count == 1) && (this.ColumnEditables != null)) &&
                 this.ColumnEditables[index])
             {
                 this.int_2            = index;
                 this.listViewItem_0   = base.SelectedItems[0];
                 this.textBox.Size     = new Size(num3 - left, this.listViewItem_0.Bounds.Height);
                 this.textBox.Location = new System.Drawing.Point(left, this.listViewItem_0.Bounds.Y);
                 this.textBox.Show();
                 this.textBox.Text = this.listViewItem_0.SubItems[this.int_2].Text;
                 this.textBox.SelectAll();
                 this.textBox.Focus();
             }
         }
         else
         {
             try
             {
                 frmSymbolSelector selector = new frmSymbolSelector();
                 selector.SetStyleGallery(ApplicationBase.StyleGallery);
                 ListViewItemEx ex = base.Items[base.SelectedIndices[0]] as ListViewItemEx;
                 selector.SetSymbol(ex.Style);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     ex.Style = selector.GetSymbol();
                     this.method_1();
                     base.Invalidate();
                     if (this.OnValueChanged != null)
                     {
                         this.OnValueChanged(base.SelectedIndices[0], ex.Style);
                     }
                 }
             }
             catch
             {
             }
         }
     }
 }
Esempio n. 20
0
        private bool method_0()
        {
            IActiveView        activeView        = this._context.ActiveView;
            IGraphicsContainer graphicsContainer = activeView.GraphicsContainer;
            bool result;

            if (graphicsContainer == null)
            {
                return(false);
            }

            try
            {
                frmSymbolSelector frmSymbolSelector = new frmSymbolSelector();
                if (frmSymbolSelector == null)
                {
                    return(false);
                }
                INorthArrow northArrow = new MarkerNorthArrow();
                frmSymbolSelector.SetSymbol(northArrow);
                frmSymbolSelector.SetStyleGallery(this._context.StyleGallery);
                if (frmSymbolSelector.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    northArrow = (frmSymbolSelector.GetSymbol() as INorthArrow);
                    if (northArrow == null)
                    {
                        result = false;
                        return(result);
                    }
                    northArrow.Refresh();
                    IEnvelope envelope = new Envelope() as IEnvelope;
                    envelope.PutCoords(5.0, 10.0, 8.0, 13.0);
                    IEnvelope envelope2 = new Envelope() as IEnvelope;
                    northArrow.QueryBounds(this._context.ActiveView.ScreenDisplay, envelope, envelope2);
                    UID clsid = new UID
                    {
                        Value = "esriCarto.MarkerNorthArrow"
                    };
                    IMapFrame         mapFrame         = graphicsContainer.FindFrame(activeView.FocusMap) as IMapFrame;
                    IMapSurroundFrame mapSurroundFrame = mapFrame.CreateSurroundFrame(clsid, northArrow);
                    IElement          element          = mapSurroundFrame as IElement;
                    element.Geometry = envelope2;
                    INewElementOperation operation = new NewElementOperation
                    {
                        ActiveView = this._context.ActiveView,
                        Element    = element
                    };
                    this._context.OperationStack.Do(operation);
                    result = true;
                    return(result);
                }
            }
            catch
            {
            }
            result = false;

            return(result);
        }
Esempio n. 21
0
        private void btnOutlineSymbol_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            selector.SetSymbol(this.btnOutlineSymbol.Style);
            selector.SetStyleGallery(ApplicationBase.StyleGallery);
            if (selector.ShowDialog() == DialogResult.OK)
            {
                this.btnOutlineSymbol.Style = selector.GetSymbol();
            }
        }
Esempio n. 22
0
        private void newSymbolButton1_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            selector.SetStyleGallery(ApplicationBase.StyleGallery);
            selector.SetSymbol(this.ifillSymbol_1);
            if (selector.ShowDialog() == DialogResult.OK)
            {
                this.newSymbolButton1.Style = selector.GetSymbol();
                this.ifillSymbol_1          = this.btnStyle.Style as IFillSymbol;
            }
        }
Esempio n. 23
0
        private void symbolItem1_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            selector.SetSymbol(this.symbolItem1.Symbol);
            selector.SetStyleGallery(frmRepresationRule.m_pSG);
            if (selector.ShowDialog() == DialogResult.OK)
            {
                this.symbolItem1.Symbol = selector.GetSymbol();
                (base.m_pGeometricEffect as IGraphicAttributes).set_Value((int)this.symbolItem1.Tag,
                                                                          selector.GetSymbol());
            }
        }
Esempio n. 24
0
        private void btnSymbolSelector_Click(object sender, EventArgs e)
        {
            try
            {
                frmSymbolSelector selector = new frmSymbolSelector();
                if (selector != null)
                {
                    selector.SetStyleGallery(this.istyleGallery_0);
                    selector.SetSymbol(this.itextSymbol_0);
                    if (selector.ShowDialog() == DialogResult.OK)
                    {
                        this.itextSymbol_0 = selector.GetSymbol() as ITextSymbol;
                        this.esriTextHorizontalAlignment_0 = this.itextSymbol_0.HorizontalAlignment;
                        stdole.IFontDisp font = this.itextElement_0.Symbol.Font;
                        this.txtFontInfo.Text    = font.Name + " " + font.Size.ToString();
                        this.double_0            = this.itextSymbol_0.Angle;
                        this.itextSymbol_0.Angle = 0.0;
                        this.bool_0                 = false;
                        this.txtAngle.Text          = this.double_0.ToString("0.###");
                        this.txtCharacterSpace.Text =
                            (this.itextSymbol_0 as IFormattedTextSymbol).CharacterSpacing.ToString();
                        this.txtLeading.Text = (this.itextSymbol_0 as IFormattedTextSymbol).Leading.ToString("#.##");
                        switch (this.esriTextHorizontalAlignment_0)
                        {
                        case esriTextHorizontalAlignment.esriTHALeft:
                            this.rdoTHALeft.Checked = true;
                            break;

                        case esriTextHorizontalAlignment.esriTHACenter:
                            this.rdoTHACenter.Checked = true;
                            break;

                        case esriTextHorizontalAlignment.esriTHARight:
                            this.rdoTHARight.Checked = true;
                            break;

                        case esriTextHorizontalAlignment.esriTHAFull:
                            this.rdoTHAFul.Checked = true;
                            break;
                        }
                        this.bool_0 = true;
                        this.method_1();
                    }
                }
            }
            catch
            {
            }
        }
Esempio n. 25
0
 private void btnFillSymbol_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         selector.SetStyleGallery(this.m_pSG);
         selector.SetSymbol(this.btnFillSymbol.Style);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             this.btnFillSymbol.Style = selector.GetSymbol();
         }
     }
     catch
     {
     }
 }
Esempio n. 26
0
 private void btnSymbol1Selector_Click(object sender, EventArgs e)
 {
     try
     {
         ISymbol pSym = null;
         if (m_pScaleBar is IScaleLine)
         {
             pSym = (m_pScaleBar as IScaleLine).LineSymbol as ISymbol;
         }
         else if (m_pScaleBar is ISingleFillScaleBar)
         {
             pSym = (m_pScaleBar as ISingleFillScaleBar).FillSymbol as ISymbol;
         }
         else if (m_pScaleBar is IDoubleFillScaleBar)
         {
             pSym = (m_pScaleBar as IDoubleFillScaleBar).FillSymbol1 as ISymbol;
         }
         if (pSym != null)
         {
             frmSymbolSelector selector = new frmSymbolSelector();
             if (selector != null)
             {
                 selector.SetStyleGallery(this.istyleGallery_0);
                 selector.SetSymbol(pSym);
                 if (selector.ShowDialog() == DialogResult.OK)
                 {
                     if (m_pScaleBar is IScaleLine)
                     {
                         (m_pScaleBar as IScaleLine).LineSymbol = selector.GetSymbol() as ILineSymbol;
                     }
                     else if (m_pScaleBar is ISingleFillScaleBar)
                     {
                         (m_pScaleBar as ISingleFillScaleBar).FillSymbol = selector.GetSymbol() as IFillSymbol;
                     }
                     else if (m_pScaleBar is IDoubleFillScaleBar)
                     {
                         (m_pScaleBar as IDoubleFillScaleBar).FillSymbol1 = selector.GetSymbol() as IFillSymbol;
                     }
                     this.method_4();
                 }
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 27
0
        private void btnSubStyle_Click(object sender, EventArgs e)
        {
            frmSymbolSelector selector = new frmSymbolSelector();

            if (selector != null)
            {
                selector.SetStyleGallery(m_pSG);
                selector.SetSymbol(this.btnSubStyle.Style);
                if (selector.ShowDialog() == DialogResult.OK)
                {
                    this.bool_1            = true;
                    this.btnSubStyle.Style = selector.GetSymbol();
                    if (this.OnValueChange != null)
                    {
                        this.OnValueChange();
                    }
                }
            }
        }
Esempio n. 28
0
 private void btnFont_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         selector.SetStyleGallery(this.istyleGallery_0);
         selector.SetSymbol(this.itextSymbol_0);
         if (selector.ShowDialog() == DialogResult.OK)
         {
             IGridLabel labelFormat = this.iindexGrid_0.LabelFormat;
             labelFormat.Font              = this.itextSymbol_0.Font;
             labelFormat.Color             = this.itextSymbol_0.Color;
             this.iindexGrid_0.LabelFormat = labelFormat;
         }
     }
     catch
     {
     }
 }
Esempio n. 29
0
 private void btnIndexGridStyle_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             selector.SetSymbol(this.imapGrid_0.LineSymbol);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 this.imapGrid_0.LineSymbol = selector.GetSymbol() as ILineSymbol;
             }
         }
     }
     catch
     {
     }
 }
Esempio n. 30
0
 private void btnBackground_Click(object sender, EventArgs e)
 {
     try
     {
         frmSymbolSelector selector = new frmSymbolSelector();
         if (selector != null)
         {
             selector.SetStyleGallery(this.istyleGallery_0);
             selector.SetSymbol(this.btnBackground.Style);
             if (selector.ShowDialog() == DialogResult.OK)
             {
                 this.btnBackground.Style = selector.GetSymbol();
                 this.iproportionalSymbolRenderer_0.BackgroundSymbol = this.btnBackground.Style as IFillSymbol;
             }
         }
     }
     catch
     {
     }
 }