我有一个用于选择文件扩展名的组合框,例如“图像,(*.png,*.jpg)”。我想从字典键/值对中获取数据。我为第一部分添加了字符串,例如“图像”,对于扩展我添加了一个列表,因为可以有多个。我在显示 SaveFileDialog 或 OpenFileDialog 时使用此数据。如何使用这些扩展作为 SaveFileDialog 的过滤器?你能提供帮助吗?
ExtensionCollection = new Dictionary<string, IList<String>>();
ExtensionTypeCollecction = new List<String>();
Extensions = new List<IList<String>>();
perExtension = new List<String>();
perExtension.Add("*.png");
perExtension.Add("*.jpg");
Extensions.Add(perExtension);
ExtensionTypeCollecction.Add("Images");
ExtensionCollection.Add("Images", perExtension);
提前致谢