Test.EIImageViewer
hang 2023-04-13 18:11:40 +08:00
parent b77b9e8bdc
commit 7e07a00844
13 changed files with 11188 additions and 19 deletions

View File

@ -17,46 +17,79 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infra.EFCore",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IRaCIS.Core.Infrastructure", "IRaCIS.Core.Infrastructure\IRaCIS.Core.Infrastructure.csproj", "{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Start", "Start\Start.csproj", "{D96F4B52-359C-43C9-8110-BAD1437F9280}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Start", "Start\Start.csproj", "{D96F4B52-359C-43C9-8110-BAD1437F9280}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{EDA76948-D12B-453A-A14E-93D5437C565D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Debug|x86.ActiveCfg = Debug|x86
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Release|Any CPU.Build.0 = Release|Any CPU
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Release|x86.ActiveCfg = Release|x86
{F15CE209-6039-46A6-AE7F-E81ADA795F28}.Release|x86.Build.0 = Release|x86
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Debug|x86.ActiveCfg = Debug|x86
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Release|Any CPU.Build.0 = Release|Any CPU
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Release|x86.ActiveCfg = Release|x86
{D4DF27AC-3739-4264-BFB8-AED6DC2B84C7}.Release|x86.Build.0 = Release|x86
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Debug|x86.ActiveCfg = Debug|x86
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Release|Any CPU.Build.0 = Release|Any CPU
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Release|x86.ActiveCfg = Release|x86
{037E7DE9-0AE2-4987-8C69-F51D5B9CA19D}.Release|x86.Build.0 = Release|x86
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Debug|x86.ActiveCfg = Debug|x86
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|Any CPU.Build.0 = Release|Any CPU
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|x86.ActiveCfg = Release|x86
{7CBC76F5-3817-46B7-8D9D-79253A89B578}.Release|x86.Build.0 = Release|x86
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Debug|x86.ActiveCfg = Debug|x86
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|Any CPU.Build.0 = Release|Any CPU
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|x86.ActiveCfg = Release|x86
{3292B2B4-6E8A-43AA-84C0-AB4A391E8A2A}.Release|x86.Build.0 = Release|x86
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Debug|x86.ActiveCfg = Debug|x86
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Release|Any CPU.Build.0 = Release|Any CPU
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Release|x86.ActiveCfg = Release|x86
{6D8115E5-84D6-424B-8F8D-0C2D40347A8C}.Release|x86.Build.0 = Release|x86
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Debug|x86.ActiveCfg = Debug|x86
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|Any CPU.Build.0 = Release|Any CPU
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|x86.ActiveCfg = Release|x86
{07EED0F8-08E6-46F3-ACBE-17BC1391BD4C}.Release|x86.Build.0 = Release|x86
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Debug|x86.ActiveCfg = Debug|x86
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Debug|x86.Build.0 = Debug|x86
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Release|Any CPU.Build.0 = Release|Any CPU
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Release|x86.ActiveCfg = Release|x86
{D96F4B52-359C-43C9-8110-BAD1437F9280}.Release|x86.Build.0 = Release|x86
{EDA76948-D12B-453A-A14E-93D5437C565D}.Debug|Any CPU.ActiveCfg = Debug
{EDA76948-D12B-453A-A14E-93D5437C565D}.Debug|x86.ActiveCfg = Debug
{EDA76948-D12B-453A-A14E-93D5437C565D}.Release|Any CPU.ActiveCfg = Release
{EDA76948-D12B-453A-A14E-93D5437C565D}.Release|x86.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<SignAssembly>false</SignAssembly>
<UserSecretsId>354572d4-9e15-4099-807c-63a2d29ff9f2</UserSecretsId>
<LangVersion>default</LangVersion>
@ -12,6 +12,7 @@
<Product>IRC影像系统EICS</Product>
<Version>1.0.1.0412</Version>
<ApplicationIcon>favicon.ico</ApplicationIcon>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -20,12 +21,24 @@
<OutputPath>..\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<DocumentationFile>.\IRaCIS.Core.API.xml</DocumentationFile>
<NoWarn>1701;1702;1591;</NoWarn>
<OutputPath>..\bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\IRaCIS.Core.API.xml</DocumentationFile>
<OutputPath>bin\Release\</OutputPath>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<DocumentationFile>bin\Release\IRaCIS.Core.API.xml</DocumentationFile>
<OutputPath>bin\Release\</OutputPath>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Remove="wwwroot\**" />
<EmbeddedResource Remove="UploadFile\**" />

View File

@ -6,6 +6,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -14,10 +15,20 @@
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin\</OutputPath>
<DocumentationFile>.\IRaCIS.Core.Application.xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<NoWarn>1701;1702;1591;1587</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@ -2,12 +2,17 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />

View File

@ -2,12 +2,17 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EntityFrameworkCore.Projectables" Version="2.3.0" />
<PackageReference Include="EntityFrameworkCore.Projectables.Abstractions" Version="2.3.0" />

View File

@ -2,12 +2,17 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>

View File

@ -2,12 +2,17 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="CSRedisCore" Version="3.8.669" />

View File

@ -6,12 +6,18 @@
<IsPackable>false</IsPackable>
<LangVersion>default</LangVersion>
<Platforms>x86</Platforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<OutputPath>..\bin</OutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />

11052
Setup/Setup.vdproj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,8 @@ namespace Start
}
int apiPort = 0;
int apiPort = 7100;
int vuePort = 9527;
private void connectButton_Click(object sender, EventArgs e)
{
string connectionString = $"Server={serverTextBox.Text};User Id={usernameTextBox.Text};Password={passwordTextBox.Text};";
@ -56,20 +57,20 @@ namespace Start
{
nginxPortTBox.Text.Trim();
var nginxPort = 0;
if (int.TryParse(nginxPortTBox.Text, out nginxPort) == false || int.TryParse(apiPortTBox.Text, out apiPort) == false)
if (int.TryParse(nginxPortTBox.Text, out vuePort) == false || int.TryParse(apiPortTBox.Text, out apiPort) == false)
{
MessageBox.Show("请输入合法的端口");
}
if (IsPortInUse(nginxPort))
if (IsPortInUse(vuePort))
{
MessageBox.Show("nginx 设置的端口被占用,请选择其他端口");
MessageBox.Show("服务设置的前端端口被占用,请选择其他端口");
}
if (IsPortInUse(apiPort))
{
MessageBox.Show("服务设置的端口被占用,请选择其他端口");
MessageBox.Show("服务设置的后端端口被占用,请选择其他端口");
}
}
@ -104,16 +105,42 @@ 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";
#region 修改 nginx 配置文件 启动nginx
var nginxConfigPath = Path.Combine(AppContext.BaseDirectory, @$"nginx-1.20.1\conf\nginx.conf");
if (!File.Exists(nginxConfigPath))
{
MessageBox.Show("预设路径不存在nginx");
}
var nginxConfig = File.ReadAllText(nginxConfigPath);
nginxConfig= nginxConfig.Replace("9527", vuePort.ToString());
nginxConfig= nginxConfig.Replace("7100", apiPort.ToString());
File.WriteAllText(nginxConfigPath, nginxConfig);
// 获取nginx.exe所在的目录
string nginxPath = Path.Combine(AppContext.BaseDirectory, @$"nginx-1.20.1\");
// 创建ProcessStartInfo对象指定要启动的可执行文件及其参数
ProcessStartInfo psi = new ProcessStartInfo(nginxPath + "nginx.exe");
// 指定工作目录即进入nginx.exe所在的目录
psi.WorkingDirectory = nginxPath;
// 启动可执行文件
Process.Start(psi);
#endregion
//ProcessStartInfo psi = new ProcessStartInfo();
//psi.FileName = nginxPath;
//psi.WorkingDirectory = workingDirectory;
//psi.Arguments = "-c \"" + configFile + "\"";
//Process.Start(psi);
var configObj = new
@ -145,10 +172,10 @@ namespace Start
process.StartInfo.UseShellExecute = false;
process.Start();
//process.StandardInput.WriteLine(Path.Combine(AppContext.BaseDirectory, "startNginx.bat"));
var cmdNginx = $"start {Path.Combine(AppContext.BaseDirectory, "nginx-1.4.7/nginx.exe")}";
//启动nginx
process.StandardInput.WriteLine(cmdNginx);
// 删除已存在的服务
process.StandardInput.WriteLine($"sc delete {jObject["serviceName"].ToString()}");

View File

@ -6,6 +6,7 @@
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<ItemGroup>
@ -13,6 +14,7 @@
<None Remove="sql\bin.bat" />
<None Remove="sql\data.sql" />
<None Remove="sql\dbo.sql" />
<None Remove="sql\startNginx.bat" />
</ItemGroup>
<ItemGroup>
@ -28,6 +30,9 @@
<Content Include="sql\dbo.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="startNginx.bat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>

Binary file not shown.

2
Start/startNginx.bat Normal file
View File

@ -0,0 +1,2 @@
cd /d %~dp0\nginx-1.4.7
start nginx.exe