From 1e45582d78413ae5696e0b0bc971fad7e9d64c49 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 22 八月 2023 15:48:39 +0800
Subject: [PATCH] 1

---
 DataLoader/MainWindow.xaml.cs |   37 ++++++++++++++++++++++++-------------
 1 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/DataLoader/MainWindow.xaml.cs b/DataLoader/MainWindow.xaml.cs
index 012e33f..18ce32d 100644
--- a/DataLoader/MainWindow.xaml.cs
+++ b/DataLoader/MainWindow.xaml.cs
@@ -15,9 +15,11 @@
 {
     public partial class MainWindow : Window
     {
-        private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>();
+        public ResWin resWin;
 
-        private LoginWin win;
+        private LoginWin loginWin;
+
+        private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>();
 
         public MainWindow()
         {
@@ -60,24 +62,19 @@
         // 璁剧疆
         private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e)
         {
-            win = new LoginWin();
+            loginWin = new LoginWin();
             this.Hide();
-            win.Show();
+            loginWin.Show();
         }
 
         public void SetLoginInfo()
         {
-            if (win != null) win.Close();
+            if (loginWin != null) loginWin.Close();
             this.Show();
 
-            //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 Common.UserId);
-            //int.TryParse(didStr, out Common.DirId);
+            this.tbUid.Text = CommonProp.UserId.ToString();
+            this.tbUname.Text = CommonProp.Uname;
+            this.tbToken.Text = CommonProp.Token;
 
             this.btnLoad.IsEnabled = true;
             this.btnImport.IsEnabled = true;
@@ -86,7 +83,21 @@
         // 璧勬簮鐩綍
         private void Dir_MouseLeftButtonDown(object sender, RoutedEventArgs e)
         {
+            resWin = new ResWin();
+            this.Hide();
+            resWin.Show();
+        }
 
+        public void SetRes(string dircode, string fullName)
+        {
+            if (resWin != null) resWin.Close();
+            this.Show();
+
+            if (!string.IsNullOrEmpty(dircode))
+            {
+                CommonProp.Dircode = dircode;
+                this.tbDir.Text = fullName;
+            }
         }
 
         // 鏁版嵁鐩綍

--
Gitblit v1.9.3