コード例 #1
0
 /// <summary>
 /// Handles the EditValueChanged event of the cmbFillOutlineColor control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void cmbFillOutlineColor_EditValueChanged(object sender, EventArgs e)
 {
     if (this._styleGalleryItem != null)
     {
         IColor      color      = SymbleAPI.ConvertColorToIColor(cmbFillLineColor.Color);
         IFillSymbol fillSymbol = this._styleGalleryItem.Item as IFillSymbol;
         ILineSymbol outline    = fillSymbol.Outline;
         outline.Color      = color;
         fillSymbol.Outline = outline;
         this.ViewSymble();
     }
 }
コード例 #2
0
        /// <summary>
        /// Handles the EditValueChanged event of the cmbColor control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void cmbColor_EditValueChanged(object sender, EventArgs e)
        {
            if (this._styleGalleryItem != null)
            {
                ColorEdit colorEdit = sender as ColorEdit;
                IColor    color     = SymbleAPI.ConvertColorToIColor(colorEdit.Color);
                switch (this.axSymbologyControl1.StyleClass)
                {
                case esriSymbologyStyleClass.esriStyleClassFillSymbols:
                {
                    IFillSymbol fillSymbol = this._styleGalleryItem.Item as IFillSymbol;
                    fillSymbol.Color = color;
                    break;
                }

                case esriSymbologyStyleClass.esriStyleClassLineSymbols:
                {
                    ILineSymbol lineSymbol = this._styleGalleryItem.Item as ILineSymbol;
                    lineSymbol.Color = color;
                    break;
                }

                case esriSymbologyStyleClass.esriStyleClassMarkerSymbols:
                {
                    IMarkerSymbol markerSymbol = this._styleGalleryItem.Item as IMarkerSymbol;
                    markerSymbol.Color = color;
                    break;
                }

                case esriSymbologyStyleClass.esriStyleClassTextSymbols:
                {
                    ITextSymbol textSymbol = this._styleGalleryItem.Item as ITextSymbol;
                    textSymbol.Color = color;
                    break;
                }
                }
                this.ViewSymble();
            }
        }