Author: gert
Date: 2007-07-21 08:47:05 -0400 (Sat, 21 Jul 2007)
New Revision: 82413

Added:
   trunk/gert/interactive/bug82136/
   trunk/gert/interactive/bug82136/MainForm.cs
   trunk/gert/interactive/bug82136/default.build
Modified:
   trunk/gert/interactive/known_issues
Log:
Added test for bug #82136.


Added: trunk/gert/interactive/bug82136/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug82136/MainForm.cs 2007-07-21 12:19:27 UTC (rev 
82412)
+++ trunk/gert/interactive/bug82136/MainForm.cs 2007-07-21 12:47:05 UTC (rev 
82413)
@@ -0,0 +1,169 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+       public MainForm ()
+       {
+               // 
+               // _showModalButton
+               // 
+               _showModalButton = new Button ();
+               _showModalButton.Location = new Point (64, 80);
+               _showModalButton.Size = new Size (168, 23);
+               _showModalButton.Text = "Show First Modal Window";
+               _showModalButton.Click += new EventHandler 
(ShowModalButton_Click);
+               Controls.Add (_showModalButton);
+               // 
+               // MainForm
+               // 
+               AutoScaleBaseSize = new Size (5, 13);
+               ClientSize = new Size (304, 198);
+               FormBorderStyle = FormBorderStyle.FixedSingle;
+               StartPosition = FormStartPosition.CenterScreen;
+               Text = "bug #82136";
+               Load += new EventHandler (MainForm_Load);
+       }
+
+       [STAThread]
+       static void Main ()
+       {
+               Application.Run (new MainForm ());
+       }
+
+       void ShowModalButton_Click (object sender, EventArgs e)
+       {
+               Form modal1 = new Modal1 ();
+               modal1.ShowDialog ();
+       }
+
+       void MainForm_Load (object sender, EventArgs e)
+       {
+               InstructionsForm instructionsForm = new InstructionsForm ();
+               instructionsForm.Show ();
+
+               ShowModalButton_Click (sender, e);
+       }
+
+       private Button _showModalButton;
+}
+
+public class Modal1 : Form
+{
+       public Modal1 ()
+       {
+               // 
+               // _showModalButton
+               // 
+               _showModalButton = new Button ();
+               _showModalButton.Location = new Point (32, 72);
+               _showModalButton.Size = new Size (176, 23);
+               _showModalButton.TabIndex = 1;
+               _showModalButton.Text = "Show Second Modal Window";
+               _showModalButton.Click += new EventHandler 
(ShowModalButton_Click);
+               Controls.Add (_showModalButton);
+               // 
+               // Modal1
+               // 
+               AutoScaleBaseSize = new Size (5, 13);
+               ClientSize = new Size (248, 126);
+               Location = new Point (300, 100);
+               StartPosition = FormStartPosition.Manual;
+               Text = "Modal1";
+               Activated += new EventHandler (Modal1_Activated);
+       }
+
+       void ShowModalButton_Click (object sender, EventArgs e)
+       {
+               Form modal2 = new Modal2 ();
+               modal2.ShowDialog ();
+       }
+
+       void Modal1_Activated (object sender, EventArgs e)
+       {
+               ShowModalButton_Click (sender, e);
+       }
+
+       private Button _showModalButton;
+}
+
+public class Modal2 : Form
+{
+       public Modal2 ()
+       {
+               // 
+               // _quitButton
+               // 
+               _quitButton = new Button ();
+               _quitButton.Location = new Point (64, 32);
+               _quitButton.Size = new Size (104, 23);
+               _quitButton.TabIndex = 0;
+               _quitButton.Text = "Quit";
+               _quitButton.Click += new EventHandler (QuitButton_Click);
+               Controls.Add (_quitButton);
+               // 
+               // Modal2
+               // 
+               AutoScaleBaseSize = new Size (5, 13);
+               ClientSize = new Size (224, 86);
+               Text = "Modal2";
+       }
+
+       void QuitButton_Click (object sender, EventArgs e)
+       {
+               Application.Exit ();
+       }
+
+       private Button _quitButton;
+}
+
+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,
+                       "Expected result on start-up:{0}{0}" +
+                       "1. A single Modal2 form is displayed.{0}{0}" +
+                       "2. The Modal2 form hs focus and is on top of the 
Z-order.{0}{0}" +
+                       "======================{0}{0}" +
+                       "Steps to execute:{0}{0}" +
+                       "1. Close the Modal2 form using the control box.{0}{0}" 
+
+                       "Expected result:{0}{0}" +
+                       "1. The Modal2 form is closed.{0}{0}" +
+                       "2. A single new Modal2 form is displayed.{0}{0}" +
+                       "3. Repeating step 1 always yields the same result.",
+                       Environment.NewLine);
+               // 
+               // _tabPage1
+               // 
+               _tabPage1 = new TabPage ();
+               _tabPage1.Text = "#1";
+               _tabPage1.Controls.Add (_bugDescriptionText1);
+               _tabControl.Controls.Add (_tabPage1);
+               // 
+               // InstructionsForm
+               // 
+               ClientSize = new Size (360, 300);
+               Location = new Point (600, 100);
+               StartPosition = FormStartPosition.Manual;
+               Text = "Instructions - bug #82136";
+       }
+
+       private TextBox _bugDescriptionText1;
+       private TabControl _tabControl;
+       private TabPage _tabPage1;
+}


Property changes on: trunk/gert/interactive/bug82136/MainForm.cs
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/gert/interactive/bug82136/default.build
===================================================================
--- trunk/gert/interactive/bug82136/default.build       2007-07-21 12:19:27 UTC 
(rev 82412)
+++ trunk/gert/interactive/bug82136/default.build       2007-07-21 12:47:05 UTC 
(rev 82413)
@@ -0,0 +1,62 @@
+<project name="bug82136" 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/bug82136/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: trunk/gert/interactive/known_issues
===================================================================
--- trunk/gert/interactive/known_issues 2007-07-21 12:19:27 UTC (rev 82412)
+++ trunk/gert/interactive/known_issues 2007-07-21 12:47:05 UTC (rev 82413)
@@ -93,5 +93,6 @@
 bug81957/**
 bug82097/**
 bug82100/**
+bug82136/**
 bug82154/**
 bug82155/**

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to