diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index bfb6a9a5..35bf5e4d 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4440,6 +4440,11 @@ 全局阅片显示类型 + + + 转化显示类型 + + 默认值 @@ -4695,6 +4700,11 @@ 全局阅片显示类型 + + + 转化显示类型 + + 默认值 @@ -5015,6 +5025,11 @@ 全局阅片显示类型 + + + 转化显示类型 + + 默认值 @@ -5160,6 +5175,11 @@ 全局阅片显示类型 + + + 转化显示类型 + + 默认值 diff --git a/Install/Install.csproj b/Install/Install.csproj index 4fad01e3..55969b0c 100644 --- a/Install/Install.csproj +++ b/Install/Install.csproj @@ -14,6 +14,7 @@ + diff --git a/Install/Program.cs b/Install/Program.cs index 34fe7326..6cc8eb57 100644 --- a/Install/Program.cs +++ b/Install/Program.cs @@ -1,61 +1,118 @@ -// See https://aka.ms/new-console-template for more information + +using Renci.SshNet; using System.Diagnostics; -using System.ServiceProcess; - -string nginxPath = @"D:\test\EIImageViewerWeb\nginx.exe"; -string command = $"create EI_Nginx binPath= \"{nginxPath} -p D:\\test\\EIImageViewerWeb\\\" start= auto DisplayName= \"EI_Nginx_DisplayName\""; +using System.Text; try { - // 使用SC命令创建Nginx服务 - using (var process = new System.Diagnostics.Process()) + // 创建一个SSH客户端实例 + using (var client = new SshClient("123.56.94.154", "Administrator", "WHxckj2019")) { - process.StartInfo.FileName = "sc"; - process.StartInfo.Arguments = command; - process.StartInfo.UseShellExecute = false; - process.StartInfo.RedirectStandardOutput = true; - process.Start(); - process.WaitForExit(); - // 检查服务是否已成功创建 - if (process.ExitCode != 0) + + // 连接到远程服务器 + client.Connect(); + //&& .\\IRaCIS_Vue_Web.bat + + //&& ./IRaCIS_Vue_Web.bat + string command = "cd C:\\Users\\Administrator\\VueSourceCode\\ "; + + //// 切换到指定目录 + //var commandCd = client.CreateCommand("cd C:\\Users\\Administrator\\bat"); + using (var cmd = client.CreateCommand(command)) { - throw new Exception($"Error creating service: {process.StandardOutput.ReadToEnd()}"); + var output = cmd.Execute(); + + + Console.WriteLine(output); } - } - // 启动Nginx服务 - using (var controller = new ServiceController("EI_Nginx")) - { - controller.Start(); - } + var processInfo = new ProcessStartInfo("npm", "i") + { + CreateNoWindow = false, + UseShellExecute = false, + RedirectStandardOutput = true + }; - Console.WriteLine("Nginx service created and started successfully."); + using (var process = new Process()) + { + process.StartInfo = processInfo; + process.OutputDataReceived += (sender, args) => Console.WriteLine(args.Data); + process.Start(); + process.BeginOutputReadLine(); + process.WaitForExit(); + } + + + // 断开SSH连接 + client.Disconnect(); + } } catch (Exception ex) { Console.WriteLine(ex.Message); } - Console.ReadLine(); -string currentDir = Directory.GetCurrentDirectory(); -DirectoryInfo dirInfo = new DirectoryInfo(currentDir); -foreach (var subdir in dirInfo.GetDirectories()) -{ - FileInfo[] files = subdir.GetFiles(); +//// See https://aka.ms/new-console-template for more information +//using System.Diagnostics; +//using System.ServiceProcess; - foreach (FileInfo file in files) - { - if (file.Name == "Start.exe") - { - string startPath = Path.Combine(subdir.FullName, "Start.exe"); - Process.Start(startPath); - return; - } - } -} +//string nginxPath = @"D:\test\EIImageViewerWeb\nginx.exe"; +//string command = $"create EI_Nginx binPath= \"{nginxPath} -p D:\\test\\EIImageViewerWeb\\\" start= auto DisplayName= \"EI_Nginx_DisplayName\""; -Console.WriteLine("当前目录子文件中未找到Start.exe,程序即将退出..."); -Console.ReadLine(); \ No newline at end of file +//try +//{ +// // 使用SC命令创建Nginx服务 +// using (var process = new System.Diagnostics.Process()) +// { +// process.StartInfo.FileName = "sc"; +// process.StartInfo.Arguments = command; +// process.StartInfo.UseShellExecute = false; +// process.StartInfo.RedirectStandardOutput = true; +// process.Start(); +// process.WaitForExit(); + +// // 检查服务是否已成功创建 +// if (process.ExitCode != 0) +// { +// throw new Exception($"Error creating service: {process.StandardOutput.ReadToEnd()}"); +// } +// } + +// // 启动Nginx服务 +// using (var controller = new ServiceController("EI_Nginx")) +// { +// controller.Start(); +// } + +// Console.WriteLine("Nginx service created and started successfully."); +//} +//catch (Exception ex) +//{ +// Console.WriteLine(ex.Message); +//} + +//Console.ReadLine(); + +//string currentDir = Directory.GetCurrentDirectory(); +//DirectoryInfo dirInfo = new DirectoryInfo(currentDir); + +//foreach (var subdir in dirInfo.GetDirectories()) +//{ +// FileInfo[] files = subdir.GetFiles(); + +// foreach (FileInfo file in files) +// { +// if (file.Name == "Start.exe") +// { +// string startPath = Path.Combine(subdir.FullName, "Start.exe"); +// Process.Start(startPath); +// return; +// } +// } +//} + +//Console.WriteLine("当前目录子文件中未找到Start.exe,程序即将退出..."); +//Console.ReadLine(); \ No newline at end of file diff --git a/Start/Resource/EIImageViewerWeb.rar b/Start/Resource/EIImageViewerWeb.rar index 129964a7..015d9c5e 100644 Binary files a/Start/Resource/EIImageViewerWeb.rar and b/Start/Resource/EIImageViewerWeb.rar differ diff --git a/Start/Resource/UnInstall.exe b/Start/Resource/UnInstall.exe index d339e5b3..fcaefa21 100644 Binary files a/Start/Resource/UnInstall.exe and b/Start/Resource/UnInstall.exe differ diff --git a/Start/Resource/医学影像处理软件用户手册.pdf b/Start/Resource/医学影像处理软件用户手册.pdf index 65d6cd70..e8398ee3 100644 Binary files a/Start/Resource/医学影像处理软件用户手册.pdf and b/Start/Resource/医学影像处理软件用户手册.pdf differ diff --git a/UnInstall/Program.cs b/UnInstall/Program.cs index 1b127d42..d7b879c0 100644 --- a/UnInstall/Program.cs +++ b/UnInstall/Program.cs @@ -199,7 +199,7 @@ else MyLog("3s 后自动退出..."); await Task.Delay(3000); - string cmdArgs = $"/C ping 127.0.0.1 -n 5 & rmdir /s /q \"{configObj.deployFolder}\""; + string cmdArgs = $"/C ping 127.0.0.1 -n 3 & rmdir /s /q \"{configObj.deployFolder}\""; ProcessStartInfo psi = new ProcessStartInfo("cmd.exe", cmdArgs); psi.WindowStyle = ProcessWindowStyle.Hidden; psi.CreateNoWindow = true;