修改bug 完成

Test.EIImageViewer
hang 2023-04-12 18:14:37 +08:00
parent b748a2af0d
commit 41db15cf70
4 changed files with 38 additions and 14 deletions

View File

@ -6,6 +6,12 @@
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId> <UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
<LangVersion>default</LangVersion> <LangVersion>default</LangVersion>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<Copyright>上海展影医疗科技有限公司版权所有</Copyright>
<AssemblyVersion></AssemblyVersion>
<FileVersion>1.0.1.0412</FileVersion>
<Product>IRC影像系统EICS</Product>
<Version>1.0.1.0412</Version>
<ApplicationIcon>favicon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -39,11 +45,27 @@
<None Remove="GrpcToken.proto" /> <None Remove="GrpcToken.proto" />
<None Remove="IRaCIS.Core.API.xml" /> <None Remove="IRaCIS.Core.API.xml" />
<None Remove="Protos\GrpcToken.proto" /> <None Remove="Protos\GrpcToken.proto" />
<None Remove="sql\bin.bat" />
<None Remove="sql\data.sql" />
<None Remove="sql\dbo.sql" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ApplicationDefinition Include="GrpcToken.proto" /> <ApplicationDefinition Include="GrpcToken.proto" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="favicon.ico" />
<Content Include="sql\bin.bat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="sql\data.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="sql\dbo.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="wwwroot\swagger\ui\abp.js"> <EmbeddedResource Include="wwwroot\swagger\ui\abp.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>

View File

@ -76,7 +76,7 @@ namespace IRaCIS.Core.API
#region 数据库连接写入配置文件 #region 数据库连接写入配置文件
//var currentDicectory = AppContext.BaseDirectory; var currentDicectory = AppContext.BaseDirectory;
//var rootPath = (Directory.GetParent(currentDicectory.TrimEnd('\\'))).FullName; //var rootPath = (Directory.GetParent(currentDicectory.TrimEnd('\\'))).FullName;
//var configPath = Path.Combine(rootPath, "resources/config.json"); //var configPath = Path.Combine(rootPath, "resources/config.json");
@ -90,7 +90,8 @@ namespace IRaCIS.Core.API
var dbPwd = jsonObject["password"].ToString(); 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 字符串 // 解析 JSON 字符串
var jObject = JObject.Parse(appsettingsJson); var jObject = JObject.Parse(appsettingsJson);
@ -109,7 +110,7 @@ namespace IRaCIS.Core.API
{ {
connection.Open(); connection.Open();
File.WriteAllText("appsettings.CertificateApply.json", jObject.ToString()); File.WriteAllText(certificateApplyPath, jObject.ToString());
} }
} }

BIN
IRaCIS.Core.API/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -104,22 +104,22 @@ namespace Start
private void activeBtn_Click(object sender, EventArgs e) private void activeBtn_Click(object sender, EventArgs e)
{ {
string nginxPath = @"C:\nginx\nginx.exe"; //string nginxPath = @"C:\nginx\nginx.exe";
string workingDirectory = @"C:\nginx"; //string workingDirectory = @"C:\nginx";
string configFile = @"C:\nginx\conf\nginx.conf"; //string configFile = @"C:\nginx\conf\nginx.conf";
ProcessStartInfo psi = new ProcessStartInfo(); //ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = nginxPath; //psi.FileName = nginxPath;
psi.WorkingDirectory = workingDirectory; //psi.WorkingDirectory = workingDirectory;
psi.Arguments = "-c \"" + configFile + "\""; //psi.Arguments = "-c \"" + configFile + "\"";
Process.Start(psi); //Process.Start(psi);
var configObj = new var configObj = new
{ {
Key = this.machineTextBox.Text, key = this.machineTextBox.Text,
Value = this.KeySecreteTextBox.Text.Trim(), value = this.KeySecreteTextBox.Text.Trim(),
user = usernameTextBox.Text, user = usernameTextBox.Text,
server = serverTextBox.Text, server = serverTextBox.Text,
password = passwordTextBox.Text, password = passwordTextBox.Text,
@ -176,7 +176,8 @@ namespace Start
process.StandardInput.WriteLine(Path.Combine(AppContext.BaseDirectory, "sql/bin.bat")); process.StandardInput.WriteLine(Path.Combine(AppContext.BaseDirectory, "sql/bin.bat"));
// 执行 sc start 启动服务
process.StandardInput.WriteLine($"sc start {jObject["serviceName"].ToString()}");
// 关闭进程流并等待进程退出 // 关闭进程流并等待进程退出