diff --git a/PublishSite/PublishForm.Designer.cs b/PublishSite/PublishForm.Designer.cs index bda1698e..18193700 100644 --- a/PublishSite/PublishForm.Designer.cs +++ b/PublishSite/PublishForm.Designer.cs @@ -29,6 +29,7 @@ private void InitializeComponent() { groupBox1 = new GroupBox(); + rb_USDemo = new RadioButton(); rb_production = new RadioButton(); rb_Verify = new RadioButton(); rb_test = new RadioButton(); @@ -95,6 +96,7 @@ // // groupBox1 // + groupBox1.Controls.Add(rb_USDemo); groupBox1.Controls.Add(rb_production); groupBox1.Controls.Add(rb_Verify); groupBox1.Controls.Add(rb_test); @@ -107,6 +109,17 @@ groupBox1.TabStop = false; groupBox1.Text = "环境(服务的操作,备份操作作用的主机)"; // + // rb_USDemo + // + rb_USDemo.AutoSize = true; + rb_USDemo.Location = new Point(555, 48); + rb_USDemo.Name = "rb_USDemo"; + rb_USDemo.Size = new Size(83, 24); + rb_USDemo.TabIndex = 4; + rb_USDemo.Text = "美国演示"; + rb_USDemo.UseVisualStyleBackColor = true; + rb_USDemo.Click += rb_Env_CheckedChanged; + // // rb_production // rb_production.AutoSize = true; @@ -1040,5 +1053,6 @@ private TabPage tabPage2; private TabPage tabPage5; private TabPage tabPage6; + private RadioButton rb_USDemo; } } \ No newline at end of file diff --git a/PublishSite/PublishForm.cs b/PublishSite/PublishForm.cs index 304817a7..418a15c2 100644 --- a/PublishSite/PublishForm.cs +++ b/PublishSite/PublishForm.cs @@ -125,6 +125,15 @@ namespace PublishSite jObjectCofig = JObject.Parse(configJson); } + if (rb_USDemo.Checked) + { + EnvName = "美国演示"; + WinformLog($"当前操作环境切换为: 美国演示", Color.DarkRed); + + var configJson = File.ReadAllText("appsettings.USDemo.json"); + + jObjectCofig = JObject.Parse(configJson); + } #region 界面控件赋值 @@ -214,6 +223,11 @@ namespace PublishSite { path = "appsettings.Production.json"; + } + if (rb_USDemo.Checked) + { + path = "appsettings.USDemo.json"; + } var configJson = File.ReadAllText(path); @@ -1046,7 +1060,7 @@ namespace PublishSite archive.SaveTo(filePath, new WriterOptions(CompressionType.Deflate)); } - + WinformLog("文件已成功压缩为 " + filePath); }); diff --git a/PublishSite/PublishForm.resx b/PublishSite/PublishForm.resx index 91fcf53d..05cc54b9 100644 --- a/PublishSite/PublishForm.resx +++ b/PublishSite/PublishForm.resx @@ -1,4 +1,64 @@ - + + + diff --git a/PublishSite/PublishSite.csproj b/PublishSite/PublishSite.csproj index fe76639f..5b2c5b6b 100644 --- a/PublishSite/PublishSite.csproj +++ b/PublishSite/PublishSite.csproj @@ -11,6 +11,15 @@ + + + + + + Always + true + PreserveNewest + Always true diff --git a/PublishSite/appsettings.Development.json b/PublishSite/appsettings.Development.json index 8c1fecdf..0f611532 100644 --- a/PublishSite/appsettings.Development.json +++ b/PublishSite/appsettings.Development.json @@ -5,7 +5,7 @@ "DBPwd": "dev123456DEV", "BackPath": "D:\\Develop\\PublishSite\\发布备份", "VuePublishFolder": "D:\\Develop\\PublishSite\\IRaCIS.Vue.Web\\dist", - "ConnectionStrings": "Server=.;Database=IRaCIS;Trusted_Connection=True;TrustServerCertificate=true" + "ConnectionStrings": "Server=.;Database=IRaCIS_New_Tet;Trusted_Connection=True;TrustServerCertificate=true" }, "Credential": { "Host": "123.56.94.154", diff --git a/PublishSite/appsettings.USDemo.json b/PublishSite/appsettings.USDemo.json new file mode 100644 index 00000000..67efe832 --- /dev/null +++ b/PublishSite/appsettings.USDemo.json @@ -0,0 +1,23 @@ +{ + "BackUp": { + "DataBaseName": "IRaCIS_Demo_US", + "DBUser": "sa", + "DBPwd": "dev123456DEV", + "BackPath": "C:\\IRaCIS_Publish\\备份", + "VuePublishFolder": "C:\\IRaCIS_Publish\\PublishSite\\IRaCIS.Vue.Web\\dist", + "ConnectionStrings": "Server=.;Database=IRaCIS_Demo_US;Trusted_Connection=True;TrustServerCertificate=true" + }, + "Credential": { + "Host": "47.90.161.85", + "UserName": "Administrator", + "Password": "SHzyyl2021" + }, + "DefaultService": { + "ServiceName": "USDemo.NetCore.IRaCIS.Api", + "ServiceDisplayName": "USDemo_IRaCIS.Core.API", + "ServicePort": "7000", + "BinPath": "C:\\IRaCIS_Publish\\PublishSite\\IRaCIS.NetCore.API\\IRaCIS.Core.API.exe", + "Env": "USDemo" + }, + +}