Author: andreia
Date: 2008-02-06 12:14:17 -0500 (Wed, 06 Feb 2008)
New Revision: 95042
Modified:
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintControllerWithStatusDialog.cs
Log:
2008-02-06 Andreia Gaita <[EMAIL PROTECTED]>
[Backport to 1.9]
* PrintControllerWithStatusDialog.cs: Set PrintFileName value through
reflection only on 1.1, this property is public on system.drawing on 2.0.
Fixed #359247
Modified:
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
---
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-06 17:01:40 UTC (rev 95041)
+++
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2008-02-06 17:14:17 UTC (rev 95042)
@@ -1,3 +1,9 @@
+2008-02-06 Andreia Gaita <[EMAIL PROTECTED]>
+ [Backport to 1.9]
+ * PrintControllerWithStatusDialog.cs: Set PrintFileName value through
+ reflection only on 1.1, this property is public on system.drawing on
2.0.
+ Fixed #359247
+
2008-02-05 Jonathan Pobst <[EMAIL PROTECTED]>
[Backport to 1.9]
* Form.cs: If we change the active MDI child form, let the others
Modified:
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintControllerWithStatusDialog.cs
===================================================================
---
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintControllerWithStatusDialog.cs
2008-02-06 17:01:40 UTC (rev 95041)
+++
branches/mono-1-9/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PrintControllerWithStatusDialog.cs
2008-02-06 17:14:17 UTC (rev 95042)
@@ -79,9 +79,16 @@
void Set_PrinterSettings_PrintFileName (PrinterSettings
settings, string filename)
{
- PropertyInfo PrintFileName = typeof
(PrinterSettings).GetProperty ("PrintFileName", BindingFlags.NonPublic |
BindingFlags.Instance);
-
- PrintFileName.SetValue (settings, filename, null);
+ #if NET_2_0
+ settings.PrintFileName = filename;
+ #else
+
+ PropertyInfo printFileName = typeof
(PrinterSettings).GetProperty ("PrintFileName", BindingFlags.NonPublic |
BindingFlags.Instance);
+ if (printFileName == null) {
+ throw new Exception ("Unable to set
filename to print");
+ }
+ printFileName.SetValue (settings, filename,
null);
+ #endif
}
public override void OnStartPrint(PrintDocument document,
PrintEventArgs e) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches