Author: jordi
Date: 2005-12-05 13:45:25 -0500 (Mon, 05 Dec 2005)
New Revision: 53941
Added:
trunk/mcs/class/System.Drawing/Samples/System.Drawing/CopyFromScreen.cs
trunk/mcs/class/System.Drawing/Samples/System.Drawing/SystemFonts.cs
Log:
Small samples used SD .Net 2.0
Added: trunk/mcs/class/System.Drawing/Samples/System.Drawing/CopyFromScreen.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Samples/System.Drawing/CopyFromScreen.cs
2005-12-05 18:44:39 UTC (rev 53940)
+++ trunk/mcs/class/System.Drawing/Samples/System.Drawing/CopyFromScreen.cs
2005-12-05 18:45:25 UTC (rev 53941)
@@ -0,0 +1,23 @@
+//
+// Sample that show the default SystemFonts and its names
+// Requieres .NET 2.0 class library
+//
+
+using System;
+using System.Drawing;
+
+
+public class SystemFontsSample
+{
+ public static void Main ()
+ {
+ Bitmap bmp = new Bitmap (800, 800);
+ Graphics gr = Graphics.FromImage (bmp);
+
+ gr.CopyFromScreen (0, 0/*src*/, 0,0 /*dst*/, new Size (800,
800));
+ bmp.Save ("CopyFromScreen.bmp");
+ }
+
+}
+
+
Added: trunk/mcs/class/System.Drawing/Samples/System.Drawing/SystemFonts.cs
===================================================================
--- trunk/mcs/class/System.Drawing/Samples/System.Drawing/SystemFonts.cs
2005-12-05 18:44:39 UTC (rev 53940)
+++ trunk/mcs/class/System.Drawing/Samples/System.Drawing/SystemFonts.cs
2005-12-05 18:45:25 UTC (rev 53941)
@@ -0,0 +1,29 @@
+//
+// Sample that show the default SystemFonts and its names
+// Requieres .NET 2.0 class library
+//
+
+using System;
+using System.Drawing;
+
+
+public class SystemFontsSample
+{
+ public static void Main ()
+ {
+ Console.WriteLine ("--> CaptionFont [{0}] {1}",
SystemFonts.CaptionFont.SystemFontName, SystemFonts.CaptionFont);
+ Console.WriteLine ("--> DefaultFont [{0}] {1}",
SystemFonts.DefaultFont.SystemFontName, SystemFonts.DefaultFont);
+ Console.WriteLine ("--> DialogFont [{0}] {1}",
SystemFonts.DialogFont.SystemFontName, SystemFonts.DialogFont);
+ Console.WriteLine ("--> IconTitleFont [{0}] {1}",
SystemFonts.IconTitleFont.SystemFontName, SystemFonts.IconTitleFont);
+ Console.WriteLine ("--> MenuFont [{0}] {1}",
SystemFonts.MenuFont.SystemFontName, SystemFonts.MenuFont);
+ Console.WriteLine ("--> MessageBoxFont [{0}] {1}",
SystemFonts.MessageBoxFont.SystemFontName, SystemFonts.MessageBoxFont);
+ Console.WriteLine ("--> SmallCaptionFont [{0}] {1}",
SystemFonts.SmallCaptionFont.SystemFontName, SystemFonts.SmallCaptionFont);
+ Console.WriteLine ("--> StatusFont [{0}] {1}",
SystemFonts.StatusFont.SystemFontName, SystemFonts.StatusFont);
+
+ Font fnt = new Font ("Arial", 12);
+ Console.WriteLine ("--> IsSystemFontName {0} {1}",
SystemFonts.StatusFont.IsSystemFont, fnt.IsSystemFont);
+ }
+
+}
+
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches