Author: gert
Date: 2007-08-24 13:00:26 -0400 (Fri, 24 Aug 2007)
New Revision: 84813
Added:
trunk/gert/interactive/bug82531/
trunk/gert/interactive/bug82531/MainForm.cs
trunk/gert/interactive/bug82531/default.build
trunk/gert/interactive/bug82576/
trunk/gert/interactive/bug82576/MainForm.cs
trunk/gert/interactive/bug82576/default.build
trunk/gert/interactive/bug82577/
trunk/gert/interactive/bug82577/MainForm.cs
trunk/gert/interactive/bug82577/default.build
Modified:
trunk/gert/interactive/known_issues
Log:
Added tests bug #82531, #82576 and #82577.
Added: trunk/gert/interactive/bug82531/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug82531/MainForm.cs 2007-08-24 16:59:52 UTC (rev
84812)
+++ trunk/gert/interactive/bug82531/MainForm.cs 2007-08-24 17:00:26 UTC (rev
84813)
@@ -0,0 +1,113 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Threading;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _showDialogButton
+ //
+ _showDialogButton = new Button ();
+ _showDialogButton.Location = new Point (100, 20);
+ _showDialogButton.Size = new Size (80, 20);
+ _showDialogButton.Text = "Show Dialog";
+ _showDialogButton.Click += new EventHandler
(ShowDialogButton_Click);
+ Controls.Add (_showDialogButton);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (300, 60);
+ Location = new Point (250, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #82531";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ void ShowDialogButton_Click (object sender, EventArgs e)
+ {
+ CommonDialog commonDialog = new MyOpenCommonDialog ();
+ if (commonDialog.ShowDialog () != DialogResult.OK) {
+ MessageBox.Show ("DialogResult was not OK!!");
+ Environment.Exit (1);
+ } else {
+ Close ();
+ }
+ }
+
+ private Button _showDialogButton;
+}
+
+class MyOpenCommonDialog : CommonDialog
+{
+ protected override bool RunDialog (IntPtr hwndOwner)
+ {
+ DialogResult rslt = MessageBox.Show (
+ "Click OK", "bug #82531",
+ MessageBoxButtons.OKCancel);
+ return rslt == DialogResult.OK;
+ }
+
+ public override void Reset ()
+ {
+ }
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Click the Show Dialog button.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. A message box stating \"Click OK\" is
displayed.{0}{0}" +
+ "2. After clicking OK, but application exits cleanly.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (300, 165);
+ Location = new Point (650, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #82531";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug82531/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82531/default.build
===================================================================
--- trunk/gert/interactive/bug82531/default.build 2007-08-24 16:59:52 UTC
(rev 84812)
+++ trunk/gert/interactive/bug82531/default.build 2007-08-24 17:00:26 UTC
(rev 84813)
@@ -0,0 +1,62 @@
+<project name="bug82531" default="rebuild">
+ <target name="mono-1.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+ </target>
+
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-1.1">
+ <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/interactive/bug82531/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82576/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug82576/MainForm.cs 2007-08-24 16:59:52 UTC (rev
84812)
+++ trunk/gert/interactive/bug82576/MainForm.cs 2007-08-24 17:00:26 UTC (rev
84813)
@@ -0,0 +1,170 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.IO;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _dialogResultLabel
+ //
+ _dialogResultLabel = new Label ();
+ _dialogResultLabel.AutoSize = true;
+ _dialogResultLabel.Location = new Point (8, 8);
+ _dialogResultLabel.Text = "DialogResult:";
+ Controls.Add (_dialogResultLabel);
+ //
+ // _dialogResultText
+ //
+ _dialogResultText = new TextBox ();
+ _dialogResultText.Location = new Point (90, 8);
+ _dialogResultText.ReadOnly = true;
+ _dialogResultText.Size = new Size (80, 20);
+ _dialogResultText.TabStop = false;
+ Controls.Add (_dialogResultText);
+ //
+ // _selectedPathLabel
+ //
+ _selectedPathLabel = new Label ();
+ _selectedPathLabel.AutoSize = true;
+ _selectedPathLabel.Location = new Point (8, 40);
+ _selectedPathLabel.Text = "SelectedPath:";
+ Controls.Add (_selectedPathLabel);
+ //
+ // _selectedPathText
+ //
+ _selectedPathText = new TextBox ();
+ _selectedPathText.Location = new Point (90, 40);
+ _selectedPathText.ReadOnly = true;
+ _selectedPathText.Size = new Size (300, 20);
+ _selectedPathText.TabStop = false;
+ Controls.Add (_selectedPathText);
+ //
+ // _existsLabel
+ //
+ _existsLabel = new Label ();
+ _existsLabel.AutoSize = true;
+ _existsLabel.Location = new Point (8, 72);
+ _existsLabel.Text = "Exists:";
+ Controls.Add (_existsLabel);
+ //
+ // _folderExistsCheckBox
+ //
+ _folderExistsCheckBox = new CheckBox ();
+ _folderExistsCheckBox.Checked = false;
+ _folderExistsCheckBox.Enabled = false;
+ _folderExistsCheckBox.Location = new Point (90, 72);
+ _folderExistsCheckBox.TabStop = false;
+ Controls.Add (_folderExistsCheckBox);
+ //
+ // _selectFolderButton
+ //
+ _selectFolderButton = new Button ();
+ _selectFolderButton.Location = new Point (180, 104);
+ _selectFolderButton.Size = new Size (60, 20);
+ _selectFolderButton.Text = "Select";
+ _selectFolderButton.Click += new EventHandler
(SelectFolderButton_Click);
+ Controls.Add (_selectFolderButton);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (400, 140);
+ Location = new Point (200, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #82576";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ _fbd = new FolderBrowserDialog ();
+
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+ }
+
+ void SelectFolderButton_Click (object sender, EventArgs e)
+ {
+ DialogResult result = _fbd.ShowDialog (this);
+ _dialogResultText.Text = result.ToString ();
+
+ _selectedPathText.Text = _fbd.SelectedPath;
+ if (_selectedPathText.Text.Length > 0)
+ _folderExistsCheckBox.Checked = Directory.Exists
(_fbd.SelectedPath);
+ else
+ _folderExistsCheckBox.Checked = false;
+
+ }
+
+ private Label _dialogResultLabel;
+ private TextBox _dialogResultText;
+ private Label _selectedPathLabel;
+ private TextBox _selectedPathText;
+ private Label _existsLabel;
+ private CheckBox _folderExistsCheckBox;
+ private Button _selectFolderButton;
+ private FolderBrowserDialog _fbd;
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Click the Select button.{0}{0}" +
+ "2. Select the Desktop node.{0}{0}" +
+ "3. Click the Make New Folder button.{0}{0}" +
+ "4. Enter a non-existing directory name.{0}{0}" +
+ "5. Press the Enter key.{0}{0}" +
+ "6. Click the OK button.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. On step 3:{0}{0}" +
+ " * A \"New Folder\" node is added to the
Desktop.{0}" +
+ " * The label of the node can be edited.{0}{0}" +
+ "2. On step 6:{0}{0}" +
+ " * The FolderBrowserDialog is closed.{0}" +
+ " * DialogResult is OK.{0}" +
+ " * SelectedPath is the full path of the new
folder.{0}" +
+ " * The Exists checkbox is checked.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (300, 400);
+ Location = new Point (650, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #82576";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug82576/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82576/default.build
===================================================================
--- trunk/gert/interactive/bug82576/default.build 2007-08-24 16:59:52 UTC
(rev 84812)
+++ trunk/gert/interactive/bug82576/default.build 2007-08-24 17:00:26 UTC
(rev 84813)
@@ -0,0 +1,62 @@
+<project name="bug82576" default="rebuild">
+ <target name="mono-1.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+ </target>
+
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-1.1">
+ <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/interactive/bug82576/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82577/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug82577/MainForm.cs 2007-08-24 16:59:52 UTC (rev
84812)
+++ trunk/gert/interactive/bug82577/MainForm.cs 2007-08-24 17:00:26 UTC (rev
84813)
@@ -0,0 +1,156 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+class MainForm : Form
+{
+ public MainForm ()
+ {
+ //
+ // _treeView
+ //
+ _treeView = new TreeView ();
+ _treeView.Dock = DockStyle.Top;
+ _treeView.Height = 200;
+ _treeView.LabelEdit = true;
+ _treeView.AfterLabelEdit += new NodeLabelEditEventHandler
(TreeView_AfterLabelEdit);
+ Controls.Add (_treeView);
+ //
+ // _addNodeButton
+ //
+ _addNodeButton = new Button ();
+ _addNodeButton.Location = new Point (105, 210);
+ _addNodeButton.Text = "Add Node";
+ _addNodeButton.Click += new EventHandler (AddNodeButton_Click);
+ Controls.Add (_addNodeButton);
+ //
+ // MainForm
+ //
+ ClientSize = new Size (300, 245);
+ Location = new Point (250, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "bug #82577";
+ Load += new EventHandler (MainForm_Load);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.EnableVisualStyles ();
+ Application.Run (new MainForm ());
+ }
+
+ void MainForm_Load (object sender, EventArgs e)
+ {
+ InstructionsForm instructionsForm = new InstructionsForm ();
+ instructionsForm.Show ();
+
+ TreeNode root = new TreeNode ("My Computer");
+ _treeView.Nodes.Add (root);
+
+ root.Nodes.Add (new TreeNode (@"C:\"));
+ root.Nodes.Add (new TreeNode (@"D:\"));
+ root.Nodes.Add (new TreeNode (@"E:\"));
+ root.Nodes.Add (new TreeNode (@"F:\"));
+ root.Nodes.Add (new TreeNode (@"G:\"));
+ }
+
+ void TreeView_AfterLabelEdit (object sender, NodeLabelEditEventArgs e)
+ {
+ if (e.Label == null)
+ return;
+
+ if (e.Label == "REFUSE") {
+ e.CancelEdit = true;
+ e.Node.BeginEdit ();
+ }
+ }
+
+ void AddNodeButton_Click (object sender, EventArgs e)
+ {
+ TreeNode selected = _treeView.SelectedNode;
+ if (selected == null)
+ return;
+
+ TreeNode new_node = new TreeNode ("New Node");
+ selected.Nodes.Add (new_node);
+ selected.Expand ();
+ new_node.BeginEdit ();
+ }
+
+ private TreeView _treeView;
+ private Button _addNodeButton;
+}
+
+class MyControl : Control
+{
+ public MyControl ()
+ {
+ this.SuspendLayout ();
+ //
+ // _textBox
+ //
+ _textBox = new TextBox ();
+ _textBox.Anchor = AnchorStyles.Left | AnchorStyles.Top |
AnchorStyles.Right | AnchorStyles.Bottom;
+ _textBox.Location = new Point (0, 0);
+ _textBox.Multiline = true;
+ _textBox.Size = new Size (60, 60);
+ Controls.Add (_textBox);
+ //
+ // MyControl
+ //
+ BackColor = Color.Red;
+ Size = new Size (292, 271);
+ ResumeLayout (false);
+ PerformLayout ();
+ }
+
+ private TextBox _textBox;
+}
+
+public class InstructionsForm : Form
+{
+ public InstructionsForm ()
+ {
+ //
+ // _tabControl
+ //
+ _tabControl = new TabControl ();
+ _tabControl.Dock = DockStyle.Fill;
+ Controls.Add (_tabControl);
+ //
+ // _bugDescriptionText1
+ //
+ _bugDescriptionText1 = new TextBox ();
+ _bugDescriptionText1.Dock = DockStyle.Fill;
+ _bugDescriptionText1.Multiline = true;
+ _bugDescriptionText1.Text = string.Format
(CultureInfo.InvariantCulture,
+ "Steps to execute:{0}{0}" +
+ "1. Select the My Computer node.{0}{0}" +
+ "2. Click the Add Node button.{0}{0}" +
+ "3. Enter REFUSE as label.{0}{0}" +
+ "Expected result:{0}{0}" +
+ "1. The label changes back to \"New Node\".{0}{0}" +
+ "2. The label remains editable.",
+ Environment.NewLine);
+ //
+ // _tabPage1
+ //
+ _tabPage1 = new TabPage ();
+ _tabPage1.Text = "#1";
+ _tabPage1.Controls.Add (_bugDescriptionText1);
+ _tabControl.Controls.Add (_tabPage1);
+ //
+ // InstructionsForm
+ //
+ ClientSize = new Size (300, 220);
+ Location = new Point (600, 100);
+ StartPosition = FormStartPosition.Manual;
+ Text = "Instructions - bug #82577";
+ }
+
+ private TextBox _bugDescriptionText1;
+ private TabControl _tabControl;
+ private TabPage _tabPage1;
+}
Property changes on: trunk/gert/interactive/bug82577/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/interactive/bug82577/default.build
===================================================================
--- trunk/gert/interactive/bug82577/default.build 2007-08-24 16:59:52 UTC
(rev 84812)
+++ trunk/gert/interactive/bug82577/default.build 2007-08-24 17:00:26 UTC
(rev 84813)
@@ -0,0 +1,62 @@
+<project name="bug82577" default="rebuild">
+ <target name="mono-1.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,ONLY_1_1,MONO" />
+ </target>
+
+ <target name="mono-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0,MONO" />
+ </target>
+
+ <target name="net-1.1">
+ <property name="csc.defines" value="NET_1_0,NET_1_1,ONLY_1_1" />
+ </target>
+
+ <target name="net-2.0">
+ <property name="csc.defines"
value="NET_1_0,NET_1_1,NET_2_0,ONLY_2_0" />
+ </target>
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="build">
+ <property name="original.targetframework"
value="${nant.settings.currentframework}" />
+
+ <foreach property="framework" item="String" in="${frameworks}"
delim=",">
+ <if test="${framework::exists(framework)}">
+ <property name="nant.settings.currentframework"
value="${framework}" />
+ <call
target="${nant.settings.currentframework}" />
+ <call target="run" />
+ <call target="clean" />
+ </if>
+ </foreach>
+
+ <property name="nant.settings.currentframework"
value="${original.targetframework}" />
+ </target>
+
+ <target name="compile">
+ <csc target="winexe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="MainForm.cs" />
+ </sources>
+ <references>
+ <include name="System.Drawing.dll" />
+ <include name="System.Windows.Forms.dll" />
+ </references>
+ </csc>
+ </target>
+
+ <target name="run" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+
+ <target name="rebuild" depends="clean, build" />
+</project>
Property changes on: trunk/gert/interactive/bug82577/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/gert/interactive/known_issues
===================================================================
--- trunk/gert/interactive/known_issues 2007-08-24 16:59:52 UTC (rev 84812)
+++ trunk/gert/interactive/known_issues 2007-08-24 17:00:26 UTC (rev 84813)
@@ -121,4 +121,5 @@
bug82486/**
bug82488/**
bug82511/**
-bug82549/**
+bug82576/**
+bug82577/**
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches