Ejemplo n.º 1
0
        private TreeNode CreateThemeRuleNode(LayerNodeMetadata layer, ThemeCategory themeCat, double viewScale, string labelText, int geomType, int categoryIndex)
        {
            var lyr = layer.Layer;
            TreeNode node = new TreeNode();
            node.Text = labelText;

            Image icon = _map.GetLegendImage(lyr.LayerDefinitionID,
                                             viewScale,
                                             16,
                                             16,
                                             "PNG",
                                             geomType,
                                             categoryIndex);
            legendCallCount++;

            var tag = new LayerThemeNodeMetadata(false, icon, labelText);
            layer.AddThemeNode(themeCat, tag);
            node.Tag = tag;

            return node;
        }
Ejemplo n.º 2
0
            public void AddThemeNode(ThemeCategory category, LayerThemeNodeMetadata themeMeta)
            {
                if (!_themeNodes.ContainsKey(category))
                    _themeNodes[category] = new List<LayerThemeNodeMetadata>();

                _themeNodes[category].Add(themeMeta);
            }
Ejemplo n.º 3
0
 private TreeNode CreateCompressedThemeNode(LayerNodeMetadata layer, ThemeCategory cat, int count)
 {
     TreeNode node = new TreeNode();
     node.Text = (count + " other styles");
     node.ImageKey = node.SelectedImageKey = IMG_OTHER;
     var meta = new LayerThemeNodeMetadata(true, Properties.Resources.icon_etc, node.Text);
     node.Tag = meta;
     layer.AddThemeNode(cat, meta);
     return node;
 }