Author: rolf
Date: 2007-10-10 04:02:32 -0400 (Wed, 10 Oct 2007)
New Revision: 87244
Modified:
trunk/moon/tools/mopen/ChangeLog
trunk/moon/tools/mopen/mopen.cs
Log:
2007-10-10 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* mopen.cs: Use GtkSilver's LoadFile method instead of
LoadXaml, simplifies code a bit.
Modified: trunk/moon/tools/mopen/ChangeLog
===================================================================
--- trunk/moon/tools/mopen/ChangeLog 2007-10-10 08:01:12 UTC (rev 87243)
+++ trunk/moon/tools/mopen/ChangeLog 2007-10-10 08:02:32 UTC (rev 87244)
@@ -1,3 +1,8 @@
+2007-10-10 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * mopen.cs: Use GtkSilver's LoadFile method instead of
+ LoadXaml, simplifies code a bit.
+
2007-10-08 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
* mopen.cs: Use the GtkSilver methods to load the xaml.
Modified: trunk/moon/tools/mopen/mopen.cs
===================================================================
--- trunk/moon/tools/mopen/mopen.cs 2007-10-10 08:01:12 UTC (rev 87243)
+++ trunk/moon/tools/mopen/mopen.cs 2007-10-10 08:02:32 UTC (rev 87244)
@@ -155,28 +155,10 @@
Application.Quit ();
};
- string xaml = "";
-
- try {
- using (FileStream fs = File.OpenRead (file)){
- using (StreamReader sr = new StreamReader (fs)){
- xaml = sr.ReadToEnd ();
- }
- }
- } catch (Exception e) {
- Console.Error.WriteLine ("mopen: Error loading XAML
file {0}: {1}", file, e.GetType());
- return 1;
- }
-
- if (xaml == null){
- Console.Error.WriteLine ("mopen: Error loading XAML
file {0}", file);
- return 1;
- }
-
GtkSilver silver = new GtkSilver (400, 400);
Canvas canvas;
- if (!silver.LoadXaml (xaml, out canvas)) {
+ if (!silver.LoadFile (file, out canvas)) {
Console.Error.WriteLine ("mopen: Could not load xaml");
return 1;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches