public override void LoadChildNodes() { Nodes.Clear(); foreach (Surface surf in ProjectManager.Project.ReferenceSurfaces) { TreeNodeItem nodSurface = new TreeNodeItem(surf, 5, ContextMenuStrip.Container); Nodes.Add(nodSurface); nodSurface.ContextMenuStrip.Items.Insert(1, new ToolStripMenuItem("Calculate Linear Extraction From Profile Route", Properties.Resources.Add, OnLinear)); TreeNodeGroup nodError = new ErrorSurfaceGroup(nodSurface.Nodes, ContextMenuStrip.Container, surf); if (surf.LinearExtractions.Count > 0) { TreeNodeGroup nodLinea = new LinearExtractionGrp(nodSurface.Nodes, surf, surf.Raster.GISFileInfo.Directory, ContextMenuStrip.Container); nodLinea.Expand(); } } if (Nodes.Count > 0) { Expand(); } }
public override void LoadChildNodes() { Nodes.Clear(); List <DEMSurvey> dems = ProjectManager.Project.DEMSurveys; switch (SortOrder) { case SortOrders.AlphaAsc: dems.Sort((a, b) => a.CompareTo(b as GCDProjectItem)); break; case SortOrders.AlphaDsc: dems.Sort((a, b) => - 1 * a.CompareTo(b as GCDProjectItem)); break; case SortOrders.ChronAsc: dems.Sort((a, b) => a.CompareTo(b)); break; case SortOrders.ChronDsc: dems.Sort((a, b) => - 1 * a.CompareTo(b)); break; } foreach (DEMSurvey dem in dems) { TreeNodeItem nodDEM = new TreeNodeTypes.TreeNodeItem(dem, 2, ContextMenuStrip.Container); Nodes.Add(nodDEM); nodDEM.ContextMenuStrip.Items.Insert(1, new ToolStripMenuItem("Calculate Linear Extraction From Profile Route", Properties.Resources.Add, OnLinear)); TreeNodeGroup nodAssoc = new AssocGroup(nodDEM.Nodes, ContextMenuStrip.Container, dem); TreeNodeGroup nodError = new ErrorSurfaceGroup(nodDEM.Nodes, ContextMenuStrip.Container, dem); if (dem.LinearExtractions.Count > 0) { TreeNodeGroup nodLinea = new LinearExtractionGrp(nodDEM.Nodes, dem, dem.LinearExtractions.First().Database.Directory.Parent, ContextMenuStrip.Container); nodLinea.Expand(); } } if (Nodes.Count > 0) { Expand(); } }
public override void LoadChildNodes() { Nodes.Clear(); if (DoD.LinearExtractions.Count > 0) { TreeNodeGroup nodLinea = new LinearExtractionGrp(Nodes, DoD, DoD.Folder, ContextMenuStrip.Container); } foreach (GCDCore.Project.BudgetSegregation bs in DoD.BudgetSegregations) { BudgetSegGroup bsGroup = new BudgetSegGroup(Nodes, bs, ContextMenuStrip.Container); } if (Nodes.Count > 0) { Expand(); } }