Author: gert
Date: 2008-02-09 03:03:01 -0500 (Sat, 09 Feb 2008)
New Revision: 95320

Added:
   trunk/gert/interactive/bug336296/
   trunk/gert/interactive/bug336296/MainForm.cs
   trunk/gert/interactive/bug336296/default.build
Log:
Added test for bug #336296.


Added: trunk/gert/interactive/bug336296/MainForm.cs
===================================================================
--- trunk/gert/interactive/bug336296/MainForm.cs        2008-02-09 01:36:42 UTC 
(rev 95319)
+++ trunk/gert/interactive/bug336296/MainForm.cs        2008-02-09 08:03:01 UTC 
(rev 95320)
@@ -0,0 +1,109 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+       public MainForm ()
+       {
+               // 
+               // _menuStrip
+               // 
+               _menuStrip = new MenuStrip ();
+               _menuStrip.Items.Add (new ToolStripMenuItem ("main", null,
+                       new ToolStripMenuItem ("item1")));
+               MainMenuStrip = _menuStrip;
+               Controls.Add (_menuStrip);
+               // 
+               // MainForm
+               // 
+               ClientSize = new Size (390, 340);
+               IsMdiContainer = true;
+               Location = new Point (250, 100);
+               StartPosition = FormStartPosition.Manual;
+               Text = "bug #336296";
+               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 ();
+
+               Form child1 = new Form ();
+               child1.BackColor = Color.Blue;
+               child1.Height = 200;
+               child1.MdiParent = this;
+               child1.Text = "Child #1";
+               child1.Show ();
+
+               Form child2 = new Form ();
+               child2.BackColor = Color.Red;
+               child2.Height = 200;
+               child2.MdiParent = this;
+               child2.Text = "Child #2";
+               child2.Show ();
+
+               Form child3 = new Form ();
+               child3.BackColor = Color.Green;
+               child3.Height = 200;
+               child3.MdiParent = this;
+               child3.Text = "Child #3";
+               child3.Show ();
+       }
+
+       private MenuStrip _menuStrip;
+}
+
+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. Maximize the Child #2 form.{0}{0}" +
+                       "2. Click the restore / unmaximize button.{0}{0}" +
+                       "Expected result:{0}{0}" +
+                       "1. The form is restored to its original size and " +
+                       "position.",
+                       Environment.NewLine);
+               // 
+               // _tabPage1
+               // 
+               _tabPage1 = new TabPage ();
+               _tabPage1.Text = "#1";
+               _tabPage1.Controls.Add (_bugDescriptionText1);
+               _tabControl.Controls.Add (_tabPage1);
+               // 
+               // InstructionsForm
+               // 
+               ClientSize = new Size (310, 170);
+               Location = new Point (690, 100);
+               StartPosition = FormStartPosition.Manual;
+               Text = "Instructions - bug #336296";
+       }
+
+       private TextBox _bugDescriptionText1;
+       private TabControl _tabControl;
+       private TabPage _tabPage1;
+}


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

Added: trunk/gert/interactive/bug336296/default.build
===================================================================
--- trunk/gert/interactive/bug336296/default.build      2008-02-09 01:36:42 UTC 
(rev 95319)
+++ trunk/gert/interactive/bug336296/default.build      2008-02-09 08:03:01 UTC 
(rev 95320)
@@ -0,0 +1,31 @@
+<project name="bug336296" default="rebuild">
+       <include buildfile="../../build/common.build" />
+       
+       <property name="frameworks" value="mono-2.0,net-2.0" />
+
+       <target name="clean">
+               <delete>
+                       <fileset>
+                               <include name="out" />
+                               <include name="test.exe" />
+                       </fileset>
+               </delete>
+       </target>
+
+       <target name="compile" depends="init">
+               <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-test" depends="compile">
+               <exec program="test.exe" managed="true" output="out" />
+               <fail if="${file::exists('out')}" />
+       </target>
+</project>


Property changes on: trunk/gert/interactive/bug336296/default.build
___________________________________________________________________
Name: svn:eol-style
   + native

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

Reply via email to