コード例 #1
0
ファイル: SingleSymbol.cs プロジェクト: wushaungluanwu/MYGIS
        private ISymbol GetSymbolByControl(esriGeometryType geometryType)
        {
            GetSymbolByControl symbolForm = null;
            ISymbol            symbol     = null;

            switch (geometryType)
            {
            case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint:
                symbolForm = new GetSymbolByControl(esriSymbologyStyleClass.esriStyleClassMarkerSymbols);
                break;

            case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolyline:
                symbolForm = new GetSymbolByControl(esriSymbologyStyleClass.esriStyleClassLineSymbols);
                break;

            case ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPolygon:
                symbolForm = new GetSymbolByControl(esriSymbologyStyleClass.esriStyleClassFillSymbols);
                break;

            default:
                break;
            }
            symbolForm.ShowDialog();
            if (symbolForm.m_styleGalleryItem != null)
            {
                symbol = symbolForm.m_styleGalleryItem.Item as ISymbol;
            }
            symbolForm.Dispose();
            return(symbol);
        }
コード例 #2
0
        private void btnSelectSymbol_Click(object sender, EventArgs e)
        {
            GetSymbolByControl markerSymbolForm = new GetSymbolByControl(esriSymbologyStyleClass.esriStyleClassMarkerSymbols);

            markerSymbolForm.ShowDialog();
            if (markerSymbolForm.m_styleGalleryItem == null)
            {
                return;
            }
            markerSymbol = markerSymbolForm.m_styleGalleryItem.Item as IMarkerSymbol;
            markerSymbolForm.Dispose();
        }
コード例 #3
0
        private void btnSelectBackColor_Click(object sender, EventArgs e)
        {
            GetSymbolByControl fillSymbolForm = new GetSymbolByControl(esriSymbologyStyleClass.esriStyleClassFillSymbols);

            fillSymbolForm.ShowDialog();
            if (fillSymbolForm.m_styleGalleryItem == null)
            {
                return;
            }
            fillSymbol = fillSymbolForm.m_styleGalleryItem.Item as IFillSymbol;
            fillSymbolForm.Dispose();
        }