Exemple #1
0
        private void btrChangBorderStlye_Click(object sender, EventArgs e)
        {
            Color pColor;
            frmLegendItemSymbol frmBackColor      = new frmLegendItemSymbol();
            IStyleGalleryItem   pStyleGalleryItem = frmBackColor.GetItem(esriSymbologyStyleClass.esriStyleClassBackgrounds);

            if (pStyleGalleryItem != null)
            {
                m_SymbolBackground = (ISymbolBackground)pStyleGalleryItem.Item;
                pColor             = this.ConvertIRgbColorToColor(((ISymbolBackground )pStyleGalleryItem.Item).FillSymbol.Color as IRgbColor);
            }
            else
            {
                m_SymbolBackground = new SymbolBackgroundClass();
                pColor             = Color.White;
            }
            this.btnBackGroundColor.BackColor = pColor;
            IStyleGalleryClass pStyleGalleryClass = new BackgroundStyleGalleryClassClass();
            Bitmap             pBitmap            = StyleGalleryItemToBmp(this.pictureBox1.Width, this.pictureBox1.Height, pStyleGalleryClass, pStyleGalleryItem);

            this.pictureBox1.Image = pBitmap as Image;
        }
Exemple #2
0
        private void btrChangBorderStlye_Click(object sender, EventArgs e)
        {
            Color pColor;
            frmLegendItemSymbol frmBackColor = new frmLegendItemSymbol();
            IStyleGalleryItem pStyleGalleryItem = frmBackColor.GetItem(esriSymbologyStyleClass.esriStyleClassBackgrounds);
            if (pStyleGalleryItem != null)
            {
                m_SymbolBackground = (ISymbolBackground)pStyleGalleryItem.Item;
                pColor = this.ConvertIRgbColorToColor(((ISymbolBackground )pStyleGalleryItem.Item).FillSymbol .Color as IRgbColor);

            }
            else
            {
                m_SymbolBackground = new SymbolBackgroundClass();
                pColor = Color.White;
            }
            this.btnBackGroundColor.BackColor = pColor;
            IStyleGalleryClass pStyleGalleryClass = new BackgroundStyleGalleryClassClass();
              Bitmap pBitmap = StyleGalleryItemToBmp(this.pictureBox1.Width, this.pictureBox1.Height, pStyleGalleryClass, pStyleGalleryItem);
               this.pictureBox1.Image = pBitmap as Image;
        }