private void tvNavigation_NodeMouseClick(EventArgs e, PureComponents.TreeView.Node oNode) { // Select only this area/item if navigation node clicked. if (Control.ModifierKeys == Keys.None) { NavigationTreeView.ClearNodeSelection(); oNode.Select(); } }
private void RePathNodes(PureComponents.TreeView.Node node) { if (IsLeaf(node)) { //if (IsItem(node)) //frmFlowChart.State.ModifyGraphicNodePath(out requestId, new Guid(node.Key), node.FullPath); } foreach (PureComponents.TreeView.Node subNode in node.Nodes) { RePathNodes(subNode); } }
private void tvNavigation_AfterNodePositionChange(PureComponents.TreeView.Node oNode) { NavigationTreeView.ClearNodeSelection(); foreach (MindFusion.FlowChartX.ChartObject chartObject in frmFlowChart.FlowChart.Objects) { chartObject.Visible = false; } RePathNodes(oNode); if (oNode.Parent != null) { oNode.Parent.Select(); } else { oNode.Select(); } }
private void SelectSubNodes(PureComponents.TreeView.Node node) { bool isSelected = node.IsSelected; bool wasSelected = wasSelectedNodes.Contains(node); if (wasSelected == isSelected) { // Nothings changed at area level, update flowchart with innerNodes selection status. foreach (PureComponents.TreeView.Node innerNode in node.Nodes) { frmFlowChart.State.SetVisible(innerNode.Key, innerNode.IsSelected); SelectSubNodes(innerNode); } } else if (wasSelected && !isSelected) { // Been deselected, deselect all underlings and update flowchart. foreach (PureComponents.TreeView.Node innerNode in node.Nodes) { frmFlowChart.State.SetVisible(innerNode.Key, false); NavigationTreeView.RemoveSelectedNode(innerNode); SelectSubNodes(innerNode); } } else if (!wasSelected && isSelected) { // Been selected, select all underlings and update flowchart. foreach (PureComponents.TreeView.Node innerNode in node.Nodes) { frmFlowChart.State.SetVisible(innerNode.Key, true); NavigationTreeView.AddSelectedNode(innerNode); SelectSubNodes(innerNode); } } }
/// <summary>Determine if this node represents a area.</summary> /// <param name="node">Node to be tested</param> /// <returns>True if node represents a area.</returns> private static bool IsArea(PureComponents.TreeView.Node node) { return((node.Tag != null) && (node.Tag is EditorArea)); }
/// <summary>Determine if this node represents a branch (i.e. root or area.)</summary> /// <param name="node">Node to be tested</param> /// <returns>True if node represents a branch.</returns> private static bool IsBranch(PureComponents.TreeView.Node node) { return((node.Tag == null) || (node.Tag is EditorArea)); }