Merge pull request #2057 from directhex/monolite-on-jenkins
[mono.git] / mcs / class / System.Windows.Forms / System.Windows.Forms / MeasureItemEventArgs.cs
index a4c3db75a81f4563b8e176c3a21787406f0d8ed2..65759a002bbf1915750ba16d9ab52eaa2f7a8e1e 100644 (file)
@@ -1,96 +1,76 @@
+// 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:
 //
-// System.Windows.Forms.MeasureItemEventArgs.cs
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
 //
-// Author:
-//   stubbed out by Paul Osman (paul.osman@sympatico.ca)
-//     Partially completed by Dennis Hayes (dennish@raytek.com)
-//     Gianandrea Terzi (gianandrea.terzi@lario.com)
+// 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) 2004 Novell, Inc.
+//
+// Authors:
+//     Jordi Mas i Hernandez, jordi@ximian.com
 //
-// (C) 2002 Ximian, Inc
 //
 
-using System;
-using System.Reflection;
-using System.Globalization;
-//using System.Windows.Forms.AccessibleObject.IAccessible;
 using System.Drawing;
 
-namespace System.Windows.Forms  {
-
-
-       /// <summary>
-       /// </summary>
-
-       public class MeasureItemEventArgs : EventArgs {
-
-               #region Fields
-
+namespace System.Windows.Forms
+{
+       public class MeasureItemEventArgs : EventArgs
+       {
                private Graphics graphics;
                private int index;
-               private int itemheight = -1;
-               private int itemwidth = -1;
-
-               #endregion
-
-               //
-               //  --- Constructors
-               //
-               public MeasureItemEventArgs(Graphics graphics, int index)
+               private int itemHeight;
+               private int itemWidth = 0;
+               
+               public MeasureItemEventArgs (Graphics graphics, int index)
                {
-                       this.index = index;
                        this.graphics = graphics;
-               }
-
-               public MeasureItemEventArgs(Graphics graphics, int index, int itemheight) 
-               {
                        this.index = index;
-                       this.graphics = graphics;
-                       itemheight = ItemHeight;
-               }
-
-               #region Public Properties
-
-               public Graphics Graphics  
-               {
-                       get 
-                       { 
-                               return graphics;
-                       }
+                       this.itemHeight = 0;
                }
-
-               public int Index  
-               {
-                       get 
-                       {
-                               return index;
-                       }
-               }
-
-               public int ItemHeight  
+               
+               public MeasureItemEventArgs (Graphics graphics, int index, int itemHeight)
                {
-                       get 
-                       {
-                               return itemheight;
-                       }
-                       set 
-                       {
-                               itemheight = value;
-                       }
+                       this.graphics = graphics;
+                       this.index = index;
+                       this.itemHeight = itemHeight;
                }
-
-               public int ItemWidth  
-               {
-                       get 
-                       {
-                               return itemwidth;
-                       }
-                       set 
-                       {
-                               itemwidth = value;
-                       }
+               
+               #region Public Properties       
+                       
+               public Graphics Graphics {
+                       get { return graphics;}
+               }                                               
+               
+               public int Index {
+                       get { return index;}
+               }               
+               
+               public int ItemHeight {
+                       get { return itemHeight;}
+                       set { itemHeight = value;}
                }
-
-               #endregion
+               
+               public int ItemWidth {
+                       get { return itemWidth;}
+                       set { itemWidth = value;}
+               }               
+               
+               #endregion Public Properties            
        }
+
 }
-               
+