Exemplo n.º 1
0
        public TestTreeView()
        {
            InitializeComponent();

            RunButton          = new SplitButtonElement(runButton);
            RunAllCommand      = new ToolStripMenuElement(runAllMenuItem);
            RunSelectedCommand = new ToolStripMenuElement(runSelectedMenuItem);
            RunFailedCommand   = new ToolStripMenuElement(runFailedMenuItem);
            StopRunCommand     = new ToolStripMenuElement(stopRunMenuItem);

            DebugButton          = new SplitButtonElement(debugButton);
            DebugAllCommand      = new ToolStripMenuElement(debugAllMenuItem);
            DebugSelectedCommand = new ToolStripMenuElement(debugSelectedMenuItem);
            DebugFailedCommand   = new ToolStripMenuElement(debugFailedMenuItem);

            FormatButton  = new ToolStripElement(formatButton);
            DisplayFormat = new CheckedToolStripMenuGroup(
                "displayFormat",
                nunitTreeMenuItem, fixtureListMenuItem, testListMenuItem);
            GroupBy = new CheckedToolStripMenuGroup(
                "testGrouping",
                byAssemblyMenuItem, byFixtureMenuItem, byCategoryMenuItem, byExtendedCategoryMenuItem, byOutcomeMenuItem, byDurationMenuItem);

            RunContextCommand         = new ToolStripMenuElement(this.runMenuItem);
            RunCheckedCommand         = new ToolStripMenuElement(this.runCheckedMenuItem);
            DebugContextCommand       = new ToolStripMenuElement(this.debugMenuItem);
            DebugCheckedCommand       = new ToolStripMenuElement(this.debugCheckedMenuItem);
            ShowCheckBoxes            = new ToolStripMenuElement(showCheckboxesMenuItem);
            ExpandAllCommand          = new ToolStripMenuElement(expandAllMenuItem);
            CollapseAllCommand        = new ToolStripMenuElement(collapseAllMenuItem);
            CollapseToFixturesCommand = new ToolStripMenuElement(collapseToFixturesMenuItem);

            Tree = new TreeViewElement(treeView);
        }
Exemplo n.º 2
0
        private void InitializeViewElements()
        {
            // File Menu
            FileMenu            = new ToolStripMenuElement(fileToolStripMenuItem);
            NewProjectCommand   = new ToolStripMenuElement(newProjectToolStripMenuItem);
            OpenProjectCommand  = new ToolStripMenuElement(openProjectToolStripMenuItem);
            CloseCommand        = new ToolStripMenuElement(closeToolStripMenuItem);
            AddTestFilesCommand = new ToolStripMenuElement(addTestFilesToolStripMenuItem);
            SaveCommand         = new ToolStripMenuElement(saveToolStripMenuItem);
            SaveAsCommand       = new ToolStripMenuElement(saveAsToolStripMenuItem);
            SaveResultsCommand  = new ToolStripMenuElement(saveResultsToolStripMenuItem);
            ReloadTestsCommand  = new ToolStripMenuElement(reloadTestsToolStripMenuItem);
            SelectRuntimeMenu   = new ToolStripMenuElement(selectRuntimeToolStripMenuItem);
            SelectedRuntime     = new CheckedToolStripMenuGroup(selectRuntimeToolStripMenuItem);
            ProcessModel        = new CheckedToolStripMenuGroup("processModel",
                                                                defaultProcessToolStripMenuItem, inProcessToolStripMenuItem, separateProcessToolStripMenuItem, multipleProcessToolStripMenuItem);
            DomainUsage = new CheckedToolStripMenuGroup("domainUsage",
                                                        defaultDomainToolStripMenuItem, singleDomainToolStripMenuItem, multipleDomainToolStripMenuItem);
            RunAsX86           = new ToolStripMenuElement(loadAsX86ToolStripMenuItem);
            RecentProjectsMenu = new ToolStripMenuElement(recentProjectsToolStripMenuItem);
            ExitCommand        = new ToolStripMenuElement(exitToolStripMenuItem);

            // View Menu
            FullGuiCommand      = new ToolStripMenuElement(fullGuiToolStripMenuItem);
            MiniGuiCommand      = new ToolStripMenuElement(miniGuiToolStripMenuItem);
            IncreaseFontCommand = new ToolStripMenuElement(increaseToolStripMenuItem);
            DecreaseFontCommand = new ToolStripMenuElement(decreaseToolStripMenuItem);
            ChangeFontCommand   = new ToolStripMenuElement(changeToolStripMenuItem);
            RestoreFontCommand  = new ToolStripMenuElement(restoreToolStripMenuItem);
            StatusBarCommand    = new ToolStripMenuElement(statusBarToolStripMenuItem);

            // Project Menu
            ProjectMenu = new ToolStripMenuElement(projectToolStripMenuItem);

            // Tools Menu
            SettingsCommand   = new ToolStripMenuElement(settingsToolStripMenuItem);
            ExtensionsCommand = new ToolStripMenuElement(extensionsToolStripMenuItem);

            // Help Menu
            NUnitHelpCommand  = new ToolStripMenuElement(nUnitHelpToolStripMenuItem);
            AboutNUnitCommand = new ToolStripMenuElement(aboutNUnitToolStripMenuItem);

            TestResult = new ControlElement(testResult);
            TestName   = new ControlElement(testName);

            DialogManager  = new DialogManager();
            MessageDisplay = new MessageDisplay();
        }
Exemplo n.º 3
0
        public TestTreeView()
        {
            InitializeComponent();

            RunButton             = new SplitButtonElement(runButton);
            RunAllCommand         = new ToolStripMenuElement(runAllMenuItem);
            RunSelectedCommand    = new ToolStripMenuElement(runSelectedMenuItem);
            RunFailedCommand      = new ToolStripMenuElement(runFailedMenuItem);
            TestParametersCommand = new ToolStripMenuElement(testParametersMenuItem);
            StopRunCommand        = new ToolStripMenuElement(stopRunMenuItem);

            DebugButton          = new SplitButtonElement(debugButton);
            DebugAllCommand      = new ToolStripMenuElement(debugAllMenuItem);
            DebugSelectedCommand = new ToolStripMenuElement(debugSelectedMenuItem);
            DebugFailedCommand   = new ToolStripMenuElement(debugFailedMenuItem);

            FormatButton  = new ToolStripElement(formatButton);
            DisplayFormat = new CheckedToolStripMenuGroup(
                "displayFormat",
                nunitTreeMenuItem, fixtureListMenuItem, testListMenuItem);
            GroupBy = new CheckedToolStripMenuGroup(
                "testGrouping",
                byAssemblyMenuItem, byFixtureMenuItem, byCategoryMenuItem, byExtendedCategoryMenuItem, byOutcomeMenuItem, byDurationMenuItem);

            RunContextCommand         = new ToolStripMenuElement(this.runMenuItem);
            RunCheckedCommand         = new ToolStripMenuElement(this.runCheckedMenuItem);
            DebugContextCommand       = new ToolStripMenuElement(this.debugMenuItem);
            DebugCheckedCommand       = new ToolStripMenuElement(this.debugCheckedMenuItem);
            ActiveConfiguration       = new ToolStripMenuElement(this.activeConfigMenuItem);
            ShowCheckBoxes            = new ToolStripMenuElement(showCheckboxesMenuItem);
            ExpandAllCommand          = new ToolStripMenuElement(expandAllMenuItem);
            CollapseAllCommand        = new ToolStripMenuElement(collapseAllMenuItem);
            CollapseToFixturesCommand = new ToolStripMenuElement(collapseToFixturesMenuItem);

            Tree = new TreeViewElement(treeView);
            treeView.MouseDown += (s, e) =>
            {
                if (e.Button == MouseButtons.Right)
                {
                    ContextNode = treeView.GetNodeAt(e.X, e.Y);
                }
            };
        }