diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.csproj b/IRaCIS.Core.API/IRaCIS.Core.API.csproj index df4feb12..b16e3558 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.csproj +++ b/IRaCIS.Core.API/IRaCIS.Core.API.csproj @@ -6,6 +6,12 @@ 354572d4-9e15-4099-807c-63a2d29ff9f2 default Linux + 上海展影医疗科技有限公司版权所有 + + 1.0.1.0412 + IRC影像系统(EICS) + 1.0.1.0412 + favicon.ico @@ -39,11 +45,27 @@ + + + + + + + + Always + + + Always + + + Always + + Always diff --git a/IRaCIS.Core.API/Program.cs b/IRaCIS.Core.API/Program.cs index 50fa939c..299b0b71 100644 --- a/IRaCIS.Core.API/Program.cs +++ b/IRaCIS.Core.API/Program.cs @@ -76,7 +76,7 @@ namespace IRaCIS.Core.API #region ݿдļ - //var currentDicectory = AppContext.BaseDirectory; + var currentDicectory = AppContext.BaseDirectory; //var rootPath = (Directory.GetParent(currentDicectory.TrimEnd('\\'))).FullName; //var configPath = Path.Combine(rootPath, "resources/config.json"); @@ -90,7 +90,8 @@ namespace IRaCIS.Core.API var dbPwd = jsonObject["password"].ToString(); - var appsettingsJson = File.ReadAllText("appsettings.CertificateApply.json"); + var certificateApplyPath = Path.Combine(currentDicectory, "appsettings.CertificateApply.json"); + var appsettingsJson = File.ReadAllText(certificateApplyPath); // JSON ַ var jObject = JObject.Parse(appsettingsJson); @@ -109,7 +110,7 @@ namespace IRaCIS.Core.API { connection.Open(); - File.WriteAllText("appsettings.CertificateApply.json", jObject.ToString()); + File.WriteAllText(certificateApplyPath, jObject.ToString()); } } diff --git a/IRaCIS.Core.API/favicon.ico b/IRaCIS.Core.API/favicon.ico new file mode 100644 index 00000000..70e9d37f Binary files /dev/null and b/IRaCIS.Core.API/favicon.ico differ diff --git a/Start/Main.cs b/Start/Main.cs index a64d6e78..ef83bf57 100644 --- a/Start/Main.cs +++ b/Start/Main.cs @@ -104,22 +104,22 @@ namespace Start private void activeBtn_Click(object sender, EventArgs e) { - string nginxPath = @"C:\nginx\nginx.exe"; - string workingDirectory = @"C:\nginx"; - string configFile = @"C:\nginx\conf\nginx.conf"; + //string nginxPath = @"C:\nginx\nginx.exe"; + //string workingDirectory = @"C:\nginx"; + //string configFile = @"C:\nginx\conf\nginx.conf"; - ProcessStartInfo psi = new ProcessStartInfo(); - psi.FileName = nginxPath; - psi.WorkingDirectory = workingDirectory; - psi.Arguments = "-c \"" + configFile + "\""; + //ProcessStartInfo psi = new ProcessStartInfo(); + //psi.FileName = nginxPath; + //psi.WorkingDirectory = workingDirectory; + //psi.Arguments = "-c \"" + configFile + "\""; - Process.Start(psi); + //Process.Start(psi); var configObj = new { - Key = this.machineTextBox.Text, - Value = this.KeySecreteTextBox.Text.Trim(), + key = this.machineTextBox.Text, + value = this.KeySecreteTextBox.Text.Trim(), user = usernameTextBox.Text, server = serverTextBox.Text, password = passwordTextBox.Text, @@ -176,7 +176,8 @@ namespace Start process.StandardInput.WriteLine(Path.Combine(AppContext.BaseDirectory, "sql/bin.bat")); - + // 执行 sc start 启动服务 + process.StandardInput.WriteLine($"sc start {jObject["serviceName"].ToString()}"); // 关闭进程流并等待进程退出