internal void AfterTypeDragEnded(object sender, NodeDraggedEventArgs e) { QAliberTreeNode node = e.SourceNode.CompleteClone() as QAliberTreeNode; TreeClipboard.Default.StoreInClipboard(new QAliberTreeNode[] { node }, false); if (node != null) { if (node.Testcase != null) { string tcTypeName = node.Testcase.GetType().FullName; node.Checked = node.Testcase.MarkedForExecution; if (!testcaseIconsList.Images.ContainsKey(tcTypeName)) { if (node.Testcase.Icon != null) { testcaseIconsList.Images.Add(tcTypeName, node.Testcase.Icon); } } if (testcaseIconsList.Images.ContainsKey(tcTypeName)) { node.ImageKey = node.SelectedImageKey = tcTypeName; } node.ContextMenuStrip = testCasesMenu; ICommand command = new PasteCommand(e.TargetNode, true); commandsHistory.Do(command); OnScenarioChanged(); } } }
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(); } }