diff --git a/AntdUIDemo.csproj b/AntdUIDemo.csproj index 39a2dbf..17937d4 100644 --- a/AntdUIDemo.csproj +++ b/AntdUIDemo.csproj @@ -13,7 +13,7 @@ Copyright © 2024 czz_y $(Version) $(Version) - 1.7.13 + 1.7.14 czz_y 基于 Winform UI 框架 AntdUI 设计的 Demo https://gitee.com/mubaiyanghua/antd-uidemo @@ -30,7 +30,7 @@ - + diff --git a/README.md b/README.md index 8e36ef3..abb5b24 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

AntdUI Demo

-本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.7.13` +本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.7.14` diff --git a/Views/UploadDraggerDemo.cs b/Views/UploadDraggerDemo.cs index 8cbeaf9..15f1de8 100644 --- a/Views/UploadDraggerDemo.cs +++ b/Views/UploadDraggerDemo.cs @@ -15,30 +15,11 @@ namespace AntdUIDemo.Views private void BindEventHandler() { + //1.7.14开始,uploadDragger自带点击打开文件选择框 uploadDragger.DragChanged += UploadDragger_DragChanged; - uploadDragger.Click += UploadDragger_Click; - } - - private void UploadDragger_Click(object sender, EventArgs e) - { - // 创建一个文件对话框实例 - OpenFileDialog openFileDialog = new OpenFileDialog(); - - // 设置文件对话框的属性 - openFileDialog.Filter = "All Files (*.*)|*.*"; // 过滤器,允许选择所有文件 - openFileDialog.Title = "Select a File"; // 对话框标题 - openFileDialog.Multiselect = false; // 不允许多选文件 - - // 显示文件对话框并检查用户是否选择了文件 - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - // 获取用户选择的文件路径 - string[] filePaths = openFileDialog.FileNames; - foreach (string path in filePaths) - { - AntdUI.Message.info(window, path, autoClose: 3); - } - } + uploadDragger.Multiselect = true;//允许多选文件 + uploadDragger.Filter = "All Files (*.*)|*.*";//文件筛选 + uploadDragger.HandDragFolder = true;//是否支持拖拽,默认为true } private void UploadDragger_DragChanged(object sender, AntdUI.StringsEventArgs e)