public void chooseMPZP(object sender, RoutedEventArgs args) { acceptedProperties = new NecessaryProperties(); Button source = (Button)sender; WrapPanel panel = (WrapPanel)source.Parent; string text = ""; foreach (UIElement element in panel.Children) { TextBox box = (TextBox)element; if (box.Name.Equals("MPZPName")) { text = box.Text; break; } } this.acceptedProperties.mpzpModels = this.properties.mpzpModels.Where((mpzp) => { object result = null; mpzp.mpzp.TryGetValue(config.getConfig("MPZP", "MPZPId"), out result); return(text.Equals(result.ToString())); }).ToList(); getIntersectedData(); nextPane(); }
public bool getLists() { ResolutionListViewModel dockpane = (ResolutionListViewModel)FrameworkApplication.DockPaneManager.Find(ResolutionListViewModel._dockPaneID); OwnerInfoViewModel pane = ((OwnerInfoViewModel)FrameworkApplication.DockPaneManager.Find(OwnerInfoViewModel._dockPaneID)); user = pane.getUserModel(); this.acceptedProperties = dockpane.getAcceptedModels(); return(collectData()); }
public static void Show(NecessaryProperties properties) { ResolutionListViewModel pane = (ResolutionListViewModel)FrameworkApplication.DockPaneManager.Find(_dockPaneID); if (pane == null) { return; } ((ResolutionListView)pane.Content).emptyListView(); ((ResolutionListView)pane.Content).getModels(properties); pane.Activate(); }
private async void getData(Geometry geometry, GeometryDimension dimension) { properties = new NecessaryProperties(); ArcGIS.Desktop.Mapping.MapView view = ArcGIS.Desktop.Mapping.MapView.Active; var layersTOC = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetLayersAsFlattenedList(); FeatureLayer parcelsLayer = (FeatureLayer)layersTOC.Where((layer) => { return(layer.Name.Contains(config.getConfig("Działki", "parcelsLayer"))); }).First(); var parcels = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetLayersAsFlattenedList(); foreach (var f in parcels) { var feat = f.Name.Equals(config.getConfig("Działki", "parcelsLayer")); if (feat) { this.parcellayer = (FeatureLayer)f; } } this.getParcel(parcelsLayer, geometry, dimension); CIMLineSymbol symbol = new CIMLineSymbol(); symbol.SetColor(ColorFactory.Instance.CreateRGBColor(255, 255, 255, 0)); foreach (ParcelModel parcelModel in properties.parcels) { object result = null; var pointsFromShape = parcelModel.parcel.TryGetValue("Shape", out result); } Polygon shp = null; foreach (Layer layer in layersTOC) { try { FeatureLayer fLayer = (FeatureLayer)layer; if (fLayer.Name.Contains(config.getConfig("MPZP", "MPZPlayer"))) { this.getMPZP(fLayer, geometry, dimension); } else if (fLayer.Name.Contains(config.getConfig("Wydzielenia", "precintLayer"))) { this.getResolution(fLayer, geometry, dimension); } else if (fLayer.Name.Contains(config.getConfig("Obręby", "areaLayer"))) { this.getPrecints(fLayer, geometry, dimension); } }catch (Exception) { } } }
public void fillTextViews(NecessaryProperties properties) { this.properties = properties; try { var i = 0; foreach (MPZPModel currentModel in this.properties.mpzpModels) { createRow(currentModel, i); i++; } }catch (Exception e) { MessageBox.Show("Wybierz działkę"); } }
public void getModels(NecessaryProperties acceptedProperties) { this.propertiesAccepted = acceptedProperties; fillTextBox(); }
public void getView(NecessaryProperties properties) { this.properties = properties; ((ParcelListView)this.Content).fillTextBox(this.properties.parcels); }
protected ParcelListViewModel() { properties = new NecessaryProperties(); config = new Config(); }