/// <summary> /// Creates a new instance of PolygonForm class /// </summary> public PolygonForm(IAppContext context, ILegendLayer layer, IGeometryStyle style, bool applyDisabled) : base(context) { if (layer == null) { throw new ArgumentNullException("layer"); } if (style == null) { throw new ArgumentNullException("style"); } InitializeComponent(); _style = style; _metadata = SymbologyPlugin.GetMetadata(layer.Handle); _legend = context.Legend; _layer = layer; _initState = style.Serialize(); _noEvents = true; Initialize(); btnApply.Visible = !applyDisabled; tabControl1.SelectedIndex = _tabPage; }
public CategoriesSubViewModel(ILegendLayer layer, SymbologyMetadata metadata) { if (layer == null) { throw new ArgumentNullException("layer"); } if (metadata == null) { throw new ArgumentNullException("metadata"); } Layer = layer; Metadata = metadata; }
public void Initialize() { _metadata = SymbologyPlugin.GetMetadata(Model.Handle); _featureSet = Model.FeatureSet; var model = new CategoriesSubViewModel(Model, _metadata); _categoriesPresenter.Initialize(model); MapConfig.ForceHideLabels = true; Text = "Layer properties: " + Model.Name; _initState = SaveState(); InitializeCore(); ColorSchemeProvider.SetFirstColorScheme(SchemeTarget.Vector, _featureSet); Shown += OnFormShown; }
internal static void SaveMetadata(int layerHandle, SymbologyMetadata metadata) { var service = _context.Container.Resolve <SymbologyMetadataService>(); service.Save(layerHandle, new SymbologyMetadata()); }