Browse Source

Modifications related to GetException method.

svn path=/trunk/mcs/; revision=22821
Ravindra 22 years ago
parent
commit
de8edc8157

+ 5 - 0
mcs/class/System.Drawing/System.Drawing.Drawing2D/ChangeLog

@@ -1,3 +1,8 @@
+2004-02-06  Ravindra <[email protected]>
+
+	* HatchBrush.cs: Using CheckStatus method instead of
+	GetException.
+
 2004-02-05  Ravindra <[email protected]>
 
 	* HatchBrush.cs: Implemented.

+ 5 - 10
mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs

@@ -30,16 +30,14 @@ namespace System.Drawing.Drawing2D
 		public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
 		{
 			Status status = GDIPlus.GdipCreateHatchBrush (hatchStyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
-			if (status != Status.Ok)
-				throw GetException (status);
+			GDIPlus.CheckStatus (status);
 		}
 
 		public Color BackgroundColor {
 			get {
 				int argb;
 				Status status = GDIPlus.GdipGetHatchBackgroundColor (nativeObject, out argb);
-				if (status != Status.Ok)
-					throw GetException (status);
+				GDIPlus.CheckStatus (status);
 				return Color.FromArgb (argb);
 			}
 		}
@@ -48,8 +46,7 @@ namespace System.Drawing.Drawing2D
 			get {
 				int argb;
 				Status status = GDIPlus.GdipGetHatchForegroundColor (nativeObject, out argb);
-				if (status != Status.Ok)
-					throw GetException (status);
+				GDIPlus.CheckStatus (status);
 				return Color.FromArgb (argb);
 			}
 		}
@@ -58,10 +55,8 @@ namespace System.Drawing.Drawing2D
 			get {
 				HatchStyle hatchStyle;
 				Status status = GDIPlus.GdipGetHatchStyle (nativeObject, out hatchStyle);
-				if (status == Status.Ok)
-					return hatchStyle;
-				else
-					throw GetException (status);
+				GDIPlus.CheckStatus (status);
+				return hatchStyle;
 			}
 		}