private void ListenerBarCodeEnterEvent(GlobalBarCodeHook.BarCodes barCode) { var isActive = ApplicationHelper.ApplicationIsActivated(); if (isActive) { Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate { var win = new AutoClosedWindow("报销单打印中。。。") { Owner = this }; win.ShowDialog(); //TT.Text += isActive + ":" + DateTime.Now + "\r\n"; var report = new Report(); report.Load("E:\\TestPrint.frx"); //report.RegisterData(...); report.PrintSettings.ShowDialog = false; report.Print(); })); } }