**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / System.Windows.Forms.Test / PrintDialogTest.cs
blob32ea24be4e7b3af0160328f8387e243cfc4e5a51
1 //
2 // Test application for the PrinttDialogTest class implementation
3 //
4 // Author:
5 // Jordi Mas i Hernàndez, jmas@softcatala.org
6 //
8 using System;
9 using System.Collections;
10 using System.Windows.Forms;
11 using System.Drawing;
12 using System.Drawing.Printing;
15 class PrintDialogTest : Form {
17 public PrintDialogTest(): base() {
21 public static void Main(string[] args){
23 PrintDialog printDlg = new PrintDialog();
25 Console.WriteLine ("Default class values------");
26 Console.WriteLine ("AllowPrintToFile->" + printDlg.AllowPrintToFile);
27 Console.WriteLine ("AllowSelection->" + printDlg.AllowSelection);
28 Console.WriteLine ("AllowSomePages->" + printDlg.AllowSomePages);
29 Console.WriteLine ("ShowHelp->" + printDlg.ShowHelp);
30 Console.WriteLine ("ShowNetwork->" + printDlg.ShowNetwork);
31 Console.WriteLine ("PrintToFile->" + printDlg.PrintToFile);
33 // Declare the PrintDocument object.
34 PrintDocument docToPrint = new PrintDocument();
36 printDlg.Document = docToPrint;
37 DialogResult result = printDlg.ShowDialog();
39 // If the result is OK then print the document.
40 if (result==DialogResult.OK){
41 //docToPrint.Print();
42 Console.WriteLine ("Copies->" + printDlg.PrinterSettings.Copies);