コード例 #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);

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

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

            Tree = new TreeViewElement(treeView);
        }
コード例 #2
0
ファイル: TestTreeView.cs プロジェクト: jimevans/nunit-gui
        public TestTreeView()
        {
            InitializeComponent();

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

            FormatButton = new ToolStripElement<ToolStripDropDownButton>(formatButton);
            DisplayFormat = new CheckedMenuGroup(
                "displayFormat", 
                nunitTreeMenuItem, fixtureListMenuItem, testListMenuItem);
            GroupBy = new CheckedMenuGroup(
                "testGrouping", 
                byAssemblyMenuItem, byFixtureMenuItem, byCategoryMenuItem, byOutcomeMenuItem, byDurationMenuItem);

            RunContextCommand = new MenuElement(this.runMenuItem);
            ShowCheckBoxesCommand = new MenuElement(showCheckboxesMenuItem);
            ExpandAllCommand = new MenuElement(expandAllMenuItem);
            CollapseAllCommand = new MenuElement(collapseAllMenuItem);
            CollapseToFixturesCommand = new MenuElement(collapseToFixturesMenuItem);

            Tree = new TreeViewElement(treeView);
        }
コード例 #3
0
ファイル: XmlView.cs プロジェクト: elv1s42/nunit-gui
        public XmlView()
        {
            InitializeComponent();

            XmlPanel = new ControlElement<Panel>(xmlPanel);
            XmlTextBox = new ControlElement<RichTextBox>(xmlTextBox);
            CopyToolStripMenuItem = new ToolStripElement<ToolStripMenuItem>(copyToolStripMenuItem);
            WordWrapToolStripMenuItem = new ToolStripElement<ToolStripMenuItem>(wordWrapToolStripMenuItem);
            selectAllToolStripMenuItem.Click += (s, a) =>
            {
                if (SelectAllCommand != null)
                    SelectAllCommand();
            };

            xmlTextBox.SelectionChanged += (s, a) =>
            {
                if (SelectionChanged != null)
                    SelectionChanged();
            };

            copyToolStripMenuItem.Click += (s, a) =>
            {
                if (CopyCommand != null)
                    CopyCommand();
            };

            wordWrapToolStripMenuItem.CheckedChanged += (s, a) =>
            {
                if (WordWrapChanged != null)
                    WordWrapChanged();
            };

        }
コード例 #4
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);
                }
            };
        }
コード例 #5
0
ファイル: XmlView.cs プロジェクト: VE-2016/VE-2016
        public XmlView()
        {
            InitializeComponent();

            XmlPanel                          = new ControlElement <Panel>(xmlPanel);
            XmlTextBox                        = new ControlElement <RichTextBox>(xmlTextBox);
            CopyToolStripMenuItem             = new ToolStripElement <ToolStripMenuItem>(copyToolStripMenuItem);
            WordWrapToolStripMenuItem         = new ToolStripElement <ToolStripMenuItem>(wordWrapToolStripMenuItem);
            selectAllToolStripMenuItem.Click += (s, a) =>
            {
                if (SelectAllCommand != null)
                {
                    SelectAllCommand();
                }
            };

            xmlTextBox.SelectionChanged += (s, a) =>
            {
                if (SelectionChanged != null)
                {
                    SelectionChanged();
                }
            };

            copyToolStripMenuItem.Click += (s, a) =>
            {
                if (CopyCommand != null)
                {
                    CopyCommand();
                }
            };

            wordWrapToolStripMenuItem.CheckedChanged += (s, a) =>
            {
                if (WordWrapChanged != null)
                {
                    WordWrapChanged();
                }
            };
        }