From dd4da9a651330fabe210618581299ac3536bda2f Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期六, 26 十月 2024 21:41:24 +0800
Subject: [PATCH] 修复下载问题

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs |   34 +++++++++++++++++++++++++++-------
 1 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs
index fb47f8d..e9951ab 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs
@@ -1,4 +1,5 @@
 锘縰sing DevExpress.XtraBars.Customization;
+using Yw.CAL.HttpClient;
 
 namespace HStation.WinFrmUI
 {
@@ -147,15 +148,34 @@
 
         private void btnEditSelectModelFile_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {
-            var suffix = Settings.XhsParasHelper.Xhs.File.Suffix;
-            var dlg = new OpenFileDialog();
-            dlg.Filter = $"妯″瀷鏂囦欢(*{suffix})|*{suffix}";
-            dlg.FilterIndex = 1;
-            if (dlg.ShowDialog() == DialogResult.OK)
+            if (e.Button.Tag.ToString() == "Local")
             {
-                var fileName = dlg.FileName;
-                this.btnEditSelectModelFile.EditValue = fileName;
+                var suffix = Settings.XhsParasHelper.Xhs.File.Suffix;
+                var dlg = new OpenFileDialog();
+                dlg.Filter = $"妯″瀷鏂囦欢(*{suffix})|*{suffix}";
+                dlg.FilterIndex = 1;
+                if (dlg.ShowDialog() == DialogResult.OK)
+                {
+                    var fileName = dlg.FileName;
+                    this.btnEditSelectModelFile.EditValue = fileName;
+                }
             }
+            else
+            {
+                var dlg = new SelectXhsProjectTransferFileDlg();
+                dlg.SetBindingData();
+                dlg.ReloadDataEvent += async (rhs) =>
+                {
+                    var fileName = await BLLFactory<HStation.BLL.TransferRevitFile>.Instance.Download(rhs.StorageHouse, rhs.StorageCode);
+
+
+                    this.btnEditSelectModelFile.EditValue = fileName;
+                };
+                dlg.ShowDialog();
+            }
+
         }
+
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3