?? printer.cs
字號:
using System;
using VirtualPhotoOrganizer.Photo;
namespace VirtualPhotoOrganizer.Util
{
/// <summary>
/// handles the printing of photos
/// </summary>
internal class Printer
{
// the photos we're going to print
Photos _Photos;
public Printer(Photos photos) {
_Photos = photos;
}
public Photos Photos {
get { return _Photos; }
set { _Photos = value; }
}
/// <summary>
/// prints the list of photos
/// </summary>
public void Print() {
// create the vector COM object
WiaInterop.VectorClass vector = new WiaInterop.VectorClass();
// add the paths or our photos to the vector object
foreach (Photo.Photo p in _Photos) {
object path = (object) p.Path;
vector.Add(ref path, 0);
}
// create and show the printing wizard dialog
WiaInterop.CommonDialogClass dlg = new WiaInterop.CommonDialogClass();
object vec = (object) vector;
dlg.ShowPhotoPrintingWizard(ref vec);
// mark the com objects for deletion from heap
dlg = null;
vector = null;
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -