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 @@ - + - - + + - - - - -