示例#1
0
        public void Restore(TestSuiteTreeView tree)
        {
            if (ShowCheckBoxes != tree.CheckBoxes)
                tree.CheckBoxes = ShowCheckBoxes;

            foreach (VisualTreeNode visualNode in Nodes)
                visualNode.Restore(tree);

            if (SelectedNode != null)
            {
                TestSuiteTreeNode treeNode = tree[SelectedNode];
                if (treeNode != null)
                    tree.SelectedNode = treeNode;
            }

            if (TopNode != null)
            {
                TestSuiteTreeNode treeNode = tree[TopNode];
                if (treeNode != null)
                    tree.TryToSetTopNode(treeNode);
            }

            if (this.SelectedCategories != null)
            {
                TestFilter filter = new CategoryFilter( this.SelectedCategories.Split( new char[] { ',' } ) );
                if ( this.ExcludeCategories )
                    filter = new NotFilter( filter );
                tree.CategoryFilter = filter;
            }

            tree.Select();
        }
示例#2
0
        public void Restore(TestSuiteTreeView treeView)
        {
            treeView.CheckBoxes = this.ShowCheckBoxes;

            foreach (VisualTreeNode visualNode in this.Nodes)
            {
                TestSuiteTreeNode treeNode = treeView[visualNode.UniqueName];
                if (treeNode != null)
                {
                    if (treeNode.IsExpanded != visualNode.Expanded)
                    {
                        treeNode.Toggle();
                    }

                    treeNode.Checked = visualNode.Checked;
                }
            }

            if (this.SelectedNode != null)
            {
                TestSuiteTreeNode treeNode = treeView[this.SelectedNode];
                if (treeNode != null)
                {
                    treeView.SelectedNode = treeNode;
                }
            }

            if (this.TopNode != null)
            {
                TestSuiteTreeNode treeNode = treeView[this.TopNode];
                if (treeNode != null)
                {
                    treeView.TopNode = treeNode;
                }
            }

            if (this.SelectedCategories != null)
            {
                TestFilter filter = new CategoryFilter(this.SelectedCategories.Split(new char[] { ',' }));
                if (this.ExcludeCategories)
                {
                    filter = new NotFilter(filter);
                }
                treeView.CategoryFilter = filter;
            }

            treeView.Select();
        }
示例#3
0
        public VisualState(TestSuiteTreeView treeView)
        {
            this.ShowCheckBoxes = treeView.CheckBoxes;
            this.TopNode        = ((TestSuiteTreeNode)treeView.TopNode).Test.TestName.UniqueName;
            this.SelectedNode   = ((TestSuiteTreeNode)treeView.SelectedNode).Test.TestName.UniqueName;
            this.Nodes          = new VisualTreeNode[] { new VisualTreeNode((TestSuiteTreeNode)treeView.Nodes[0]) };
            if (!treeView.CategoryFilter.IsEmpty)
            {
                ITestFilter filter = treeView.CategoryFilter;
                if (filter is NotFilter)
                {
                    filter = ((NotFilter)filter).BaseFilter;
                    this.ExcludeCategories = true;
                }

                this.SelectedCategories = filter.ToString();
            }
        }
示例#4
0
        public VisualState( TestSuiteTreeView treeView )
        {
            this.ShowCheckBoxes = treeView.CheckBoxes;
            this.TopNode = ((TestSuiteTreeNode)treeView.TopNode).Test.TestName.UniqueName;
            this.SelectedNode = ((TestSuiteTreeNode)treeView.SelectedNode).Test.TestName.UniqueName;
            this.Nodes = new VisualTreeNode[] { new VisualTreeNode((TestSuiteTreeNode)treeView.Nodes[0]) };
            if ( !treeView.CategoryFilter.IsEmpty )
            {
                ITestFilter filter = treeView.CategoryFilter;
                if ( filter is NotFilter )
                {
                    filter = ((NotFilter)filter).BaseFilter;
                    this.ExcludeCategories = true;
                }

                this.SelectedCategories = filter.ToString();
            }
        }
示例#5
0
        public void Restore(TestSuiteTreeView tree)
        {
            if (ShowCheckBoxes != tree.CheckBoxes)
            {
                tree.CheckBoxes = ShowCheckBoxes;
            }

            foreach (VisualTreeNode visualNode in Nodes)
            {
                visualNode.Restore(tree);
            }

            if (SelectedNode != null)
            {
                TestSuiteTreeNode treeNode = tree[SelectedNode];
                if (treeNode != null)
                {
                    tree.SelectedNode = treeNode;
                }
            }

            if (TopNode != null)
            {
                TestSuiteTreeNode treeNode = tree[TopNode];
                if (treeNode != null)
                {
                    tree.TryToSetTopNode(treeNode);
                }
            }


            if (this.SelectedCategories != null)
            {
                TestFilter filter = new CategoryFilter(this.SelectedCategories.Split(new char[] { ',' }));
                if (this.ExcludeCategories)
                {
                    filter = new NotFilter(filter);
                }
                tree.CategoryFilter = filter;
            }

            tree.Select();
        }
示例#6
0
        public void Restore(TestSuiteTreeView tree)
        {
            TestSuiteTreeNode treeNode = tree[this.UniqueName];

            if (treeNode != null)
            {
                if (treeNode.IsExpanded != this.Expanded)
                {
                    treeNode.Toggle();
                }

                treeNode.Checked = this.Checked;

                if (this.Nodes != null)
                {
                    foreach (VisualTreeNode childNode in this.Nodes)
                    {
                        childNode.Restore(tree);
                    }
                }
            }
        }
示例#7
0
 public CheckedTestFinder(TestSuiteTreeView treeView)
 {
     FindCheckedNodes(treeView.Nodes, true);
 }
示例#8
0
 public CheckedTestFinder( TestSuiteTreeView treeView )
 {
     FindCheckedNodes( treeView.Nodes, true );
 }
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TestTreeArxNet));
     this.tabs = new System.Windows.Forms.TabControl();
     this.testPage = new System.Windows.Forms.TabPage();
     this.testPanel = new System.Windows.Forms.Panel();
     this.treePanel = new System.Windows.Forms.Panel();
     this.tests = new NUnit.UiKit.TestSuiteTreeView();
     this.buttonPanel = new System.Windows.Forms.Panel();
     this.checkFailedButton = new System.Windows.Forms.Button();
     this.clearAllButton = new System.Windows.Forms.Button();
     this.categoryPage = new System.Windows.Forms.TabPage();
     this.categoryPanel = new System.Windows.Forms.Panel();
     this.categoryButtonPanel = new System.Windows.Forms.Panel();
     this.removeCategory = new System.Windows.Forms.Button();
     this.addCategory = new System.Windows.Forms.Button();
     this.selectedCategories = new System.Windows.Forms.GroupBox();
     this.selectedList = new System.Windows.Forms.ListBox();
     this.excludeCheckbox = new System.Windows.Forms.CheckBox();
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.availableList = new System.Windows.Forms.ListBox();
     this.tabs.SuspendLayout();
     this.testPage.SuspendLayout();
     this.testPanel.SuspendLayout();
     this.treePanel.SuspendLayout();
     this.buttonPanel.SuspendLayout();
     this.categoryPage.SuspendLayout();
     this.categoryPanel.SuspendLayout();
     this.categoryButtonPanel.SuspendLayout();
     this.selectedCategories.SuspendLayout();
     this.groupBox1.SuspendLayout();
     this.SuspendLayout();
     //
     // tabs
     //
     this.tabs.Alignment = System.Windows.Forms.TabAlignment.Left;
     this.tabs.Controls.Add(this.testPage);
     this.tabs.Controls.Add(this.categoryPage);
     this.tabs.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabs.Location = new System.Drawing.Point(0, 0);
     this.tabs.Multiline = true;
     this.tabs.Name = "tabs";
     this.tabs.SelectedIndex = 0;
     this.tabs.Size = new System.Drawing.Size(248, 496);
     this.tabs.TabIndex = 0;
     //
     // testPage
     //
     this.testPage.Controls.Add(this.testPanel);
     this.testPage.Location = new System.Drawing.Point(22, 4);
     this.testPage.Name = "testPage";
     this.testPage.Size = new System.Drawing.Size(222, 488);
     this.testPage.TabIndex = 0;
     this.testPage.Text = "Tests";
     //
     // testPanel
     //
     this.testPanel.Controls.Add(this.treePanel);
     this.testPanel.Controls.Add(this.buttonPanel);
     this.testPanel.Dock = System.Windows.Forms.DockStyle.Fill;
     this.testPanel.Location = new System.Drawing.Point(0, 0);
     this.testPanel.Name = "testPanel";
     this.testPanel.Size = new System.Drawing.Size(222, 488);
     this.testPanel.TabIndex = 0;
     //
     // treePanel
     //
     this.treePanel.Controls.Add(this.tests);
     this.treePanel.Dock = System.Windows.Forms.DockStyle.Fill;
     this.treePanel.Location = new System.Drawing.Point(0, 0);
     this.treePanel.Name = "treePanel";
     this.treePanel.Size = new System.Drawing.Size(222, 448);
     this.treePanel.TabIndex = 0;
     //
     // tests
     //
     this.tests.AllowDrop = true;
     this.tests.CategoryFilter = ((NUnit.Core.TestFilter)(resources.GetObject("tests.CategoryFilter")));
     this.tests.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tests.HideSelection = false;
     this.tests.ImageIndex = 0;
     this.tests.Location = new System.Drawing.Point(0, 0);
     this.tests.Name = "tests";
     this.tests.SelectedImageIndex = 0;
     this.tests.Size = new System.Drawing.Size(222, 448);
     this.tests.TabIndex = 0;
     this.tests.CheckBoxesChanged += new System.EventHandler(this.tests_CheckBoxesChanged);
     //
     // buttonPanel
     //
     this.buttonPanel.Controls.Add(this.checkFailedButton);
     this.buttonPanel.Controls.Add(this.clearAllButton);
     this.buttonPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
     this.buttonPanel.Location = new System.Drawing.Point(0, 448);
     this.buttonPanel.Name = "buttonPanel";
     this.buttonPanel.Size = new System.Drawing.Size(222, 40);
     this.buttonPanel.TabIndex = 1;
     //
     // checkFailedButton
     //
     this.checkFailedButton.Anchor = System.Windows.Forms.AnchorStyles.Top;
     this.checkFailedButton.Location = new System.Drawing.Point(119, 8);
     this.checkFailedButton.Name = "checkFailedButton";
     this.checkFailedButton.Size = new System.Drawing.Size(96, 23);
     this.checkFailedButton.TabIndex = 1;
     this.checkFailedButton.Text = "Check Failed";
     this.checkFailedButton.Click += new System.EventHandler(this.checkFailedButton_Click);
     //
     // clearAllButton
     //
     this.clearAllButton.Anchor = System.Windows.Forms.AnchorStyles.Top;
     this.clearAllButton.Location = new System.Drawing.Point(15, 8);
     this.clearAllButton.Name = "clearAllButton";
     this.clearAllButton.Size = new System.Drawing.Size(96, 23);
     this.clearAllButton.TabIndex = 0;
     this.clearAllButton.Text = "Clear All";
     this.clearAllButton.Click += new System.EventHandler(this.clearAllButton_Click);
     //
     // categoryPage
     //
     this.categoryPage.Controls.Add(this.categoryPanel);
     this.categoryPage.Location = new System.Drawing.Point(22, 4);
     this.categoryPage.Name = "categoryPage";
     this.categoryPage.Size = new System.Drawing.Size(222, 488);
     this.categoryPage.TabIndex = 1;
     this.categoryPage.Text = "Categories";
     //
     // categoryPanel
     //
     this.categoryPanel.Controls.Add(this.categoryButtonPanel);
     this.categoryPanel.Controls.Add(this.selectedCategories);
     this.categoryPanel.Controls.Add(this.groupBox1);
     this.categoryPanel.Dock = System.Windows.Forms.DockStyle.Fill;
     this.categoryPanel.Location = new System.Drawing.Point(0, 0);
     this.categoryPanel.Name = "categoryPanel";
     this.categoryPanel.Size = new System.Drawing.Size(219, 488);
     this.categoryPanel.TabIndex = 0;
     //
     // categoryButtonPanel
     //
     this.categoryButtonPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.categoryButtonPanel.Controls.Add(this.removeCategory);
     this.categoryButtonPanel.Controls.Add(this.addCategory);
     this.categoryButtonPanel.Location = new System.Drawing.Point(8, 280);
     this.categoryButtonPanel.Name = "categoryButtonPanel";
     this.categoryButtonPanel.Size = new System.Drawing.Size(203, 40);
     this.categoryButtonPanel.TabIndex = 1;
     //
     // removeCategory
     //
     this.removeCategory.Anchor = System.Windows.Forms.AnchorStyles.Top;
     this.removeCategory.Location = new System.Drawing.Point(109, 8);
     this.removeCategory.Name = "removeCategory";
     this.removeCategory.Size = new System.Drawing.Size(75, 23);
     this.removeCategory.TabIndex = 1;
     this.removeCategory.Text = "Remove";
     this.removeCategory.Click += new System.EventHandler(this.removeCategory_Click);
     //
     // addCategory
     //
     this.addCategory.Anchor = System.Windows.Forms.AnchorStyles.Top;
     this.addCategory.Location = new System.Drawing.Point(21, 8);
     this.addCategory.Name = "addCategory";
     this.addCategory.Size = new System.Drawing.Size(75, 23);
     this.addCategory.TabIndex = 0;
     this.addCategory.Text = "Add";
     this.addCategory.Click += new System.EventHandler(this.addCategory_Click);
     //
     // selectedCategories
     //
     this.selectedCategories.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.selectedCategories.Controls.Add(this.selectedList);
     this.selectedCategories.Controls.Add(this.excludeCheckbox);
     this.selectedCategories.Location = new System.Drawing.Point(8, 328);
     this.selectedCategories.Name = "selectedCategories";
     this.selectedCategories.Size = new System.Drawing.Size(203, 144);
     this.selectedCategories.TabIndex = 2;
     this.selectedCategories.TabStop = false;
     this.selectedCategories.Text = "Selected Categories";
     //
     // selectedList
     //
     this.selectedList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.selectedList.ItemHeight = 12;
     this.selectedList.Location = new System.Drawing.Point(8, 16);
     this.selectedList.Name = "selectedList";
     this.selectedList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
     this.selectedList.Size = new System.Drawing.Size(187, 76);
     this.selectedList.TabIndex = 0;
     this.selectedList.DoubleClick += new System.EventHandler(this.removeCategory_Click);
     //
     // excludeCheckbox
     //
     this.excludeCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.excludeCheckbox.Location = new System.Drawing.Point(8, 120);
     this.excludeCheckbox.Name = "excludeCheckbox";
     this.excludeCheckbox.Size = new System.Drawing.Size(179, 16);
     this.excludeCheckbox.TabIndex = 1;
     this.excludeCheckbox.Text = "Exclude these categories";
     this.excludeCheckbox.CheckedChanged += new System.EventHandler(this.excludeCheckbox_CheckedChanged);
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.availableList);
     this.groupBox1.Location = new System.Drawing.Point(8, 0);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(203, 272);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Available Categories";
     //
     // availableList
     //
     this.availableList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.availableList.ItemHeight = 12;
     this.availableList.Location = new System.Drawing.Point(8, 24);
     this.availableList.Name = "availableList";
     this.availableList.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
     this.availableList.Size = new System.Drawing.Size(187, 244);
     this.availableList.TabIndex = 0;
     this.availableList.DoubleClick += new System.EventHandler(this.addCategory_Click);
     //
     // TestTreeArxNet
     //
     this.Controls.Add(this.tabs);
     this.Name = "TestTreeArxNet";
     this.Size = new System.Drawing.Size(248, 496);
     this.tabs.ResumeLayout(false);
     this.testPage.ResumeLayout(false);
     this.testPanel.ResumeLayout(false);
     this.treePanel.ResumeLayout(false);
     this.buttonPanel.ResumeLayout(false);
     this.categoryPage.ResumeLayout(false);
     this.categoryPanel.ResumeLayout(false);
     this.categoryButtonPanel.ResumeLayout(false);
     this.selectedCategories.ResumeLayout(false);
     this.groupBox1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
示例#10
0
        public void Restore(TestSuiteTreeView tree)
        {
            TestSuiteTreeNode treeNode = tree[this.UniqueName];
            if (treeNode != null)
            {
                if (treeNode.IsExpanded != this.Expanded)
                    treeNode.Toggle();

                treeNode.Checked = this.Checked;

                if (this.Nodes != null)
                    foreach (VisualTreeNode childNode in this.Nodes)
                        childNode.Restore(tree);
            }
        }
示例#11
0
        public void Restore(TestSuiteTreeView treeView)
        {
            treeView.CheckBoxes = this.ShowCheckBoxes;

            foreach (VisualTreeNode visualNode in this.Nodes)
            {
                TestSuiteTreeNode treeNode = treeView[visualNode.UniqueName];
                if (treeNode != null)
                {
                    if (treeNode.IsExpanded != visualNode.Expanded)
                        treeNode.Toggle();

                    treeNode.Checked = visualNode.Checked;
                }
            }

            if (this.SelectedNode != null)
            {
                TestSuiteTreeNode treeNode = treeView[this.SelectedNode];
                if (treeNode != null)
                    treeView.SelectedNode = treeNode;
            }

            if (this.TopNode != null)
            {
                TestSuiteTreeNode treeNode = treeView[this.TopNode];
                if (treeNode != null)
                    treeView.TopNode = treeNode;
            }

            if (this.SelectedCategories != null)
            {
                TestFilter filter = new CategoryFilter(this.SelectedCategories.Split(new char[] { ',' }));
                if (this.ExcludeCategories)
                    filter = new NotFilter(filter);
                treeView.CategoryFilter = filter;
            }

            treeView.Select();
        }