Author: jackson
Date: 2005-10-10 16:00:15 -0400 (Mon, 10 Oct 2005)
New Revision: 51529
Added:
trunk/winforms/scrolling/
trunk/winforms/scrolling/Makefile
trunk/winforms/scrolling/swf-scrolling.cs
Log:
Sample test that shows scrolling behavoir.
Added: trunk/winforms/scrolling/Makefile
===================================================================
--- trunk/winforms/scrolling/Makefile 2005-10-10 19:04:45 UTC (rev 51528)
+++ trunk/winforms/scrolling/Makefile 2005-10-10 20:00:15 UTC (rev 51529)
@@ -0,0 +1,10 @@
+all: mono
+
+mono: swf-scrolling.cs
+ mcs swf-scrolling.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+
+dotnet: swf-scrolling.cs
+ csc swf-scrolling.cs /r:System.Windows.Forms.dll /r:System.Drawing.dll
+
+clean:
+ rm swf-scrolling.exe -r -f
\ No newline at end of file
Added: trunk/winforms/scrolling/swf-scrolling.cs
===================================================================
--- trunk/winforms/scrolling/swf-scrolling.cs 2005-10-10 19:04:45 UTC (rev
51528)
+++ trunk/winforms/scrolling/swf-scrolling.cs 2005-10-10 20:00:15 UTC (rev
51529)
@@ -0,0 +1,54 @@
+//
+// Simple test of our scrolling behavoir
+//
+// Author(s):
+// Jackson Harper
+//
+// Copyright (c) 2005 Novell, Inc.
+//
+
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+
+public class ScrollingTest : Form {
+
+ private ScrollableControl scrollable;
+ private int paint_count;
+ private Button paint_count_button;
+
+ public ScrollingTest ()
+ {
+ paint_count_button = new Button ();
+ paint_count_button.Text = "Print Paint Count (stdout)";
+ paint_count_button.Dock = DockStyle.Bottom;
+ paint_count_button.Click += new EventHandler (PrintPaintCount);
+
+ scrollable = new ScrollableControl ();
+ scrollable.Dock = DockStyle.Fill;
+ scrollable.BackColor = Color.Red;
+ scrollable.Paint += new PaintEventHandler (PaintArea);
+
+ Controls.Add (paint_count_button);
+ Controls.Add (scrollable);
+ }
+
+ private void PaintArea (object sender, PaintEventArgs pe)
+ {
+ pe.Graphics.FillRectangle (new SolidBrush (Color.Blue),
pe.ClipRectangle);
+ paint_count++;
+ }
+
+ private void PrintPaintCount (object sender, EventArgs e)
+ {
+ Console.WriteLine ("Paint Count: {0}", paint_count);
+ }
+
+ public static void Main ()
+ {
+ Application.Run (new ScrollingTest ());
+ }
+}
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches