- Removed Redraw (), we get it from ButtonBase.
authorRavindra <ravindra@mono-cvs.ximian.com>
Fri, 15 Oct 2004 13:25:50 +0000 (13:25 -0000)
committerRavindra <ravindra@mono-cvs.ximian.com>
Fri, 15 Oct 2004 13:25:50 +0000 (13:25 -0000)
- Implemented Paint (), to do class specific painting.

svn path=/trunk/mcs/; revision=35026

mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs

index bdd1964fcfe30392d51d77b2559c5c04204cafdb..65ea4b604a2973adf16fab34b3396bf866da6cdb 100644 (file)
 //
 //
 // $Log: CheckBox.cs,v $
+// Revision 1.9  2004/10/15 13:25:50  ravindra
+//     - Removed Redraw (), we get it from ButtonBase.
+//     - Implemented Paint (), to do class specific painting.
+//
 // Revision 1.8  2004/10/13 02:46:22  pbartok
 // - Fix from John BouAntoun: Now properly sets the Appearance property
 //
@@ -282,10 +286,13 @@ namespace System.Windows.Forms {
                #endregion      // Events
 
                #region Internal drawing code
-               internal override void Redraw() {\r
-                       ThemeEngine.Current.DrawCheckBox(this.DeviceContext, this.ClientRectangle, this);
-                       Refresh();
-               }\r
+               internal override void Paint (PaintEventArgs pe) {
+                       if (redraw) {
+                               ThemeEngine.Current.DrawCheckBox (this.DeviceContext, this.ClientRectangle, this);
+                               redraw = false;
+                       }
+                       pe.Graphics.DrawImage (this.ImageBuffer, pe.ClipRectangle, pe.ClipRectangle, GraphicsUnit.Pixel);
+               }
                #endregion      // Internal drawing code
        }
 }
index c10cbb7756667721bd4927ff831e6998541242f2..e536c41f8e021213f209eb2bc098e2fda102642f 100644 (file)
 //     Peter Bartok    pbartok@novell.com
 //
 // $Log: RadioButton.cs,v $
+// Revision 1.7  2004/10/15 13:25:50  ravindra
+//     - Removed Redraw (), we get it from ButtonBase.
+//     - Implemented Paint (), to do class specific painting.
+//
 // Revision 1.6  2004/10/05 18:23:54  jackson
 // Fix ctor
 //
@@ -287,9 +291,13 @@ namespace System.Windows.Forms {
                #endregion      // Events
 
                #region Internal Drawing Code
-               internal override void Redraw() {
-                       ThemeEngine.Current.DrawRadioButton(this.DeviceContext, this.ClientRectangle, this);
-                       Refresh();
+               internal override void Paint (PaintEventArgs pe) {
+                       if (redraw) {
+                               ThemeEngine.Current.DrawRadioButton(this.DeviceContext, this.ClientRectangle, this);
+                               redraw = false;
+                       }
+
+                       pe.Graphics.DrawImage (this.ImageBuffer, pe.ClipRectangle, pe.ClipRectangle, GraphicsUnit.Pixel);
                }
                #endregion      // Internal Drawing Code
        }