mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
49 lines
1.3 KiB
C#
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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|