Пример #1
0
        private TreeNode makeNodes(TreeNodeCollection owner, Core.Result result)
        {
            var node = new TreeNode();

            node.Text = Text;
            owner.Add(node);
            foreach (var item in result.Items)
            {
                var childNode = new TreeNode();
                childNode.Tag = item;
                if (item is Core.Result.Problem)
                {
                    childNode.Text = item.GetText;
                    node.Nodes.Add(childNode);
                    childNode.StateImageKey = "problem";
                }
                else if (item is Core.Result.Warning)
                {
                    childNode.Text = item.GetText;
                    node.Nodes.Add(childNode);
                    childNode.StateImageKey = "warning";
                }
                else if (item is Core.Result)
                {
                    makeNodes(node.Nodes, (Core.Result)item);
                }
            }
            return(node);
        }
Пример #2
0
        public frmWarnings(Core.Result result, string windowTitle)
        {
            InitializeComponent();

            Icon = App.ProgramIcon;

            Text = windowTitle;

            tvwWarnings.StateImageList = modWarnings.WarningImages;
            makeNodes(tvwWarnings.Nodes, result);
            tvwWarnings.ExpandAll();

            tvwWarnings.NodeMouseDoubleClick += NodeDoubleClicked;
        }