Author: pbartok
Date: 2005-06-09 23:03:23 -0400 (Thu, 09 Jun 2005)
New Revision: 45726
Added:
trunk/winforms/updown/swf-updown.cs
Removed:
trunk/winforms/updown/swf-numericupdown.cs
Modified:
trunk/winforms/updown/Makefile
Log:
- More complete testcase
Modified: trunk/winforms/updown/Makefile
===================================================================
--- trunk/winforms/updown/Makefile 2005-06-10 00:13:48 UTC (rev 45725)
+++ trunk/winforms/updown/Makefile 2005-06-10 03:03:23 UTC (rev 45726)
@@ -1,11 +1,7 @@
all: mono
-mono: swf-numericupdown.cs
- mcs swf-numericupdown.cs /r:System.Windows.Forms.dll
/r:System.Drawing.dll
+mono: swf-updown.cs
+ mcs swf-updown.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
-dotnet: swf-numericupdown.cs
- csc swf-numericupdown.cs /r:System.Windows.Forms.dll
/r:System.Drawing.dll
-
clean:
- rm swf-numericupdown.exe -r -f
-
+ rm swf-updown.exe -r -f
Deleted: trunk/winforms/updown/swf-numericupdown.cs
===================================================================
--- trunk/winforms/updown/swf-numericupdown.cs 2005-06-10 00:13:48 UTC (rev
45725)
+++ trunk/winforms/updown/swf-numericupdown.cs 2005-06-10 03:03:23 UTC (rev
45726)
@@ -1,74 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc.
-//
-// Authors:
-// Jordi Mas i Hernandez, [EMAIL PROTECTED]
-//
-//
-// Simple NumericUpDown Control sample
-//
-
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-
-namespace MyFormProject
-{
- class MainForm : Form
- {
- private NumericUpDown updown = new NumericUpDown ();
-
- public MainForm()
- {
- InitializeComponent();
- }
-
- void InitializeComponent()
- {
- SuspendLayout ();
-
- /* Numeric up/down */
- updown.ValueChanged += new System.EventHandler
(OnValueChanged);
- Console.WriteLine ("PreferredHeight {0}",
updown.PreferredHeight);
-
- //
- // MainForm
- //
- ClientSize = new System.Drawing.Size (400, 400);
- Controls.AddRange(new Control[] { updown});
-
- Text = "Simple NumericUpDown sample";
- ResumeLayout (false);
-
- }
-
- private void OnValueChanged (object sender, System.EventArgs e)
- {
- Console.WriteLine ("Value Changed to {0}",
updown.Value);
- //Console.WriteLine ("Value Changed");
- }
-
- public static void Main (string[] args)
- {
- Application.Run (new MainForm ());
- }
- }
-}
Added: trunk/winforms/updown/swf-updown.cs
===================================================================
--- trunk/winforms/updown/swf-updown.cs 2005-06-10 00:13:48 UTC (rev 45725)
+++ trunk/winforms/updown/swf-updown.cs 2005-06-10 03:03:23 UTC (rev 45726)
@@ -0,0 +1,104 @@
+using System;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Forms;
+using System.Threading;
+
+namespace MyFormProject
+{
+ public class MainForm : System.Windows.Forms.Form
+ {
+ static int count;
+ private DomainUpDown upDown1;
+ private DomainUpDown upDown2;
+ private DomainUpDown upDown1ro;
+ private DomainUpDown upDown2ro;
+ private string upDownString1 = "Test 1";
+ private string upDownString2 = "Test 2";
+ private string upDownString3 = "Test 3";
+ private string upDownString4 = "Test 4";
+ private NumericUpDown upDown3;
+ private NumericUpDown upDown4;
+ private NumericUpDown upDown3ro;
+ private NumericUpDown upDown4ro;
+
+ // Calendar
+ private System.Windows.Forms.Button updown1;
+
+ public MainForm()
+ {
+ InitializeComponent();
+
+ }
+
+ private void InitializeComponent()
+ {
+ count = 0;
+
+ upDown1 = new DomainUpDown();
+ upDown1.Location = new Point(10, 10);
+ // upDown1.Size = new Size(80, 30);
+ upDown2 = new DomainUpDown();
+ upDown2.Location = new Point(10, 50);
+ // upDown2.Size = new Size(80, 30);
+ upDown2.UpDownAlign = LeftRightAlignment.Left;
+ upDown3 = new NumericUpDown();
+ upDown3.Location = new Point(10, 90);
+ upDown3.ValueChanged += new
EventHandler(MainForm_ValueChanged);
+ upDown4 = new NumericUpDown();
+ upDown4.Location = new Point(10, 130);
+ upDown4.UpDownAlign = LeftRightAlignment.Left;
+ upDown1ro = new DomainUpDown();
+ upDown1ro.Location = new Point(150, 10);
+ upDown1ro.ReadOnly = true;
+ upDown2ro = new DomainUpDown();
+ upDown2ro.Location = new Point(150, 50);
+ upDown2ro.UpDownAlign = LeftRightAlignment.Left;
+ upDown2ro.ReadOnly = true;
+ upDown3ro = new NumericUpDown();
+ upDown3ro.Location = new Point(150, 90);
+ upDown3ro.ReadOnly = true;
+ upDown4ro = new NumericUpDown();
+ upDown4ro.Location = new Point(150, 130);
+ upDown4ro.UpDownAlign = LeftRightAlignment.Left;
+ upDown4ro.ReadOnly = true;
+ this.Controls.AddRange(new Control[] {upDown1,
upDown1ro, upDown2, upDown2ro
+ , upDown3,
upDown3ro, upDown4, upDown4ro});
+ upDown1.Items.Add(upDownString1);
+ upDown1.Items.Add(upDownString2);
+ upDown1.Items.Add(upDownString3);
+ upDown1.Items.Add(upDownString4);
+ upDown2.Items.Add(upDownString1);
+ upDown2.Items.Add(upDownString2);
+ upDown2.Items.Add(upDownString3);
+ upDown2.Items.Add(upDownString4);
+ upDown1ro.Items.Add(upDownString1);
+ upDown1ro.Items.Add(upDownString2);
+ upDown1ro.Items.Add(upDownString3);
+ upDown1ro.Items.Add(upDownString4);
+ upDown2ro.Items.Add(upDownString1);
+ upDown2ro.Items.Add(upDownString2);
+ upDown2ro.Items.Add(upDownString3);
+ upDown2ro.Items.Add(upDownString4);
+
+ Console.WriteLine("upDown1.ToString: {0}",
upDown1.ToString());
+ //
+ // MainForm
+ //
+ this.ClientSize = new System.Drawing.Size(472, 382);
+
+ this.Name = "MainForm";
+ this.Text = "SWF-UpDown";
+ }
+
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new MainForm());
+ }
+
+ void MainForm_ValueChanged(object sender, EventArgs e) {
+ Console.WriteLine("value changed {0}", upDown3.Value);
+ }
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches