public frmVersions(OTCS.CWSClient _fCWSClient, OTCSDocumentManagement.Node _selectedNode) { InitializeComponent(); fCWSClient = _fCWSClient; selectedNode = _selectedNode; }
/// <summary> /// Add the given node as a new child of the parent LLTreeNode. /// </summary> private void addChild(OTCS.LLTreeNode parentNode, OTCSDocumentManagement.Node child) { //Util.WriteMethodInfoToConsole(); OTCS.LLTreeNode childNode = new OTCS.LLTreeNode(); if (parentNode != null && child != null && childNode != null) { childNode.Data = child; // set the folder icon or document. Default to the Unknown icon for all others int imageIndex = (int)frmMain.IconTypes.UNKNOWN_ICON; if (child.Type == "Category") { imageIndex = (int)frmMain.IconTypes.CATEGORY_ICON; } else if (child.Type == "Discussion") { imageIndex = (int)frmMain.IconTypes.DISCUSSION_ICON; } else if (child.Type == "Document") { imageIndex = (int)frmMain.IconTypes.DOCUMENT_ICON; } else if (child.Type == "Folder") { imageIndex = (int)frmMain.IconTypes.FOLDER_ICON; } else if (child.Type == "Milestone") { imageIndex = (int)frmMain.IconTypes.MILESTONE_ICON; } else if (child.Type == "Poll") { imageIndex = (int)frmMain.IconTypes.POLL_ICON; } else if (child.Type == "Project") { imageIndex = (int)frmMain.IconTypes.PROJECT_ICON; } else if (child.Type == "Report") { imageIndex = (int)frmMain.IconTypes.REPORT_ICON; } else if (child.Type == "Task") { imageIndex = (int)frmMain.IconTypes.TASK_ICON; } else if (child.Type == "TaskGroup") { imageIndex = (int)frmMain.IconTypes.TASKGROUP_ICON; } else if (child.Type == "TaskList") { imageIndex = (int)frmMain.IconTypes.TASKLIST_ICON; } else if (child.Type == "Topic") { imageIndex = (int)frmMain.IconTypes.TOPIC_ICON; } else if (child.Type == "Reply") { imageIndex = (int)frmMain.IconTypes.REPLY_ICON; } childNode.ImageIndex = imageIndex; childNode.SelectedImageIndex = imageIndex; parentNode.Nodes.Add(childNode); } }