Ejemplo n.º 1
0
        public void PluginItem_Click_Raises_SelectedRenderedChanged()
        {
            ErrorToolbar      toolbar = new ErrorToolbar();
            StackTraceDisplay raw     = new StackTraceDisplay();
            SourceCodeDisplay code    = new SourceCodeDisplay();

            toolbar.Register(raw);
            toolbar.Register(code);

            raw.PluginItem.PerformClick();
            Assert.NotNull(toolbar.SelectedDisplay);
            Assert.That(toolbar.SelectedDisplay, Is.EqualTo(raw));

            code.PluginItem.PerformClick();
            Assert.NotNull(toolbar.SelectedDisplay);
            Assert.That(toolbar.SelectedDisplay, Is.EqualTo(code));

            return;
        }
Ejemplo n.º 2
0
        public void Set_Or_Unset_Check_Flag_On_Selection()
        {
            ErrorToolbar      toolbar = new ErrorToolbar();
            StackTraceDisplay raw     = new StackTraceDisplay();
            SourceCodeDisplay code    = new SourceCodeDisplay();

            toolbar.Register(raw);
            toolbar.Register(code);

            toolbar.SelectedDisplay = raw;
            Assert.True(((ToolStripButton)raw.PluginItem).Checked);
            Assert.False(((ToolStripButton)code.PluginItem).Checked);

            toolbar.SelectedDisplay = code;
            Assert.False(((ToolStripButton)raw.PluginItem).Checked);
            Assert.True(((ToolStripButton)code.PluginItem).Checked);

            toolbar.SelectedDisplay = null;
            Assert.False(((ToolStripButton)raw.PluginItem).Checked);
            Assert.False(((ToolStripButton)code.PluginItem).Checked);

            return;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.detailList  = new System.Windows.Forms.ListBox();
            this.tabSplitter = new System.Windows.Forms.Splitter();

            this.errorBrowser          = new NUnit.UiException.Controls.ErrorBrowser();
            this.sourceCode            = new SourceCodeDisplay();
            this.stackTraceDisplay     = new StackTraceDisplay();
            this.detailListContextMenu = new System.Windows.Forms.ContextMenu();
            this.copyDetailMenuItem    = new System.Windows.Forms.MenuItem();
            this.SuspendLayout();
            //
            // detailList
            //
            this.detailList.Dock                  = System.Windows.Forms.DockStyle.Top;
            this.detailList.DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawVariable;
            this.detailList.Font                  = DefaultFixedFont;
            this.detailList.HorizontalExtent      = 2000;
            this.detailList.HorizontalScrollbar   = true;
            this.detailList.ItemHeight            = 16;
            this.detailList.Location              = new System.Drawing.Point(0, 0);
            this.detailList.Name                  = "detailList";
            this.detailList.ScrollAlwaysVisible   = true;
            this.detailList.Size                  = new System.Drawing.Size(496, 128);
            this.detailList.TabIndex              = 1;
            this.detailList.Resize               += new System.EventHandler(this.detailList_Resize);
            this.detailList.MouseHover           += new System.EventHandler(this.OnMouseHover);
            this.detailList.MeasureItem          += new System.Windows.Forms.MeasureItemEventHandler(this.detailList_MeasureItem);
            this.detailList.MouseMove            += new System.Windows.Forms.MouseEventHandler(this.detailList_MouseMove);
            this.detailList.MouseLeave           += new System.EventHandler(this.detailList_MouseLeave);
            this.detailList.DrawItem             += new System.Windows.Forms.DrawItemEventHandler(this.detailList_DrawItem);
            this.detailList.SelectedIndexChanged += new System.EventHandler(this.detailList_SelectedIndexChanged);
            //
            // tabSplitter
            //
            this.tabSplitter.Dock           = System.Windows.Forms.DockStyle.Top;
            this.tabSplitter.Location       = new System.Drawing.Point(0, 128);
            this.tabSplitter.MinSize        = 100;
            this.tabSplitter.Name           = "tabSplitter";
            this.tabSplitter.Size           = new System.Drawing.Size(496, 9);
            this.tabSplitter.TabIndex       = 3;
            this.tabSplitter.TabStop        = false;
            this.tabSplitter.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.tabSplitter_SplitterMoved);
            //
            // errorBrowser
            //
            this.errorBrowser.Dock             = System.Windows.Forms.DockStyle.Fill;
            this.errorBrowser.Location         = new System.Drawing.Point(0, 137);
            this.errorBrowser.Name             = "errorBrowser";
            this.errorBrowser.Size             = new System.Drawing.Size(496, 151);
            this.errorBrowser.StackTraceSource = null;
            this.errorBrowser.TabIndex         = 4;
            //
            // configure and register SourceCodeDisplay
            //
            this.sourceCode.AutoSelectFirstItem = true;
            this.sourceCode.ListOrderPolicy     = ErrorListOrderPolicy.ReverseOrder;
            this.sourceCode.SplitOrientation    = Orientation.Vertical;
            this.sourceCode.SplitterDistance    = 0.3f;
            this.stackTraceDisplay.Font         = DefaultFixedFont;
            this.errorBrowser.RegisterDisplay(sourceCode);
            this.errorBrowser.RegisterDisplay(stackTraceDisplay);
            //
            // detailListContextMenu
            //
            this.detailListContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                this.copyDetailMenuItem
            });
            //
            // copyDetailMenuItem
            //
            this.copyDetailMenuItem.Index  = 0;
            this.copyDetailMenuItem.Text   = "Copy";
            this.copyDetailMenuItem.Click += new System.EventHandler(this.copyDetailMenuItem_Click);
            //
            // ErrorDisplay
            //
            this.Controls.Add(this.errorBrowser);
            this.Controls.Add(this.tabSplitter);
            this.Controls.Add(this.detailList);
            this.Name = "ErrorDisplay";
            this.Size = new System.Drawing.Size(496, 288);
            this.ResumeLayout(false);
        }
Ejemplo n.º 4
0
 public void SetUp()
 {
     _traceDisplay = new StackTraceDisplay();
 }