* XplatUIX11.cs: Removed unused hwnd var in SetBorderStyle.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / PrintDialog.cs
index 3c9007d7bba8eb96dfacf6c5b47f67d55180c60c..1a2b19ff72db7f91b2cef1d22a62e123023499c5 100644 (file)
@@ -37,10 +37,16 @@ using System.Reflection;
 
 namespace System.Windows.Forms
 {
+#if NET_2_0
+       [Designer ("System.Windows.Forms.Design.PrintDialogDesigner, " + Consts.AssemblySystem_Design,
+                  "System.ComponentModel.Design.IDesigner")]
+#endif
        [DefaultProperty("Document")]
        public sealed class PrintDialog : CommonDialog {
                PrintDocument document;
+#if NET_2_0
                bool allow_current_page;
+#endif
                bool allow_print_to_file;
                bool allow_selection;
                bool allow_some_pages;
@@ -82,7 +88,7 @@ namespace System.Windows.Forms
 
                public override void Reset ()
                {
-                       current_settings = new PrinterSettings ();
+                       current_settings = null;
                        AllowPrintToFile = true;
                        AllowSelection = false;
                        AllowSomePages = false;
@@ -92,6 +98,7 @@ namespace System.Windows.Forms
                }
 
 #if NET_2_0
+               [DefaultValue (false)]
                public bool AllowCurrentPage {
                        get {
                                return allow_current_page;
@@ -430,6 +437,11 @@ namespace System.Windows.Forms
                        label.AutoSize = true;
                        label.Location = new Point (20, 100);
                        group_box_prn.Controls.Add (label);
+                       
+                       label_where = new Label ();
+                       label_where.AutoSize = true;
+                       label_where.Location = new Point (80, 100);
+                       group_box_prn.Controls.Add (label_where);
 
                        label = new Label ();
                        label.Text = "Comment:";
@@ -440,6 +452,7 @@ namespace System.Windows.Forms
                        label_comment = new Label ();
                        label_comment.AutoSize = true;
                        label_comment.Location = new Point (80, 120);
+                       group_box_prn.Controls.Add (label_comment);
 
                        radio_all = new RadioButton ();
                        radio_all.TabIndex = 21;
@@ -591,8 +604,10 @@ namespace System.Windows.Forms
                                label_where.Text = port;
                                label_comment.Text = comment;
 
+                               accept_button.Enabled = true;
                        }
                        catch  {
+                               accept_button.Enabled = false;
                        }
                }
        }