예제 #1
0
 /// <summary>
 /// 设置TreeNode的数据
 /// </summary>
 /// <param name="node"></param>
 /// <param name="symbolGroup"></param>
 private void SetTreeNode(TreeNode node, SymbolGroup symbolGroup)
 {
     try
     {
         SymbolGroups groups = symbolGroup.ChildGroups;
         for (int i = 0; i < groups.Count; i++)
         {
             SymbolGroup group = groups[i];
             node.Nodes.Add(group.Name);
             node.Nodes[i].Tag = group;
             if (group != null)
             {
                 SetTreeNode(node.Nodes[i], group);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #2
0
 private void SetTreeGroup(SymbolGroup symbolGroup)
 {
     try
     {
         SymbolGroups groups = symbolGroup.ChildGroups;
         for (int i = 0; i < groups.Count; i++)
         {
             SymbolGroup group = groups[i];
             if (group.Name == "树木")
             {
                 m_symbolTreeMarkerGroup = group;
             }
             //string str = group.Name;
             if (group != null)
             {
                 SetTreeGroup(group);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }