From 1e1ba857335afe25c8cd6d51e95e1ef3e3669bc4 Mon Sep 17 00:00:00 2001 From: mzhifa Date: Mon, 20 Nov 2023 23:27:12 +0800 Subject: [PATCH] =?UTF-8?q?1=E5=A2=9E=E5=8A=A0WorkAreaId=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=202=20=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Txgy.FilesWatcher/ViewModels/MainViewModel.cs | 35 +++++------------ Txgy.FilesWatcher/Views/MainView.xaml | 14 +++---- Txgy.FilesWatcher/model/DBConfig.cs | 38 ++++++++----------- Txgy.FilesWatcher/model/UploadMseedFile.cs | 3 +- Txgy.FilesWatcher/model/UploadPostproFile.cs | 1 - Txgy.FilesWatcher/model/UploadRealtimeFile.cs | 1 - 6 files changed, 30 insertions(+), 62 deletions(-) diff --git a/Txgy.FilesWatcher/ViewModels/MainViewModel.cs b/Txgy.FilesWatcher/ViewModels/MainViewModel.cs index 0d47525..e92bfdd 100644 --- a/Txgy.FilesWatcher/ViewModels/MainViewModel.cs +++ b/Txgy.FilesWatcher/ViewModels/MainViewModel.cs @@ -121,34 +121,17 @@ namespace Txgy.FilesWatcher.ViewModels get { return account; } set { SetProperty(ref account, value); } } - private string password="123"; + private int workAreaId = 1; - public string Password + public int WorkAreaId { - get { return password; } - set { SetProperty(ref password, value); } + get { return workAreaId; } + set { SetProperty(ref workAreaId, value); } } - private string _loginContent="登 录"; - - public string LoginContent - { - get { return _loginContent; } - set { SetProperty(ref _loginContent, value); } - } bool isLogin = false; - public DelegateCommand LoginCommand => new(() => { - if (!isLogin) - { - this.ShowLoading(); - // _websocketClient.SiginServer(Account, Password); - } - else - { - isLogin = false; - LoginContent = "登 录"; - // _websocketClient.Closed(); - } + public DelegateCommand SureCommand => new(() => { + }); public DelegateCommand StartCommand => new(Start); @@ -220,7 +203,7 @@ namespace Txgy.FilesWatcher.ViewModels // path = "I:\\DATA/NET2023/06/22/22/56"; if (Directory.Exists(path)) { - UploadMseedFile.UploadMSeedOnce(path); + UploadMseedFile.UploadMSeedOnce(path, WorkAreaId); } } @@ -316,12 +299,12 @@ namespace Txgy.FilesWatcher.ViewModels if (watch != null && watch.Path == watcherArray[0].Path) { watcherArray[0].EnableRaisingEvents = false; - UploadRealtimeFile.UploadRealtimeFileOnce(e.FullPath, lastLine); + UploadRealtimeFile.UploadRealtimeFileOnce(e.FullPath, lastLine, WorkAreaId); } else if (watch != null && watch.Path == watcherArray[1].Path) { watcherArray[1].EnableRaisingEvents = false; - UploadPostproFile.UploadPostproFileOnce(watcherArray[1].Path, lastLine); + UploadPostproFile.UploadPostproFileOnce(watcherArray[1].Path, lastLine, WorkAreaId); } var str= dataList.Where(f => f.Data == lastLine).FirstOrDefault(); if (!string.IsNullOrWhiteSpace(lastLine) diff --git a/Txgy.FilesWatcher/Views/MainView.xaml b/Txgy.FilesWatcher/Views/MainView.xaml index 985d1f7..e3b55eb 100644 --- a/Txgy.FilesWatcher/Views/MainView.xaml +++ b/Txgy.FilesWatcher/Views/MainView.xaml @@ -17,7 +17,7 @@ - + @@ -33,21 +33,17 @@ - + - - + + - - - - -