Files
mono/mcs/class/System.Windows.Forms/System.Windows.Forms.Test/PrintDialogTest.cs
T
Jordi Mas i Hernandez 40cdc01417 Initial PrintDialog implementation
svn path=/trunk/mcs/; revision=19198
2003-10-20 14:04:46 +00:00

49 lines
1.3 KiB
C#

//
// Test application for the PrinttDialogTest class implementation
//
// Author:
// Jordi Mas i Hernàndez, [email protected]
//
using System;
using System.Collections;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Printing;
class PrintDialogTest : Form {
public PrintDialogTest(): base() {
}
public static void Main(string[] args){
PrintDialog printDlg = new PrintDialog();
Console.WriteLine ("Default class values------");
Console.WriteLine ("AllowPrintToFile->" + printDlg.AllowPrintToFile);
Console.WriteLine ("AllowSelection->" + printDlg.AllowSelection);
Console.WriteLine ("AllowSomePages->" + printDlg.AllowSomePages);
Console.WriteLine ("ShowHelp->" + printDlg.ShowHelp);
Console.WriteLine ("ShowNetwork->" + printDlg.ShowNetwork);
Console.WriteLine ("PrintToFile->" + printDlg.PrintToFile);
// Declare the PrintDocument object.
PrintDocument docToPrint = new PrintDocument();
printDlg.Document = docToPrint;
DialogResult result = printDlg.ShowDialog();
// If the result is OK then print the document.
if (result==DialogResult.OK){
//docToPrint.Print();
Console.WriteLine ("Copies->" + printDlg.PrinterSettings.Copies);
}
}
}