Update of /cvsroot/nunit/nunit20/nunit-gui
In directory sc8-pr-cvs1:/tmp/cvs-serv27406
Modified Files:
NunitForm.cs NunitForm.resx
Log Message:
made details list a variable height owner drawn list box to get the newlines to show up right
Index: NunitForm.cs
===================================================================
RCS file: /cvsroot/nunit/nunit20/nunit-gui/NunitForm.cs,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** NunitForm.cs 9 Dec 2002 04:20:33 -0000 1.52
--- NunitForm.cs 18 Dec 2002 15:18:01 -0000 1.53
***************
*** 64,68 ****
public System.Windows.Forms.MenuItem aboutMenuItem;
public System.Windows.Forms.MainMenu mainMenu;
! public System.Windows.Forms.ListBox detailList;
public System.Windows.Forms.Splitter splitter3;
public System.Windows.Forms.TextBox stackTrace;
--- 64,68 ----
public System.Windows.Forms.MenuItem aboutMenuItem;
public System.Windows.Forms.MainMenu mainMenu;
! private System.Windows.Forms.ListBox detailList;
public System.Windows.Forms.Splitter splitter3;
public System.Windows.Forms.TextBox stackTrace;
***************
*** 198,203 ****
this.configMenuItem = new System.Windows.Forms.MenuItem();
this.projectMenuSeparator1 = new System.Windows.Forms.MenuItem();
- this.addVSProjectMenuItem = new System.Windows.Forms.MenuItem();
this.addAssemblyMenuItem = new System.Windows.Forms.MenuItem();
this.projectMenuSeparator2 = new System.Windows.Forms.MenuItem();
this.editProjectMenuItem = new System.Windows.Forms.MenuItem();
--- 198,203 ----
this.configMenuItem = new System.Windows.Forms.MenuItem();
this.projectMenuSeparator1 = new System.Windows.Forms.MenuItem();
this.addAssemblyMenuItem = new System.Windows.Forms.MenuItem();
+ this.addVSProjectMenuItem = new System.Windows.Forms.MenuItem();
this.projectMenuSeparator2 = new System.Windows.Forms.MenuItem();
this.editProjectMenuItem = new System.Windows.Forms.MenuItem();
***************
*** 242,249 ****
//
this.statusBar.DisplayTestProgress = true;
! this.statusBar.Location = new System.Drawing.Point(0, 511);
this.statusBar.Name = "statusBar";
this.statusBar.ShowPanels = true;
! this.statusBar.Size = new System.Drawing.Size(931, 31);
this.statusBar.TabIndex = 0;
this.statusBar.Text = "Status";
--- 242,249 ----
//
this.statusBar.DisplayTestProgress = true;
! this.statusBar.Location = new System.Drawing.Point(0, 484);
this.statusBar.Name = "statusBar";
this.statusBar.ShowPanels = true;
! this.statusBar.Size = new System.Drawing.Size(850, 29);
this.statusBar.TabIndex = 0;
this.statusBar.Text = "Status";
***************
*** 453,462 ****
this.projectMenuSeparator1.Text = "-";
//
- // addVSProjectMenuItem
- //
- this.addVSProjectMenuItem.Index = 3;
- this.addVSProjectMenuItem.Text = "Add VS Project...";
- this.addVSProjectMenuItem.Click += new System.EventHandler(this.addVSProjectMenuItem_Click);
- //
// addAssemblyMenuItem
//
--- 453,456 ----
***************
*** 465,468 ****
--- 459,468 ----
this.addAssemblyMenuItem.Click += new System.EventHandler(this.addAssemblyMenuItem_Click);
//
+ // addVSProjectMenuItem
+ //
+ this.addVSProjectMenuItem.Index = 3;
+ this.addVSProjectMenuItem.Text = "Add VS Project...";
+ this.addVSProjectMenuItem.Click += new System.EventHandler(this.addVSProjectMenuItem_Click);
+ //
// projectMenuSeparator2
//
***************
*** 536,540 ****
this.testSuiteTreeView.HideSelection = false;
this.testSuiteTreeView.Name = "testSuiteTreeView";
! this.testSuiteTreeView.Size = new System.Drawing.Size(358, 511);
this.testSuiteTreeView.Sorted = true;
this.testSuiteTreeView.TabIndex = 1;
--- 536,540 ----
this.testSuiteTreeView.HideSelection = false;
this.testSuiteTreeView.Name = "testSuiteTreeView";
! this.testSuiteTreeView.Size = new System.Drawing.Size(327, 484);
this.testSuiteTreeView.Sorted = true;
this.testSuiteTreeView.TabIndex = 1;
***************
*** 543,550 ****
// splitter1
//
! this.splitter1.Location = new System.Drawing.Point(358, 0);
this.splitter1.MinSize = 240;
this.splitter1.Name = "splitter1";
! this.splitter1.Size = new System.Drawing.Size(6, 511);
this.splitter1.TabIndex = 2;
this.splitter1.TabStop = false;
--- 543,550 ----
// splitter1
//
! this.splitter1.Location = new System.Drawing.Point(327, 0);
this.splitter1.MinSize = 240;
this.splitter1.Name = "splitter1";
! this.splitter1.Size = new System.Drawing.Size(5, 484);
this.splitter1.TabIndex = 2;
this.splitter1.TabStop = false;
***************
*** 556,562 ****
this.groupBox1});
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
! this.panel1.Location = new System.Drawing.Point(364, 0);
this.panel1.Name = "panel1";
! this.panel1.Size = new System.Drawing.Size(567, 511);
this.panel1.TabIndex = 3;
//
--- 556,562 ----
this.groupBox1});
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
! this.panel1.Location = new System.Drawing.Point(332, 0);
this.panel1.Name = "panel1";
! this.panel1.Size = new System.Drawing.Size(518, 484);
this.panel1.TabIndex = 3;
//
***************
*** 569,576 ****
this.stdout});
this.resultTabs.Dock = System.Windows.Forms.DockStyle.Fill;
! this.resultTabs.Location = new System.Drawing.Point(0, 88);
this.resultTabs.Name = "resultTabs";
this.resultTabs.SelectedIndex = 0;
! this.resultTabs.Size = new System.Drawing.Size(567, 423);
this.resultTabs.TabIndex = 2;
//
--- 569,576 ----
this.stdout});
this.resultTabs.Dock = System.Windows.Forms.DockStyle.Fill;
! this.resultTabs.Location = new System.Drawing.Point(0, 83);
this.resultTabs.Name = "resultTabs";
this.resultTabs.SelectedIndex = 0;
! this.resultTabs.Size = new System.Drawing.Size(518, 401);
this.resultTabs.TabIndex = 2;
//
***************
*** 581,587 ****
this.splitter3,
this.detailList});
! this.errorPage.Location = new System.Drawing.Point(4, 25);
this.errorPage.Name = "errorPage";
! this.errorPage.Size = new System.Drawing.Size(559, 394);
this.errorPage.TabIndex = 0;
this.errorPage.Text = "Errors and Failures";
--- 581,587 ----
this.splitter3,
this.detailList});
! this.errorPage.Location = new System.Drawing.Point(4, 22);
this.errorPage.Name = "errorPage";
! this.errorPage.Size = new System.Drawing.Size(510, 375);
this.errorPage.TabIndex = 0;
this.errorPage.Text = "Errors and Failures";
***************
*** 591,600 ****
this.stackTrace.Dock = System.Windows.Forms.DockStyle.Fill;
this.stackTrace.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
! this.stackTrace.Location = new System.Drawing.Point(0, 127);
this.stackTrace.Multiline = true;
this.stackTrace.Name = "stackTrace";
this.stackTrace.ReadOnly = true;
this.stackTrace.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stackTrace.Size = new System.Drawing.Size(559, 267);
this.stackTrace.TabIndex = 2;
this.stackTrace.Text = "";
--- 591,600 ----
this.stackTrace.Dock = System.Windows.Forms.DockStyle.Fill;
this.stackTrace.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
! this.stackTrace.Location = new System.Drawing.Point(0, 119);
this.stackTrace.Multiline = true;
this.stackTrace.Name = "stackTrace";
this.stackTrace.ReadOnly = true;
this.stackTrace.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stackTrace.Size = new System.Drawing.Size(510, 256);
this.stackTrace.TabIndex = 2;
this.stackTrace.Text = "";
***************
*** 604,611 ****
//
this.splitter3.Dock = System.Windows.Forms.DockStyle.Top;
! this.splitter3.Location = new System.Drawing.Point(0, 124);
this.splitter3.MinSize = 100;
this.splitter3.Name = "splitter3";
! this.splitter3.Size = new System.Drawing.Size(559, 3);
this.splitter3.TabIndex = 1;
this.splitter3.TabStop = false;
--- 604,611 ----
//
this.splitter3.Dock = System.Windows.Forms.DockStyle.Top;
! this.splitter3.Location = new System.Drawing.Point(0, 116);
this.splitter3.MinSize = 100;
this.splitter3.Name = "splitter3";
! this.splitter3.Size = new System.Drawing.Size(510, 3);
this.splitter3.TabIndex = 1;
this.splitter3.TabStop = false;
***************
*** 614,625 ****
//
this.detailList.Dock = System.Windows.Forms.DockStyle.Top;
this.detailList.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.detailList.HorizontalExtent = 2000;
this.detailList.HorizontalScrollbar = true;
! this.detailList.ItemHeight = 20;
this.detailList.Name = "detailList";
this.detailList.ScrollAlwaysVisible = true;
! this.detailList.Size = new System.Drawing.Size(559, 124);
this.detailList.TabIndex = 0;
this.detailList.SelectedIndexChanged += new System.EventHandler(this.detailList_SelectedIndexChanged);
//
--- 614,628 ----
//
this.detailList.Dock = System.Windows.Forms.DockStyle.Top;
+ this.detailList.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.detailList.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.detailList.HorizontalExtent = 2000;
this.detailList.HorizontalScrollbar = true;
! this.detailList.ItemHeight = 16;
this.detailList.Name = "detailList";
this.detailList.ScrollAlwaysVisible = true;
! this.detailList.Size = new System.Drawing.Size(510, 116);
this.detailList.TabIndex = 0;
+ this.detailList.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.detailList_MeasureItem);
+ this.detailList.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.detailList_DrawItem);
this.detailList.SelectedIndexChanged += new System.EventHandler(this.detailList_SelectedIndexChanged);
//
***************
*** 628,634 ****
this.testsNotRun.Controls.AddRange(new System.Windows.Forms.Control[] {
this.notRunTree});
! this.testsNotRun.Location = new System.Drawing.Point(4, 25);
this.testsNotRun.Name = "testsNotRun";
! this.testsNotRun.Size = new System.Drawing.Size(559, 394);
this.testsNotRun.TabIndex = 1;
this.testsNotRun.Text = "Tests Not Run";
--- 631,637 ----
this.testsNotRun.Controls.AddRange(new System.Windows.Forms.Control[] {
this.notRunTree});
! this.testsNotRun.Location = new System.Drawing.Point(4, 22);
this.testsNotRun.Name = "testsNotRun";
! this.testsNotRun.Size = new System.Drawing.Size(510, 375);
this.testsNotRun.TabIndex = 1;
this.testsNotRun.Text = "Tests Not Run";
***************
*** 640,644 ****
this.notRunTree.Name = "notRunTree";
this.notRunTree.SelectedImageIndex = -1;
! this.notRunTree.Size = new System.Drawing.Size(559, 394);
this.notRunTree.TabIndex = 0;
//
--- 643,647 ----
this.notRunTree.Name = "notRunTree";
this.notRunTree.SelectedImageIndex = -1;
! this.notRunTree.Size = new System.Drawing.Size(510, 375);
this.notRunTree.TabIndex = 0;
//
***************
*** 647,653 ****
this.stderr.Controls.AddRange(new System.Windows.Forms.Control[] {
this.stdErrTab});
! this.stderr.Location = new System.Drawing.Point(4, 25);
this.stderr.Name = "stderr";
! this.stderr.Size = new System.Drawing.Size(559, 394);
this.stderr.TabIndex = 2;
this.stderr.Text = "Standard Error";
--- 650,656 ----
this.stderr.Controls.AddRange(new System.Windows.Forms.Control[] {
this.stdErrTab});
! this.stderr.Location = new System.Drawing.Point(4, 22);
this.stderr.Name = "stderr";
! this.stderr.Size = new System.Drawing.Size(510, 375);
this.stderr.TabIndex = 2;
this.stderr.Text = "Standard Error";
***************
*** 661,665 ****
this.stdErrTab.ReadOnly = true;
this.stdErrTab.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stdErrTab.Size = new System.Drawing.Size(559, 394);
this.stdErrTab.TabIndex = 0;
this.stdErrTab.Text = "";
--- 664,668 ----
this.stdErrTab.ReadOnly = true;
this.stdErrTab.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stdErrTab.Size = new System.Drawing.Size(510, 375);
this.stdErrTab.TabIndex = 0;
this.stdErrTab.Text = "";
***************
*** 670,676 ****
this.stdout.Controls.AddRange(new System.Windows.Forms.Control[] {
this.stdOutTab});
! this.stdout.Location = new System.Drawing.Point(4, 25);
this.stdout.Name = "stdout";
! this.stdout.Size = new System.Drawing.Size(559, 394);
this.stdout.TabIndex = 3;
this.stdout.Text = "Standard Out";
--- 673,679 ----
this.stdout.Controls.AddRange(new System.Windows.Forms.Control[] {
this.stdOutTab});
! this.stdout.Location = new System.Drawing.Point(4, 22);
this.stdout.Name = "stdout";
! this.stdout.Size = new System.Drawing.Size(510, 375);
this.stdout.TabIndex = 3;
this.stdout.Text = "Standard Out";
***************
*** 684,688 ****
this.stdOutTab.ReadOnly = true;
this.stdOutTab.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stdOutTab.Size = new System.Drawing.Size(559, 394);
this.stdOutTab.TabIndex = 0;
this.stdOutTab.Text = "";
--- 687,691 ----
this.stdOutTab.ReadOnly = true;
this.stdOutTab.ScrollBars = System.Windows.Forms.ScrollBars.Both;
! this.stdOutTab.Size = new System.Drawing.Size(510, 375);
this.stdOutTab.TabIndex = 0;
this.stdOutTab.Text = "";
***************
*** 698,702 ****
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Name = "groupBox1";
! this.groupBox1.Size = new System.Drawing.Size(567, 88);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
--- 701,705 ----
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Name = "groupBox1";
! this.groupBox1.Size = new System.Drawing.Size(518, 83);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
***************
*** 704,710 ****
// stopButton
//
! this.stopButton.Location = new System.Drawing.Point(96, 16);
this.stopButton.Name = "stopButton";
! this.stopButton.Size = new System.Drawing.Size(75, 30);
this.stopButton.TabIndex = 4;
this.stopButton.Text = "&Stop";
--- 707,713 ----
// stopButton
//
! this.stopButton.Location = new System.Drawing.Point(88, 15);
this.stopButton.Name = "stopButton";
! this.stopButton.Size = new System.Drawing.Size(68, 29);
this.stopButton.TabIndex = 4;
this.stopButton.Text = "&Stop";
***************
*** 713,719 ****
// runButton
//
! this.runButton.Location = new System.Drawing.Point(8, 16);
this.runButton.Name = "runButton";
! this.runButton.Size = new System.Drawing.Size(75, 30);
this.runButton.TabIndex = 3;
this.runButton.Text = "&Run";
--- 716,722 ----
// runButton
//
! this.runButton.Location = new System.Drawing.Point(7, 15);
this.runButton.Name = "runButton";
! this.runButton.Size = new System.Drawing.Size(69, 29);
this.runButton.TabIndex = 3;
this.runButton.Text = "&Run";
***************
*** 724,730 ****
this.suiteName.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
! this.suiteName.Location = new System.Drawing.Point(184, 24);
this.suiteName.Name = "suiteName";
! this.suiteName.Size = new System.Drawing.Size(359, 24);
this.suiteName.TabIndex = 2;
//
--- 727,733 ----
this.suiteName.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right);
! this.suiteName.Location = new System.Drawing.Point(168, 23);
this.suiteName.Name = "suiteName";
! this.suiteName.Size = new System.Drawing.Size(328, 22);
this.suiteName.TabIndex = 2;
//
***************
*** 736,744 ****
this.progressBar.Enabled = false;
this.progressBar.ForeColor = System.Drawing.SystemColors.Highlight;
! this.progressBar.Location = new System.Drawing.Point(8, 56);
this.progressBar.Maximum = 100;
this.progressBar.Minimum = 0;
this.progressBar.Name = "progressBar";
! this.progressBar.Size = new System.Drawing.Size(551, 24);
this.progressBar.Step = 1;
this.progressBar.TabIndex = 0;
--- 739,747 ----
this.progressBar.Enabled = false;
this.progressBar.ForeColor = System.Drawing.SystemColors.Highlight;
! this.progressBar.Location = new System.Drawing.Point(7, 53);
this.progressBar.Maximum = 100;
this.progressBar.Minimum = 0;
this.progressBar.Name = "progressBar";
! this.progressBar.Size = new System.Drawing.Size(504, 23);
this.progressBar.Step = 1;
this.progressBar.TabIndex = 0;
***************
*** 748,753 ****
//
this.AcceptButton = this.runButton;
! this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
! this.ClientSize = new System.Drawing.Size(931, 542);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.panel1,
--- 751,756 ----
//
this.AcceptButton = this.runButton;
! this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
! this.ClientSize = new System.Drawing.Size(850, 513);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.panel1,
***************
*** 1347,1350 ****
--- 1350,1375 ----
#endregion
+
+ private void detailList_MeasureItem(object sender, System.Windows.Forms.MeasureItemEventArgs e)
+ {
+ TestResultItem item = (TestResultItem) detailList.Items[e.Index];
+ string s = item.ToString();
+ SizeF size = e.Graphics.MeasureString(item.GetMessage(), detailList.Font);
+ e.ItemHeight = (int)size.Height;
+ e.ItemWidth = (int)size.Width;
+ }
+
+ private void detailList_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
+ {
+ if (e.Index >= 0)
+ {
+ e.DrawBackground();
+ TestResultItem item = (TestResultItem) detailList.Items[e.Index];
+ bool selected = ((e.State & DrawItemState.Selected) == DrawItemState.Selected) ? true : false;
+ Brush brush = selected ? Brushes.White : Brushes.Black;
+ e.Graphics.DrawString(item.GetMessage(),detailList.Font, brush, e.Bounds);
+
+ }
+ }
}
Index: NunitForm.resx
===================================================================
RCS file: /cvsroot/nunit/nunit20/nunit-gui/NunitForm.resx,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** NunitForm.resx 7 Dec 2002 05:41:17 -0000 1.13
--- NunitForm.resx 18 Dec 2002 15:18:02 -0000 1.14
***************
*** 148,154 ****
<value>Public</value>
</data>
- <data name="detailList.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>Public</value>
- </data>
<data name="testsNotRun.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Public</value>
--- 148,151 ----
|