/// <summary>
        /// Creates a filter string for a single file type and its associated file extensions</summary>
        /// <param name="fileType">Human-readable file type, such as "Text" or "Image"</param>
        /// <param name="extensions">One or more extensions, such as "*.txt" or "*.BMP"</param>
        /// <returns>File extension filter, e.g., "Setting file (*.xml;*.txt)|*.xml;*.txt"</returns>
        public static string GetFilterString(string fileType, IEnumerable <string> extensions)
        {
            var fb = new FileFilterBuilder();

            fb.AddFileType(fileType, extensions);
            return(fb.ToString());
        }
Пример #2
0
 /// <summary>
 /// Creates a filter string for a single file type and its associated file extensions</summary>
 /// <param name="fileType">Human-readable file type, such as "Text" or "Image"</param>
 /// <param name="extensions">One or more extensions, such as "*.txt" or "*.BMP"</param>
 /// <returns>File extension filter, e.g., "Setting file (*.xml;*.txt)|*.xml;*.txt"</returns>
 public static string GetFilterString(string fileType, IEnumerable<string> extensions)
 {
     var fb = new FileFilterBuilder();
     fb.AddFileType(fileType, extensions);
     return fb.ToString();
 }