|
|
@ -10,9 +10,11 @@ using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.IO; |
|
|
|
using System.Net.Http; |
|
|
|
using System.Net.Http; |
|
|
|
|
|
|
|
using System.Net.Sockets; |
|
|
|
using System.Text; |
|
|
|
using System.Text; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
using System.Timers; |
|
|
|
|
|
|
|
|
|
|
|
namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
{ |
|
|
|
{ |
|
|
@ -85,7 +87,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
//浏览器大小 |
|
|
|
//浏览器大小 |
|
|
|
Parame.webBrowser.Width = w; |
|
|
|
Parame.webBrowser.Width = w; |
|
|
|
Parame.webBrowser.Height = h; |
|
|
|
Parame.webBrowser.Height = h; |
|
|
|
Parame.webBrowser.Url = "http://192.168.0.34:8078/#/main-out"; |
|
|
|
Parame.webBrowser.Url = "http://127.0.0.1:8096/#/main-out"; |
|
|
|
//Parame.webBrowser.Url = Application.StartupPath + @"\html\index.html"; |
|
|
|
//Parame.webBrowser.Url = Application.StartupPath + @"\html\index.html"; |
|
|
|
//开发者工具暂时只能支持Windows |
|
|
|
//开发者工具暂时只能支持Windows |
|
|
|
//webBrowser.ShowDev(); |
|
|
|
//webBrowser.ShowDev(); |
|
|
@ -108,8 +110,6 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
showDev = true; |
|
|
|
showDev = true; |
|
|
|
Parame.webBrowser.ShowDev(); |
|
|
|
Parame.webBrowser.ShowDev(); |
|
|
|
} |
|
|
|
} |
|
|
|
//获取授权 |
|
|
|
|
|
|
|
GetSQObject(); |
|
|
|
|
|
|
|
//获取设备 |
|
|
|
//获取设备 |
|
|
|
MainModel.GetSnIndex(); |
|
|
|
MainModel.GetSnIndex(); |
|
|
|
//打开高拍仪 |
|
|
|
//打开高拍仪 |
|
|
@ -119,6 +119,26 @@ namespace AKS.EnterpriseLibrary.WebBrowser |
|
|
|
} |
|
|
|
} |
|
|
|
//开启/关闭纠偏显示 |
|
|
|
//开启/关闭纠偏显示 |
|
|
|
MainModel.EnableDeskImage(1); |
|
|
|
MainModel.EnableDeskImage(1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//开启定时 |
|
|
|
|
|
|
|
System.Timers.Timer timer = new System.Timers.Timer(1000);//3秒钟的时间间隔 |
|
|
|
|
|
|
|
timer.Elapsed += OnTimedEvent; |
|
|
|
|
|
|
|
timer.AutoReset = true;//重复执行 |
|
|
|
|
|
|
|
timer.Enabled = true;//启动定时器 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//矫正授权 |
|
|
|
|
|
|
|
private void OnTimedEvent(Object source, ElapsedEventArgs e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//获取授权 |
|
|
|
|
|
|
|
GetSQObject(); |
|
|
|
|
|
|
|
//检测服务是否启动 |
|
|
|
|
|
|
|
MainModel.StartShll(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch { } |
|
|
|
|
|
|
|
finally { } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void Writelog(string str, string dirName = @"logs") |
|
|
|
public void Writelog(string str, string dirName = @"logs") |
|
|
|