public void RemoveChild(QAliberTreeNode node) { FolderTestCase folderCase = this.testcase as FolderTestCase; TestCase caseToBeRemoved = node.Testcase; if (folderCase != null && caseToBeRemoved != null) { Nodes.Remove(node); folderCase.Children.Remove(caseToBeRemoved); } }
public void InsertChild(int index, QAliberTreeNode node) { FolderTestCase folderCase = this.testcase as FolderTestCase; if (folderCase != null) { Nodes.Insert(index, node); folderCase.Children.Insert(index, node.Testcase); node.Testcase.Scenario = folderCase.Scenario; node.Testcase.Parent = folderCase; } }
public void AddChild(QAliberTreeNode child) { FolderTestCase folderCase = this.testcase as FolderTestCase; if (folderCase != null) { Nodes.Add(child); folderCase.Children.Add(child.Testcase); child.Testcase.Scenario = folderCase.Scenario; child.Testcase.Parent = folderCase; } }
private void AfterDragEnded(object sender, NodeDraggedEventArgs e) { FolderTestCase testcase = e.TargetNode.Testcase as FolderTestCase; if (testcase != null) { ICommand command = new CutCommand(new QAliberTreeNode[] { (QAliberTreeNode)e.SourceNode }); command.Do(); command = new PasteCommand(e.TargetNode); commandsHistory.Do(command); OnScenarioChanged(); } }
private void FillTreeRecursively(QAliberTreeNode node) { FolderTestCase folderCase = node.Testcase as FolderTestCase; if (folderCase != null) { foreach (TestCase child in folderCase.Children) { QAliberTreeNode childNode = AddNode(node, child); FillTreeRecursively(childNode); } } }
public void InsertChild(int index, TestCase testCase) { FolderTestCase folderCase = this.testcase as FolderTestCase; if (testCase != null) { QAliberTreeNode node = new QAliberTreeNode(testCase); Nodes.Insert(index, node); folderCase.Children.Insert(index, testCase); testCase.Scenario = folderCase.Scenario; testCase.Parent = folderCase; } }
public void AddChild(TestCase testCase) { FolderTestCase folderCase = this.testcase as FolderTestCase; if (testCase != null) { QAliberTreeNode node = new QAliberTreeNode(testCase); Nodes.Add(node); folderCase.Children.Add(testCase); testCase.Scenario = folderCase.Scenario; testCase.Parent = folderCase; } }
public QAliberTreeNode LinkChild(TestCase testCase) { FolderTestCase folderCase = this.testcase as FolderTestCase; if (testCase != null) { QAliberTreeNode node = new QAliberTreeNode(testCase); Nodes.Add(node); testCase.Scenario = folderCase.Scenario; testCase.Parent = folderCase; return(node); } return(null); }
private void UpdateTags(QAliberTreeNode node, TestCase testcase) { node.Testcase = testcase; FolderTestCase folder = testcase as FolderTestCase; if (folder != null) { if (node.Nodes.Count == folder.Children.Count) { for (int i = 0; i < folder.Children.Count; i++) { UpdateTags((QAliberTreeNode)node.Nodes[i], folder.Children[i]); } } } }