Пример #1
0
        private void DoPrintJobWithModel(PrintModel model)
        {
            string filePath = model.GenerateFile();

            string shortFile = Path.GetFileName(filePath);

            if (this.PrintNow)
            {
                if (!string.IsNullOrEmpty(this.selectedPrinterName))
                {
                    PrintFile(filePath);
                    SafeFireLoging("生成文件成功!已发送到打印机:" + shortFile);
                }
                else
                {
                    SafeFireLoging("生成文件成功!当前尚未选择打印机:" + shortFile);
                }
            }
            else
            {
                SafeFireLoging("生成文件成功:" + shortFile);
            }
        }