var dialog = new System.Windows.Forms.OpenFileDialog();
dialog.Filter = "图片文件(*.jpg;*.png;*.jpeg)|*.jpg;*.png;*.jpeg";
dialog.ValidateNames = true;
dialog.CheckPathExists = true;
dialog.CheckFileExists = true;
dialog.Multiselect = true;
if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
foreach (var item in dialog.FileNames)
Urls.Add(new ImgUrl() { Url = item });
}
原文地址:https://www.cnblogs.com/wblack/p/10232325.html
时间: 2024-11-09 05:36:06