Exemplo n.º 1
0
        /// <summary>
        /// Highlightes completed test.
        /// </summary>
        public virtual void HighlightCompletedTest(TestResult testResult)
        {
            BeginInvoke(new Action(() =>
            {
                if (!mTestNodes.ContainsKey(testResult.TestInfo))
                {
                    return;
                }

                TreeView.BeginUpdate();

                foreach (var node in mTestNodes[testResult.TestInfo])
                {
                    node.BackColor   = TreeView.BackColor;
                    node.NodeFont    = mCompletedTestFont;
                    node.Text        = node.Text;
                    node.ToolTipText = TooltipHelper.CreateTestTooltip(testResult.TestInfo, testResult);
                    node.ForeColor   = ConverterUtil.GetStatusColor(testResult.TestStatus);

                    mColouredNodes.Add(node);
                }

                TreeView.EndUpdate();
            }));
        }
Exemplo n.º 2
0
        protected void ClearTestResults(TreeView treeView)
        {
            foreach (TreeNode node in mColouredNodes)
            {
                node.ToolTipText = TooltipHelper.CreateTestTooltip((TestInfo)node.Tag, null);
                node.ForeColor   = treeView.ForeColor;
                node.NodeFont    = treeView.Font;
            }

            foreach (var node in mGroupNodes)
            {
                node.Collapse();
            }

            mColouredNodes.Clear();

            SelectedTest = null;
        }
Exemplo n.º 3
0
        protected void AddTestNode(TestInfo testInfo, TreeNode parentNode)
        {
            TreeNode node = parentNode.Nodes.Add(testInfo.GetNameString());

            node.ToolTipText      = TooltipHelper.CreateTestTooltip(testInfo, null);
            node.ImageKey         = GetImageKey(testInfo, false);
            node.SelectedImageKey = node.ImageKey;
            node.Tag = testInfo;

            if (!mTestNodes.ContainsKey(testInfo))
            {
                mTestNodes.Add(testInfo, new List <TreeNode> {
                    node
                });
            }
            else
            {
                mTestNodes[testInfo].Add(node);
            }
        }
Exemplo n.º 4
0
        private void AddTestNode(Profile profile, TestInfo testInfo, TreeNode parentNode)
        {
            RequirementLevel requirementLevel = testInfo.FeatureUnderTest.GetInfo().Requirement[profile];

            TreeNode node = parentNode.Nodes.Add(testInfo.GetNameString());

            node.ToolTipText      = TooltipHelper.CreateTestTooltip(testInfo, null);
            node.ImageKey         = GetTestImage(requirementLevel);
            node.SelectedImageKey = node.ImageKey;
            node.Tag = testInfo;

            if (!mTestNodes.ContainsKey(testInfo))
            {
                mTestNodes.Add(testInfo, new List <TreeNode> {
                    node
                });
            }
            else
            {
                mTestNodes[testInfo].Add(node);
            }
        }