Exemplo n.º 1
0
        private static void ApplyErrors(TreeNode node)
        {
            Element element = node.GetElement();
            IList<ElementError> allErrors = element.GetErrorsRecursive();
            string message = "";
            foreach (ElementError error in allErrors)
            {
                message += error.Message + "\r\n";
            }
            if (message.Length > 0)
                message = message.Substring(0, message.Length - 2);

            node.ToolTipText = message;
        }
Exemplo n.º 2
0
        private void ApplyImage(TreeNode node)
        {
            Element selectedElement = node.GetElement();

            string imageKey = selectedElement.GetIconKey();
            if (!Icons.Images.ContainsKey(imageKey))
            {
                Image img = selectedElement.GetIcon();
                Icons.Images.Add(imageKey, img);
            }
            if (node.ImageKey != imageKey)
            {
                node.ImageKey = imageKey;
                node.SelectedImageKey = imageKey;
            }
        }
Exemplo n.º 3
0
 private void SelectElementInProjectTree(Element errorElement, TreeNode node)
 {
     if (node.GetElement() == errorElement)
     {
         ProjectTree.SelectedNode = node;
         return;
     }
     foreach (TreeNode childNode in node.Nodes)
     {
         SelectElementInProjectTree(errorElement, childNode);
     }
 }