Exemple #1
0
        private void mnuThemeExport_Click(object sender, EventArgs e)
        {
            var node = TreeView.SelectedNode;
            var ds = (ThemeDS)node.Tag;
            var theme = (ThemeDS.ThemeRow)node.Tag;

            var newDs = new ThemeDS();
            newDs.Theme.ImportRow(theme);
            newDs.WriteXml("export theme.xml");
        }
Exemple #2
0
        private TreeNode AddStyleRuleNode(TreeNode parent, ThemeDS.StyleRuleRow styleRule)
        {
            if (parent == null) throw new ArgumentNullException("parent");
            if (styleRule == null) throw new ArgumentNullException("styleRule");

            TreeNode node = parent.Nodes.Add(styleRule.Name);
            node.Tag = new StyleRule(styleRule);
            //node.ContextMenuStrip = cmnDisplay;

            _objectsNode.Add(styleRule, node);

            return node;
        }
Exemple #3
0
        private TreeNode AddLabelNode(TreeNode parent, ThemeDS.LabelRuleRow label)
        {
            if (parent == null) throw new ArgumentNullException("parent");
            if (label == null) throw new ArgumentNullException("label");

            TreeNode node = parent.Nodes.Add(label.Name);
            node.Tag = new LabelRule(label);
            node.ContextMenuStrip = cmnLayer;

            _objectsNode.Add(label, node);

            return node;
        }
Exemple #4
0
        private TreeNode AddLayerNode(TreeNode parent, ThemeDS.LayerRow layerRow)
        {
            if (parent == null) throw new ArgumentNullException();

            var node = parent.Nodes.Add(layerRow.Name);
            node.Tag = new Layer(layerRow);
            node.ContextMenuStrip = cmnLayer;

            _objectsNode.Add(layerRow, node);

            foreach (var style in layerRow.GetStyleRuleRows())
                AddStyleRuleNode(node, style);

            foreach (var label in layerRow.GetLabelRuleRows())
                AddLabelNode(node, label);

            return node;
        }
Exemple #5
0
 private void AddGroupNode(TreeNode node, ThemeDS.LayerGroupRow layerGroupRow)
 {
     
 }
Exemple #6
0
        private TreeNode AddThemeNode(ThemeDS.ThemeRow theme)
        {
            var node = _treeView.Nodes.Add(theme.Name);
            node.Tag = new Theme(theme);
            node.ContextMenuStrip = cmnTheme;

            _objectsNode.Add(theme, node);
            foreach (var root in theme.GetLayerGroupRows())
                foreach (var item in root.GetLayerRows())
                {
                    foreach (var group in root.GetLayerGroupRows())
                        AddGroupNode(node, group);
                    AddLayerNode(node, item);
                }

            return node;
        }