コード例 #1
0
ファイル: VehicleHelper.cs プロジェクト: romanu6891/fivemen
 public static void Print(IPrinter printer)
 {
     CommonPrinter commonPrinter = new CommonPrinter(printer);
     //commonPrinter.ShowPreviewPrinter();
     GlobalPrintSetting printSetting = StaticCacheManager.GetConfig<GlobalPrintSetting>();
     if (printSetting.PrintModel == "ֱ�Ӵ�")
     {
         commonPrinter.Print();
     }
     else if (printSetting.PrintModel == "ѡ���ӡ��")
     {
         commonPrinter.ShowPreviewPrinter();
     }
     else
     {
         commonPrinter.Preview();
     }
 }
コード例 #2
0
 private void btnPreview_Click(object sender, EventArgs e)
 {
     TemplatePrintObject printer = new TemplatePrintObject(config);
     CommonPrinter commonPrinter = new CommonPrinter(printer);
     commonPrinter.SetPaperSize(config.PageWidth, config.PageHeight);
     commonPrinter.Preview();
 }