From a27817f01817b22fff839a2d0b98cbb6e45a22f7 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 25 十月 2024 14:18:19 +0800
Subject: [PATCH] 增加云文件选择功能

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs |   29 ++++++++++++++++++++++-------
 1 files changed, 22 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..bb1f3b4 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
@@ -147,15 +147,30 @@
 
         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