|
@@ -12,6 +12,7 @@ using System.Net;
|
|
|
using System.Net.Security;
|
|
|
using System.Security.Cryptography.X509Certificates;
|
|
|
using System.Text;
|
|
|
+using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
using Utils;
|
|
|
|
|
@@ -197,26 +198,28 @@ namespace MOKA_Factory_Tools
|
|
|
#endregion
|
|
|
|
|
|
#region 进程通信
|
|
|
- // 启动服务;
|
|
|
- ProcUtils.StartService("FTYService");
|
|
|
- if (Utils.ProcUtils.IsServiceStart("FTYService"))
|
|
|
- {
|
|
|
- PipeClient client = new PipeClient("MOKA_FTYService", "127.0.0.1");
|
|
|
- if (client != null)
|
|
|
+ Task.Run(() =>
|
|
|
+ {// 启动服务;
|
|
|
+ ProcUtils.StartService("FTYService");
|
|
|
+ if (Utils.ProcUtils.IsServiceStart("FTYService"))
|
|
|
{
|
|
|
- client.SendData(new ToolInfo()
|
|
|
+ PipeClient client = new PipeClient("MOKA_FTYService", "127.0.0.1");
|
|
|
+ if (client != null)
|
|
|
{
|
|
|
- appName = "SCBC Factory Tools",
|
|
|
- devicemodel = "SCBC Factory Tools",
|
|
|
- dnum = loginOutput1.factorynum,
|
|
|
- factoryname = loginOutput1.factoryname,
|
|
|
- procName = Application.ProductName,
|
|
|
- toolPath = AppDomain.CurrentDomain.BaseDirectory,
|
|
|
- toolVersion = Utils.FileUtils.GetAssemblyVersion(),
|
|
|
- type = "pc"
|
|
|
- }, 0);
|
|
|
+ client.SendData(new ToolInfo()
|
|
|
+ {
|
|
|
+ appName = "MOKA_Factory_Tools",
|
|
|
+ devicemodel = "MOKA_Factory_Tools",
|
|
|
+ dnum = loginOutput1.factorynum,
|
|
|
+ factoryname = loginOutput1.factoryname,
|
|
|
+ procName = Application.ProductName,
|
|
|
+ toolPath = AppDomain.CurrentDomain.BaseDirectory,
|
|
|
+ toolVersion = Utils.FileUtils.GetAssemblyVersion(),
|
|
|
+ type = "pc"
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
#endregion
|
|
|
|
|
|
CommonMethod.FactoryName = loginOutput1.factoryname;
|