Esempio n. 1
0
        private IElement GetElement(IGeometry geometry, double size, esriSimple3DMarkerStyle simple3DMarkerStyle)
        {
            IElement element;

            IMarkerElement markerElement = new MarkerElementClass();

            element = markerElement as IElement;

            ISimpleMarker3DSymbol simpleMarker3DSymbol = new SimpleMarker3DSymbolClass();

            simpleMarker3DSymbol.Style             = simple3DMarkerStyle;
            simpleMarker3DSymbol.ResolutionQuality = GetResolutionQuality();

            IMarkerSymbol markerSymbol = simpleMarker3DSymbol as IMarkerSymbol;

            markerSymbol.Color = ColorSelection.GetColor();
            markerSymbol.Size  = size;

            IMarker3DPlacement marker3DPlacement = markerSymbol as IMarker3DPlacement;

            SetMarker3DPlacement(marker3DPlacement, markerSymbol.Size);

            element.Geometry = geometry;

            markerElement.Symbol = markerSymbol;

            return(element);
        }
 protected override void OnClick()
 {
     if (_colorPalette.IsColorSelected() == true)
     {
         ColorSelection.SetColor(_colorPalette.Red, _colorPalette.Green, _colorPalette.Blue);
     }
 }
Esempio n. 3
0
        private IElement GetElement(IGeometry geometry, double size, esriSimpleMarkerStyle simpleMarkerStyle)
        {
            IElement element;

            IMarkerElement markerElement = new MarkerElementClass();

            element = markerElement as IElement;

            ISimpleMarkerSymbol simpleMarkerSymbol = new SimpleMarkerSymbolClass();

            simpleMarkerSymbol.Style = simpleMarkerStyle;
            simpleMarkerSymbol.Color = ColorSelection.GetColor();
            simpleMarkerSymbol.Size  = size;

            element.Geometry = geometry;

            markerElement.Symbol = simpleMarkerSymbol;

            return(element);
        }
        private IElement GetElement(IGeometry geometry, esriSimpleFillStyle simpleFillStyle)
        {
            IElement element;

            IPolygonElement polygonElement = new PolygonElementClass();

            element = polygonElement as IElement;

            IFillShapeElement fillShapeElement = polygonElement as IFillShapeElement;

            ISimpleFillSymbol simpleFillSymbol = new SimpleFillSymbolClass();

            simpleFillSymbol.Style = simpleFillStyle;
            simpleFillSymbol.Color = ColorSelection.GetColor();

            element.Geometry = geometry;

            fillShapeElement.Symbol = simpleFillSymbol;

            return(element);
        }
Esempio n. 5
0
        private IElement GetElement(IGeometry geometry, double width, esriSimpleLineStyle simpleLineStyle)
        {
            IElement element;

            ILineElement lineElement = new LineElementClass();

            element = lineElement as IElement;

            ISimpleLineSymbol simpleLineSymbol = new SimpleLineSymbolClass();

            simpleLineSymbol.Style = simpleLineStyle;
            simpleLineSymbol.Color = ColorSelection.GetColor();
            simpleLineSymbol.Width = width;

            element.Geometry = geometry;

            ILineSymbol lineSymbol = simpleLineSymbol as ILineSymbol;

            lineElement.Symbol = lineSymbol;

            return(element);
        }
Esempio n. 6
0
        private IElement GetElement(IGeometry geometry, string text, float size)
        {
            IElement element;

            ITextElement textElement = new TextElementClass();

            element = textElement as IElement;

            ITextSymbol textSymbol = new TextSymbolClass();

            textSymbol.Color = ColorSelection.GetColor();
            textSymbol.Size  = Convert.ToDouble(size);
            textSymbol.Font  = GetIFontDisp(size);
            textSymbol.HorizontalAlignment = GetHorizontalAlignment();
            textSymbol.VerticalAlignment   = GetVerticalAlignment();

            element.Geometry = geometry;

            textElement.Symbol = textSymbol;
            textElement.Text   = text;

            return(element);
        }
        public ColorCommand()
        {
            _colorPalette = new ColorPalette();

            ColorSelection.SetColor(_colorPalette.Red, _colorPalette.Green, _colorPalette.Blue);
        }