public void AddGeoTreeNode(NodeType mapNodeType, List<GeoNodePara> clutterNodeParas) { if (clutterNodeParas.Count != 0) { List<GeoTreeNode> treeNode = new List<GeoTreeNode>(); foreach (GeoNodePara para in clutterNodeParas) { GeoTreeNode item = this.GetGeoFolderNodeByName(this.m_DynamicNodeCollection, mapNodeType, para.FolderName); if (item == null) { item = new GeoTreeNode(para.FolderName, LayerIDCreator.GetExclusiveID(), mapNodeType, CheckedState.Checked); this.m_DynamicNodeCollection.Add(item); treeNode.Add(item); } GeoTreeNode node2 = new GeoTreeNode(para.LayerName, para.LayerId, mapNodeType, CheckedState.Checked); foreach (KeyValuePair<int, string> pair in para.ClutterIdNameDict) { int tag = (para.LayerId << 0x10) + ((short) pair.Key); GeoTreeNode node3 = new GeoTreeNode(pair.Value, tag, mapNodeType, CheckedState.Checked); node2.ChildrenNodes.Add(node3); } item.ChildrenNodes.Add(node2); } if (this.OnAddModelNodeEvent != null) { this.OnAddModelNodeEvent(treeNode); } } }
public void AddGeoTreeNode(string name, int id, NodeType type) { GeoTreeNode item = new GeoTreeNode(name, id, type, CheckedState.Checked); this.m_DynamicNodeCollection.Add(item); if (this.OnAddModelNodeEvent != null) { List<GeoTreeNode> treeNode = new List<GeoTreeNode>(); treeNode.Add(item); this.OnAddModelNodeEvent(treeNode); } }
private void AddTreeNode(GeoTreeNode treeNode, NodeType type, CheckedState state) { TreeNode inputNode = new TreeNode(treeNode.Name); inputNode.Tag = treeNode.Tag; inputNode.StateImageIndex = (int) treeNode.CheckedState; this.BuildSubNodes(inputNode, treeNode.ChildrenNodes); TreeNode rootTreeNodeByType = this.GetRootTreeNodeByType(type); if (((type == NodeType.Polygons) || (type == NodeType.Lines)) || (type == NodeType.Points)) { rootTreeNodeByType.Nodes.Add(inputNode); } else { rootTreeNodeByType.Nodes.Insert(0, inputNode); } (this.m_PlaNetTreeNode.TreeView as ITriStateTreeViewContorller).AddNodeDragdropEvent(inputNode, new EventHandler(this.HandleNodeDragdrop)); this.SetDynamicNodeProperties(state, inputNode); this.RefreshParentTreeNode(rootTreeNodeByType, inputNode); }
private bool IsNodeBelongsToMap(GeoTreeNode node) { NodeType nodeType = node.NodeType; return (((((nodeType == NodeType.Clutter) || (nodeType == NodeType.Heights)) || ((nodeType == NodeType.Buildings) || (nodeType == NodeType.Text))) || ((nodeType == NodeType.Geometry) || (nodeType == NodeType.Image))) || (nodeType == NodeType.Vector)); }
private TreeNode CreateNodeFromGeoNode(GeoTreeNode geoNode) { TreeNode node = new TreeNode(geoNode.Name); node.Tag = geoNode.Tag; this.SetRootNodeProperty(node); return node; }
public void Dispose() { this.m_PolygonNode = null; this.m_PointNode = null; this.m_LineNode = null; this.m_MapNode = null; this.m_SatelliticNode = null; this.m_GeometryNode = null; this.m_TextNode = null; this.m_VectorNode = null; this.m_BuildingsNode = null; this.m_ClutterNode = null; this.m_HeightsNode = null; this.m_DynamicNodeCollection.Clear(); this.m_RootNodeCollection.Clear(); }
private static bool ModifychildrenVisibiliteisCondition(List<bool> newChildrenVisibilities, GeoTreeNode nodeToBeModified) { return (((newChildrenVisibilities != null) && (newChildrenVisibilities.Count > 0)) && (nodeToBeModified.ChildrenNodes.Count == newChildrenVisibilities.Count)); }
private void InitRootNodes() { this.m_PolygonNode = new GeoTreeNode("Polygons", -1, NodeType.Polygons, CheckedState.Unchecked); this.m_PointNode = new GeoTreeNode("Points", -2, NodeType.Points, CheckedState.Unchecked); this.m_LineNode = new GeoTreeNode("Lines", -3, NodeType.Lines, CheckedState.Unchecked); this.m_MapNode = new GeoTreeNode("Map", -4, NodeType.Map, CheckedState.Unchecked); this.m_SatelliticNode = new GeoTreeNode("Satellitic", -5, NodeType.Image, CheckedState.Unchecked); this.m_GeometryNode = new GeoTreeNode("Geometry", -6, NodeType.Geometry, CheckedState.Unchecked); this.m_TextNode = new GeoTreeNode("Text", -7, NodeType.Text, CheckedState.Unchecked); this.m_VectorNode = new GeoTreeNode("Vector", -8, NodeType.Vector, CheckedState.Unchecked); this.m_BuildingsNode = new GeoTreeNode("Buildings", -9, NodeType.Buildings, CheckedState.Unchecked); this.m_ClutterNode = new GeoTreeNode("Clutter", -10, NodeType.Clutter, CheckedState.Unchecked); this.m_HeightsNode = new GeoTreeNode("Heights", -11, NodeType.Heights, CheckedState.Unchecked); this.m_RootNodeCollection.Add(this.m_PolygonNode); this.m_RootNodeCollection.Add(this.m_PointNode); this.m_RootNodeCollection.Add(this.m_LineNode); this.m_RootNodeCollection.Add(this.m_MapNode); this.m_RootNodeCollection.Add(this.m_SatelliticNode); this.m_RootNodeCollection.Add(this.m_GeometryNode); this.m_RootNodeCollection.Add(this.m_TextNode); this.m_RootNodeCollection.Add(this.m_VectorNode); this.m_RootNodeCollection.Add(this.m_BuildingsNode); this.m_RootNodeCollection.Add(this.m_ClutterNode); this.m_RootNodeCollection.Add(this.m_HeightsNode); }