From a3c6000b9c452915e98abc069c4a06c34b2740e1 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 07 二月 2023 09:24:26 +0800
Subject: [PATCH] 1

---
 DataLoader/MainWindow.xaml.cs |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/DataLoader/MainWindow.xaml.cs b/DataLoader/MainWindow.xaml.cs
index dbda5b5..d2265d2 100644
--- a/DataLoader/MainWindow.xaml.cs
+++ b/DataLoader/MainWindow.xaml.cs
@@ -84,18 +84,26 @@
         // 鐧诲綍
         private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e)
         {
-            win = new LoginWin();
-            this.Hide();
-            win.Show();
+            //win = new LoginWin();
+            //this.Hide();
+            //win.Show();
+
+            SetLoginInfo();
         }
 
         public void SetLoginInfo()
         {
-            if (win != null) win.Close();
-            this.Show();
+            //if (win != null) win.Close();
+            //this.Show();
 
-            this.tbUid.Text = Tool.UserId.ToString();
-            this.tbToken.Text = Tool.Token;
+            //this.tbUid.Text = Tool.UserId.ToString();
+            //this.tbToken.Text = Tool.Token;
+
+            string uidStr = this.tbUid.Text.Trim();
+            string didStr = this.tbDir.Text.Trim();
+
+            int.TryParse(uidStr, out Tool.UserId);
+            int.TryParse(didStr, out Tool.DirId);
 
             this.btnLoad.IsEnabled = true;
             this.btnImport.IsEnabled = true;

--
Gitblit v1.9.3