/// <summary>
        /// 打印预览出工单的实现,调用预览模板页进行并且打印
        /// </summary>
        private void PrintPreGoWork_Click(object sender, RoutedEventArgs e)
        {
            var printTxtValue = ReadXml.GetGoWorkPrintTxtValue();
            var print         = new PrintPreWindow(@"PrintTemplete/GoWorkPrintTemplate.xaml", printTxtValue)
            {
                Owner         = this,
                ShowInTaskbar = false
            };

            print.ShowDialog();
        }
        /// <summary>
        /// 直接打印出工单的实现,调用模板页直接打印
        /// </summary>
        private void PrintGoWork_Click(object sender, RoutedEventArgs e)
        {
            //初始化打印机状态,使其调用打印机接口,弹出框用户可以随机选择打印模板
            var printDialog = new PrintDialog();

            //首先判断只有窗口未打开才能调用打印驱动
            if (printDialog.ShowDialog() != true)
            {
                return;
            }
            //调用方法实现前台读取XML
            var          printTxtValue = ReadXml.GetGoWorkPrintTxtValue();
            FlowDocument flowDocument  = PrintPreWindow.LoadDocumentAndRender(@"PrintTemplete/GoWorkPrintTemplate.xaml",
                                                                              printTxtValue);

            Dispatcher.BeginInvoke(new DoPrintMethod(DoPrint), DispatcherPriority.ApplicationIdle, printDialog,
                                   ((IDocumentPaginatorSource)flowDocument).DocumentPaginator);
        }