public WellPointStyleViewModel(WellPointStyle style) : base(style) { HelpKey = "PointStyleHelp"; ActualObject = style; actualPointStyle = style; if (wellSymbolTypeList == null) { wellSymbolTypeList = GetWellSymbolTypeListItems(); } }
protected override Style GetDefaultStyleCore() { int alpha = 255; WellPointStyle style = StyleCandidates.OfType <WellPointStyle>().FirstOrDefault(); if (style != null) { alpha = style.SymbolSolidBrush.Color.AlphaComponent; } var fillColor = new GeoColor(alpha, GeoColorHelper.GetRandomColor()); var outlineColor = new GeoColor(alpha, GeoColor.StandardColors.Black); return(new WellPointStyle(1, new GeoSolidBrush(fillColor), new GeoPen(outlineColor), 8)); }
public WellPointStyleUserControl(WellPointStyle wellPointStyle) { InitializeComponent(); WellPointStyleViewModel pointStyleViewModel = new WellPointStyleViewModel(wellPointStyle); DataContext = pointStyleViewModel; string helpUri = GisEditor.LanguageManager.GetStringResource("PointStyleHelp"); if (!string.IsNullOrEmpty(helpUri)) { HelpUri = new Uri(helpUri); } }
public WellPointStylePlugin() : base() { Name = "Well Point Style"; Description = "The Well Point Style provides robust control over the symbol that you want to use for your point features. You can select a symbol type and size, fill and outline colors, outline thickness and more."; SmallIcon = new BitmapImage(new Uri("/GisEditorPluginCore;component/Images/styles_simplepoint.png", UriKind.RelativeOrAbsolute)); LargeIcon = new BitmapImage(new Uri("/GisEditorPluginCore;component/Images/styles_simplepoint.png", UriKind.RelativeOrAbsolute)); StyleCategories = StyleCategories.Point; Index = StylePluginOrder.WellPointStyle; WellPointStyle pointStyle = new WellPointStyle { Name = "Well Point Style", WellPointIndex = 1, SymbolSize = 8, SymbolSolidBrush = new GeoSolidBrush(GeoColor.FromHtml("#FF4500")), SymbolPen = new GeoPen(GeoColor.StandardColors.Black, 1), }; StyleCandidates.Add(pointStyle); styleOption = new StyleSetting(this); }
private Collection <BitmapImage> GetWellSymbolTypeListItems() { Collection <BitmapImage> images = new Collection <BitmapImage>(); WellPointStyle pointStyle = new WellPointStyle(); pointStyle.SymbolSize = 16; pointStyle.SymbolSolidBrush = new GeoSolidBrush(GeoColor.StandardColors.Black); pointStyle.SymbolPen = new GeoPen(GeoColor.SimpleColors.Black); var bufferUnitNames = Enum.GetValues(typeof(WellPointSymbolType)); foreach (var item in bufferUnitNames) { pointStyle.WellPointIndex = (int)item; pointStyle.XOffsetInPixel = -2; BitmapImage bitmapImage = pointStyle.GetPreviewImage(34, 18); images.Add(bitmapImage); } return(images); }