diff --git a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/3b8ede24-3279-43ad-b0d4-ee1b25adf718.vsidx b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/3b8ede24-3279-43ad-b0d4-ee1b25adf718.vsidx deleted file mode 100644 index e65813d..0000000 Binary files a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/3b8ede24-3279-43ad-b0d4-ee1b25adf718.vsidx and /dev/null differ diff --git a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/7cf1e42f-a411-422c-90cb-90c8fa59b2d6.vsidx b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/7cf1e42f-a411-422c-90cb-90c8fa59b2d6.vsidx new file mode 100644 index 0000000..e46d9b4 Binary files /dev/null and b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/7cf1e42f-a411-422c-90cb-90c8fa59b2d6.vsidx differ diff --git a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/ce768a6d-2821-4f9b-a30b-4f4ce6566627.vsidx b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/ce768a6d-2821-4f9b-a30b-4f4ce6566627.vsidx deleted file mode 100644 index 96a497d..0000000 Binary files a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/ce768a6d-2821-4f9b-a30b-4f4ce6566627.vsidx and /dev/null differ diff --git a/PVDEMCS/.vs/PVDEMCS/FileContentIndex/d135ed4d-7f1c-42cf-9352-2a3ad653a271.vsidx b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/d135ed4d-7f1c-42cf-9352-2a3ad653a271.vsidx new file mode 100644 index 0000000..43183cf Binary files /dev/null and b/PVDEMCS/.vs/PVDEMCS/FileContentIndex/d135ed4d-7f1c-42cf-9352-2a3ad653a271.vsidx differ diff --git a/PVDEMCS/.vs/PVDEMCS/v17/.suo b/PVDEMCS/.vs/PVDEMCS/v17/.suo index 4c52d50..5bc093d 100644 Binary files a/PVDEMCS/.vs/PVDEMCS/v17/.suo and b/PVDEMCS/.vs/PVDEMCS/v17/.suo differ diff --git a/PVDEMCS/PVDEMCS/Common/Devices/Impl/DeviceConfiguration.cs b/PVDEMCS/PVDEMCS/Common/Devices/Impl/DeviceConfiguration.cs index cd98723..6257b95 100644 --- a/PVDEMCS/PVDEMCS/Common/Devices/Impl/DeviceConfiguration.cs +++ b/PVDEMCS/PVDEMCS/Common/Devices/Impl/DeviceConfiguration.cs @@ -1,4 +1,5 @@ using PVDEMCS.Services; +using System.Threading; namespace PVDEMCS.Common.Devices.Impl { @@ -15,6 +16,7 @@ namespace PVDEMCS.Common.Devices.Impl public void Load() { + monitors.Clear(); var result = this.deviceService.GetDeviceInfoList("", "", true); if (result.IsSuccess) { @@ -27,9 +29,21 @@ namespace PVDEMCS.Common.Devices.Impl { deviceMonitor.Load(devicePoints.Content.ToArray()); } + deviceMonitor.ErrorMessage += DeviceMonitor_ErrorMessage; + deviceMonitor.PointChnage += DeviceMonitor_PointChnage; monitors.Add(deviceMonitor); + Task task = deviceMonitor.StartAsync(); } } + } + + private void DeviceMonitor_PointChnage(object sender, Services.Models.DevicePoint e) + { + + } + + private void DeviceMonitor_ErrorMessage(object sender, string e) + { } } diff --git a/PVDEMCS/PVDEMCS/Program.cs b/PVDEMCS/PVDEMCS/Program.cs index d503af2..1458d54 100644 --- a/PVDEMCS/PVDEMCS/Program.cs +++ b/PVDEMCS/PVDEMCS/Program.cs @@ -44,7 +44,7 @@ if (app.Environment.IsDevelopment()) //ʹÓÿçÓò²ßÂÔ app.UseCors("CorsPolicy"); -app.UseHttpsRedirection(); +//app.UseHttpsRedirection(); app.UseAuthorization(); @@ -53,11 +53,7 @@ app.MapControllers(); app.Lifetime.ApplicationStarted.Register(() => { var deviceConfiguration = app.Services.GetService(); - - if (deviceConfiguration == null) - { - - } + //deviceConfiguration }); app.Run(); diff --git a/PVDEMCS/PVDEMCS/Properties/launchSettings.json b/PVDEMCS/PVDEMCS/Properties/launchSettings.json index 2b733a4..6ac7807 100644 --- a/PVDEMCS/PVDEMCS/Properties/launchSettings.json +++ b/PVDEMCS/PVDEMCS/Properties/launchSettings.json @@ -1,23 +1,14 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:34771", - "sslPort": 44348 - } - }, +{ "profiles": { "PVDEMCS": { "commandName": "Project", - "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:7200;http://localhost:5223", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5223" }, "IIS Express": { "commandName": "IISExpress", @@ -27,5 +18,14 @@ "ASPNETCORE_ENVIRONMENT": "Development" } } + }, + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:34771", + "sslPort": 0 + } } -} +} \ No newline at end of file diff --git a/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.dll b/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.dll index 47af7d7..c735b2a 100644 Binary files a/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.dll and b/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.dll differ diff --git a/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.pdb b/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.pdb index 9cf49e0..72e25f0 100644 Binary files a/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.pdb and b/PVDEMCS/PVDEMCS/bin/Debug/net6.0/PVDEMCS.pdb differ diff --git a/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.dll b/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.dll index 47af7d7..c735b2a 100644 Binary files a/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.dll and b/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.dll differ diff --git a/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.pdb b/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.pdb index 9cf49e0..72e25f0 100644 Binary files a/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.pdb and b/PVDEMCS/PVDEMCS/obj/Debug/net6.0/PVDEMCS.pdb differ