lixiaojun
2024-10-26 dd4da9a651330fabe210618581299ac3536bda2f
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/01-info/InputXhsProjectInfoWizardPage.cs
@@ -1,4 +1,5 @@
using 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();
            }
        }
    }
}