diff --git a/linker.libs/OperatingManager.cs b/linker.libs/OperatingManager.cs index 667eced5..f40fee83 100644 --- a/linker.libs/OperatingManager.cs +++ b/linker.libs/OperatingManager.cs @@ -21,6 +21,7 @@ namespace linker.libs public sealed class OperatingMultipleManager { private readonly ConcurrentDictionary dicOperating = new ConcurrentDictionary(); + private readonly ConcurrentDictionary dicOperating1 = new ConcurrentDictionary(); public bool StartOperation(string key) { @@ -31,5 +32,13 @@ namespace linker.libs dicOperating.TryRemove(key, out _); } + public bool StartOperation(uint key) + { + return dicOperating1.TryAdd(key, true); + } + public void StopOperation(uint key) + { + dicOperating1.TryRemove(key, out _); + } } } diff --git a/linker.tray.win/default.aproj b/linker.tray.win/default.aproj index d408c535..22cede46 100644 --- a/linker.tray.win/default.aproj +++ b/linker.tray.win/default.aproj @@ -5,5 +5,8 @@ - + + + + diff --git a/linker.tray.win/dist/linker.tray.win.exe b/linker.tray.win/dist/linker.tray.win.exe index 28e73869..ecbb37e1 100644 Binary files a/linker.tray.win/dist/linker.tray.win.exe and b/linker.tray.win/dist/linker.tray.win.exe differ diff --git a/linker.tray.win/full.aardio b/linker.tray.win/full.aardio new file mode 100644 index 00000000..a4c27b40 --- /dev/null +++ b/linker.tray.win/full.aardio @@ -0,0 +1,16 @@ +import win.ui; +/*DSG{{*/ +var winform = win.form(text="linker 管理(专业)";right=859;bottom=699;border="thin";max=false;min=false;topmost=1) +winform.add() +/*}}*/ + +if(!_WIN10_LATER) import web.view.7; //兼容 Win7 以及之后版本,不支持新版 WebView2 的功能。 +else import web.view;//支持 Win10 以及之后版本,导入这个就别导入前面的 web.view.7; + +var wb = web.view(winform); +wb.enableDevTools(false); +wb.go("http://127.0.0.1:1804"); + +winform.show(); +win.loopMessage(); +return winform; diff --git a/linker.tray.win/main.aardio b/linker.tray.win/main.aardio index ca1f37e0..d04bb099 100644 --- a/linker.tray.win/main.aardio +++ b/linker.tray.win/main.aardio @@ -1,11 +1,13 @@ import win.ui; /*DSG{{*/ -mainForm = win.form(text="linker tray";right=279;bottom=186;max=false) +mainForm = win.form(text="linker tray";right=279;bottom=212;max=false) mainForm.add( -btnCheck={cls="button";text="检查安装";left=104;top=130;right=173;bottom=153;z=1}; -btnInstall={cls="button";text="安装服务";left=95;top=23;right=183;bottom=65;z=2}; -btnRun={cls="button";text="运行服务";left=95;top=74;right=183;bottom=113;z=3}; -ckAutoStart={cls="checkbox";text="托盘自启动";left=189;top=160;right=269;bottom=177;z=4} +btnCheck={cls="button";text="检查安装";left=8;top=183;right=77;bottom=206;z=1}; +btnInstall={cls="button";text="安装服务";left=99;top=23;right=187;bottom=65;z=2}; +btnRun={cls="button";text="运行服务";left=99;top=74;right=187;bottom=113;z=3}; +btnWebFull={cls="button";text="管理(专业)";left=152;top=135;right=224;bottom=164;z=6}; +btnWebNet={cls="button";text="管理(简单)";left=66;top=135;right=138;bottom=164;z=5}; +ckAutoStart={cls="checkbox";text="托盘自启动";left=187;top=186;right=273;bottom=203;z=4} ) /*}}*/ @@ -92,15 +94,13 @@ mainForm.showPopmenu = function(){ }); } -mainForm.reStart = function() -{ +mainForm.reStart = function(){ import process.popen; var prcs = process.popen.cmd("start "+io._exefile+" --task=1"); win.quitMessage(); mainForm.close(); } -mainForm.failureService = function() -{ +mainForm.failureService = function(){ import process.popen; var prcs = process.popen.cmd("sc failure " + mainForm.serviceName +" reset= 0 actions= restart/3000/restart/3000/restart/3000") prcs.readAll(); @@ -238,11 +238,19 @@ mainForm.runAsTaskCheck = function(){ mainForm.ckAutoStart.oncommand = function(id,event){ mainForm.runAsTask(mainForm.ckAutoStart.checked); } -mainForm.runAsTaskCommand = function() -{ +mainForm.runAsTaskCommand = function(){ mainForm.runAsTask(!mainForm.ckAutoStart.checked); } +mainForm.btnWebNet.oncommand = function(id,event){ + var netFrm = mainForm.loadForm("/net.aardio"); + netFrm.show(); +} +mainForm.btnWebFull.oncommand = function(id,event){ + var fullFrm = mainForm.loadForm("/full.aardio"); + fullFrm.show(); +} + mainForm.checkService(); mainForm.showPopmenu(); diff --git a/linker.tray.win/net.aardio b/linker.tray.win/net.aardio new file mode 100644 index 00000000..df88db55 --- /dev/null +++ b/linker.tray.win/net.aardio @@ -0,0 +1,16 @@ +import win.ui; +/*DSG{{*/ +var winform = win.form(text="linker 管理(简单)";right=359;bottom=599;border="thin";max=false;min=false;topmost=1) +winform.add() +/*}}*/ + +if(!_WIN10_LATER) import web.view.7; //兼容 Win7 以及之后版本,不支持新版 WebView2 的功能。 +else import web.view;//支持 Win10 以及之后版本,导入这个就别导入前面的 web.view.7; + +var wb = web.view(winform); +wb.enableDevTools(false); +wb.go("http://127.0.0.1:1804/#/net/index.html"); + +winform.show(); +win.loopMessage(); +return winform; diff --git a/linker.web/src/views/full/Index.vue b/linker.web/src/views/full/Index.vue index 1d4c665d..28619584 100644 --- a/linker.web/src/views/full/Index.vue +++ b/linker.web/src/views/full/Index.vue @@ -46,6 +46,18 @@ export default { }