Exemplo n.º 1
0
            protected override void OnDrawText(DrawEventArgs args)
            {
                TestMethodNode node = args.Node.Tag as TestMethodNode;

                if (node != null)
                {
                    args.TextColor = args.Node.IsSelected && parent.Focused
                        ? SystemColors.HighlightText
                        : ColorTranslator.FromHtml(node.Test.Result.GetColorValue());
                }
                base.OnDrawText(args);
            }
        private void buttonRunTestInVs_Click(object sender, EventArgs e)
        {
            TestMethodNode method = getSelectedTestMethod();

            if (method == null)
            {
                return;
            }
            if (navigateToTestClassAndMethod(method.Test))
            {
                solution.DTE.ExecuteCommand("Test.RunTestsInCurrentContext", "");
            }
        }
        private void openTestMethod(bool refocusOnTestList)
        {
            TestMethodNode method = getSelectedTestMethod();

            if (method == null)
            {
                return;
            }
            navigateToTestClassAndMethod(method.Test);
            if (!refocusOnTestList)
            {
                return;
            }

            // this seems to be the only way to refocus the bamboo toolwindow
            IVsWindowFrame windowFrame = (IVsWindowFrame)ToolWindowManager.Instance.BuildDetailsWindow.Frame;

            windowFrame.Show();
        }