|
|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Configuration;
|
|
|
+using System.Diagnostics;
|
|
|
using System.Drawing;
|
|
|
using System.IO;
|
|
|
using System.Runtime.InteropServices;
|
|
|
@@ -78,6 +79,12 @@ namespace UAS_MES
|
|
|
//窗体加载的时候将headBar的事件委托给指定的函数
|
|
|
private void Main_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
+ //杀死全部未关闭的打印进程
|
|
|
+ Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
|
|
|
+ for (int i = 0; i < processes.Length; i++)
|
|
|
+ {
|
|
|
+ processes[i].Kill();
|
|
|
+ }
|
|
|
thread = new Thread(DeleteLog);
|
|
|
thread.Start();
|
|
|
this.Tag = "ShowDialogWindow";
|