2007-01-02 Chris Toshok <toshok@ximian.com>
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / RowStyle.cs
index c8e4ba1d1201f2a35eea9b68ca9b215b2aa4f20a..fa0d3c8ccc5e1dbfd66e91b7fa7140fca820793c 100644 (file)
@@ -1,3 +1,6 @@
+//
+// RowStyle.cs
+//
 // 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
 // (C) 2004 Novell, Inc.
 //
 #if NET_2_0
-namespace System.Windows.Forms {
-
-       public class RowStyle : TableLayoutSettings.Style {
+namespace System.Windows.Forms 
+{
+       public class RowStyle : TableLayoutStyle 
+       {
                float height;
                
                public RowStyle ()
                {
+                       this.height = 0;
                }
 
-               public RowStyle (SizeType st
+               public RowStyle (SizeType sizeType
                {
-                       size_type = st;
+                       this.height = 0;
+                       base.SizeType = sizeType;
                }
 
-               public RowStyle (SizeType st, float height)
+               public RowStyle (SizeType sizeType, float height)
                {
-                       size_type = st;
+                       if (height < 0)
+                               throw new ArgumentOutOfRangeException("height");
+
+                       base.SizeType = sizeType;
                        this.height = height;
                }
 
                public float Height {
-                       get {
-                               return height;
+                       get { return this.height; }
+                       set {   
+                               if (value < 0)
+                                       throw new ArgumentOutOfRangeException();
+                               
+                               this.height = value; 
                        }
-
-                       set {
-                               height = value;
-                       }
-               }
+               }               
        }
 }
 #endif