public static string TransSystemTreeToString(SystemTreeNode treeNode) { StringBuilder sb = new StringBuilder(); sb.Append(TransSystemTreeNodeToString(treeNode, 0)); return(sb.ToString()); }
public override SystemTreeNode GetSystemTree() { SystemTreeNode node = new SystemTreeNode(systemInfo.systemName.Replace(" ", ""), !paused); foreach (var item in _executeSystemInfos) { node.subNode.Add(new SystemTreeNode(item.systemName.Replace(" ", ""), item.isActive)); } return(node); }
public override SystemTreeNode GetSystemTree() { _logger.ErrorFormat("Realease: GetTree"); SystemTreeNode node = new SystemTreeNode(this.GetType().Name.Replace(" ", ""), ExecState); for (int i = 0; i < _subSystemNames.Count; i++) { node.subNode.Add(new SystemTreeNode(_subSystemNames[i], _subSystemState[i])); } return(node); }
public static string TransSystemTreeToString(SystemTreeNode treeNode) { StringBuilder sb = new StringBuilder(); // sb.Append(treeNode.systemName + " : " + treeNode.state+"\n"); // foreach (var item in treeNode.subNode) // { // sb.Append(TransSystemTreeNodeToString(item,0)); // } sb.Append(TransSystemTreeNodeToString(treeNode, 0)); return(sb.ToString()); }
public static string TransSystemTreeNodeToString(SystemTreeNode treeNode, int level) { StringBuilder sb = new StringBuilder(); int times = level; while (times-- >= 0) { sb.Append("\t"); } sb.Append(treeNode.state + "\t" + treeNode.systemName + "\n"); foreach (var item in treeNode.subNode) { sb.Append(TransSystemTreeNodeToString(item, level + 1)); } return(sb.ToString()); }