Пример #1
0
        private void btnChangeBCStyle_Click(object sender, EventArgs e)
        {
            Color pColor;
            frmLegendItemSymbol frmBolder         = new frmLegendItemSymbol();
            IStyleGalleryItem   pStyleGalleryItem = frmBolder.GetItem(esriSymbologyStyleClass.esriStyleClassBorders);

            if (pStyleGalleryItem != null)
            {
                m_SymbolBorder = (ISymbolBorder)pStyleGalleryItem.Item;
                pColor         = this.ConvertIRgbColorToColor(((ISymbolBorder )pStyleGalleryItem.Item).LineSymbol.Color as IRgbColor);
            }
            else
            {
                m_SymbolBorder = new SymbolBorderClass();
                pColor         = Color.White;
            }
            this.btnBolderColor.BackColor = pColor;
            IStyleGalleryClass pStyleGalleryClass = new BorderStyleGalleryClassClass();
            Bitmap             pBitmap            = StyleGalleryItemToBmp(this.pictureBox2.Width, this.pictureBox2.Height, pStyleGalleryClass, pStyleGalleryItem);

            this.pictureBox2.Image = pBitmap as Image;
        }
Пример #2
0
        private void btnChangeBCStyle_Click(object sender, EventArgs e)
        {
            Color pColor;
            frmLegendItemSymbol frmBolder = new frmLegendItemSymbol();
            IStyleGalleryItem pStyleGalleryItem = frmBolder.GetItem(esriSymbologyStyleClass.esriStyleClassBorders);
            if (pStyleGalleryItem != null)
            {
                m_SymbolBorder = (ISymbolBorder)pStyleGalleryItem.Item;
                pColor = this.ConvertIRgbColorToColor(((ISymbolBorder )pStyleGalleryItem.Item).LineSymbol .Color as IRgbColor);

            }
            else
            {
               m_SymbolBorder = new SymbolBorderClass ();
                pColor = Color.White;
            }
            this.btnBolderColor .BackColor = pColor;
            IStyleGalleryClass pStyleGalleryClass = new BorderStyleGalleryClassClass ();
            Bitmap pBitmap = StyleGalleryItemToBmp(this.pictureBox2.Width, this.pictureBox2.Height, pStyleGalleryClass, pStyleGalleryItem);
            this.pictureBox2.Image = pBitmap as Image;
        }