public RemoveCommand(ref MappingNode maxRoot, INode itemNode, ref TreeNode root, TreeNode nodeToRemove, YAMLEditorForm a) { this.maxRoot = maxRoot; this.nodeToRemove = nodeToRemove; this.itemNode = itemNode; this.root = root; this.editor = a; }
public ValueCommand(MappingNode maxRoot, TreeNode nodeToEdit, ScalarNode itemNode, string key, YAMLEditorForm editor, string value = null) { this.itemNode = itemNode; this.key = key; this.value = value; this.maxRoot = maxRoot; this.nodeToEdit = nodeToEdit; this.editor = editor; }
public YamlMappingNode Visit(MappingNode node, YamlNode currentRootNode) { if (node.IsRoot) { return new YamlMappingNode() { Tag = "ignore" } } ; if (currentRootNode is YamlMappingNode) { YamlMappingNode rootNode = (YamlMappingNode)currentRootNode; //downcast if (node.Tag != null && node.Tag.ToString() == "!include" && node.Children != null) { YAMLEditorForm.FileWriter(node as MappingNode, node.Value); rootNode.Add(node.Value, new YamlScalarNode(node.Value) { Tag = "!include" }); return(null); } else { YamlMappingNode child = new YamlMappingNode(); rootNode.Add(node.Value, child); return(child); } // YamlMappingNode rootNode = (YamlMappingNode)currentRootNode; //downcast } else { YamlSequenceNode rootNode = (YamlSequenceNode)currentRootNode; YamlMappingNode child = new YamlMappingNode(); rootNode.Add(child); return(child); } }
public ValueCommand(YAMLEditorForm editor, DataGridView dataGridView, INode updateNodeGlobal) { this.editor = editor; this.dataGridView = dataGridView; this.updateNodeGlobal = updateNodeGlobal; }