public CoverageProfileTool() { GridProfiles = new List<IFeature>(); profileLayer = new VectorLayer("Profile Layer") { DataSource = new FeatureCollection(GridProfiles, typeof(CoverageProfile)), Visible = true, Style = new VectorStyle { Fill = new SolidBrush (Color.Tomato), Symbol = null, Line = new Pen(Color.Tomato, 2), Outline = new Pen(Color.FromArgb(50, Color.Tomato), 2) }, ShowInTreeView = true, FeatureEditor = new CoverageProfileEditor() }; LayerFilter = l => l.Equals(profileLayer); newLineTool = new NewLineTool(l => l.Equals(profileLayer), "new coverage profile") { AutoCurve = false, MinDistance = 0, IsActive = false }; }
public CoverageProfileTool() { GridProfiles = new List <IFeature>(); profileLayer = new VectorLayer("Profile Layer") { DataSource = new FeatureCollection(GridProfiles, typeof(CoverageProfile)), Visible = true, Style = new VectorStyle { Fill = new SolidBrush(Color.Tomato), Symbol = null, Line = new Pen(Color.Tomato, 2), Outline = new Pen(Color.FromArgb(50, Color.Tomato), 2) }, ShowInTreeView = true, FeatureEditor = new CoverageProfileEditor() }; LayerFilter = l => l.Equals(profileLayer); newLineTool = new NewLineTool(l => l.Equals(profileLayer), "new coverage profile") { AutoCurve = false, MinDistance = 0, IsActive = false }; }
public GridProfileTool(MapControl mapControl) : base(mapControl) { GridProfiles = new List <IFeature>(); VectorLayer profileLayer = new VectorLayer("Profile Layer") { DataSource = new FeatureCollection(GridProfiles, typeof(GridProfile)), Enabled = true, Style = new VectorStyle { Fill = new SolidBrush(Color.Tomato), Symbol = null, Line = new Pen(Color.SteelBlue, 1), Outline = new Pen(Color.FromArgb(50, Color.LightGray), 3) }, Map = mapControl.Map, ShowInTreeView = true }; Layer = profileLayer; newLineTool = new NewLineTool(profileLayer) { MapControl = mapControl, Name = "ProfileLine", AutoCurve = false, MinDistance = 0, IsActive = false }; }
private void AddBranchLayerAndTool() { var branches = new EventedList<IBranch>(); branchLayer.DataSource = new FeatureCollection(branches, typeof(Branch)); //reachLayer.VectorLayer.Name = "reaches"; branchLayer.Enabled = true; branchLayer.Style = new VectorStyle { Fill = new SolidBrush(Color.Tomato), Symbol = null, Line = new Pen(Color.Turquoise, 3) }; mapControl.Map.Layers.Insert(0, branchLayer); var newLineTool = new NewLineTool(branchLayer) {AutoCurve = true, MinDistance = 0}; mapControl.Tools.Add(newLineTool); //newLineTool.EditorLayer = reachLayer; //BranchNodeTopology t = new BranchNodeTopology(); //t.Branches = reachLayer.DataSource; //t.Nodes = nodeLayer.DataSource; // MoveTool.Endoperation += t.endMove(); }
public GridProfileTool(MapControl mapControl) : base(mapControl) { GridProfiles = new List<IFeature>(); VectorLayer profileLayer = new VectorLayer("Profile Layer") { DataSource = new FeatureCollection(GridProfiles, typeof(GridProfile)), Enabled = true, Style = new VectorStyle { Fill = new SolidBrush (Color.Tomato), Symbol = null, Line = new Pen(Color.SteelBlue, 1), Outline = new Pen(Color.FromArgb(50, Color.LightGray), 3) }, Map = mapControl.Map, ShowInTreeView = true }; Layer = profileLayer; newLineTool = new NewLineTool(profileLayer) { MapControl = mapControl, Name = "ProfileLine", AutoCurve = false, MinDistance = 0, IsActive = false }; }
private MapTool AddBranchLayerAndTool() { branchLayer.DataSource = new FeatureCollection((IList)network.Branches, typeof(Branch)); branchLayer.Enabled = true; branchLayer.Style = new VectorStyle { Fill = new SolidBrush(Color.Tomato), Symbol = null, Line = new Pen(Color.Turquoise, 3) }; mapControl.Map.Layers.Insert(0, branchLayer); var newLineTool = new NewLineTool(branchLayer) { AutoCurve = true, MinDistance = 0 }; mapControl.Tools.Add(newLineTool); return newLineTool; }