Zixuan 2 days ago
parent
commit
41a647c366

+ 2 - 2
Analizer/ProximaAnalizer/ViewModels/LoadingViewModel.cs

@@ -18,12 +18,12 @@ internal partial class LoadingViewModel : ObservableObject
     private void Initialize()
     {
         //Thread.Sleep(2000);
-        string dbString = "Database=TINReal;Password=123456;Host=10.4.6.87;Username=postgres;Persist Security Info=True";
+        string dbString = "Database=TINReal;Password=123456;Host=10.4.6.89;Username=postgres;Persist Security Info=True";
 
         this._sqlSugarCustom.Initialize();
         if(!this._sqlSugarCustom.Open(dbString, DbType.PostgreSQL,true))
         {
-            MessageBox.Show("Connect to db 10.4.6.87 Failed");
+            MessageBox.Show("Connect to db 10.4.6.89 Failed");
             App.Current.Shutdown();
         }    
 

+ 2 - 11
Module/DeviceManagement/ViewModels/DeviceManagerViewModel.cs

@@ -1,13 +1,4 @@
-using Device;
-using Mapster;
-using ServiceBase;
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.IO;
-using System.Threading.Tasks;
-using UICommon.DataType;
-
-namespace DeviceManagement.ViewModels;
+namespace DeviceManagement.ViewModels;
 
 public partial class DeviceManagerViewModel : ObservableObject
 {
@@ -51,7 +42,7 @@ public partial class DeviceManagerViewModel : ObservableObject
             MessageBox.Show("Folder not exist");
             return;
         }
-
+          
         string path = Path.Combine(mainFolder.FullName, "Analizer");
         try
         {

+ 3 - 8
Module/DeviceManagement/ViewModels/Dialog/EditDeviceViewModel.cs

@@ -1,9 +1,4 @@
-using Device;
-using Mapster;
-using ServiceBase;
-using System.Threading.Tasks;
-
-namespace DeviceManagement.ViewModels.Dialog;
+namespace DeviceManagement.ViewModels.Dialog;
 
 internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IUICaller uICaller) : ObservableObject, IDialogAware
 {
@@ -37,7 +32,7 @@ internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IU
     }
 
     [RelayCommand]
-    private async Task SaveDevice()
+    private void SaveDevice()
     {
         if (this.TempDevice is null || this.TempDevice.Guid is null)
         {
@@ -57,11 +52,11 @@ internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IU
             return;
         }
 
+
         this.TempDevice.Adapt(device);
 
         MessageBox.Show("设备信息修改成功!", "设备信息", MessageBoxButton.OK, MessageBoxImage.Information);
         this.RequestClose.Invoke();
-
     }
 
     [RelayCommand]

+ 8 - 1
Module/DeviceManagement/properties/_global.cs

@@ -10,4 +10,11 @@ global using System.Windows;
 global using System.Windows.Controls;
 global using System.Windows.Data;
 global using System.Windows.Input;
-global using System.Windows.Media.Imaging;
+global using System.Windows.Media.Imaging;
+global using Device;
+global using Mapster;
+global using ServiceBase;
+global using System.Collections.ObjectModel;
+global using System.Diagnostics;
+global using System.IO;
+global using UICommon.DataType;

+ 0 - 1
Server/EEMSUIClientCore/HubBase.cs

@@ -1,7 +1,6 @@
 using Device;
 using Microsoft.AspNetCore.SignalR.Client;
 using ServiceBase;
-using System.Security.Claims;
 
 namespace EEMSUIClientCore;