/// ------------------------------------------------------------------------------------ /// <summary> /// Builds a filter specification for a single file type for SaveFileDialog or /// OpenFileDialog. /// </summary> /// <param name="type">The type of files to include in the filter. Do not use any of the /// enumeration values starting with "All" for a filter intended to be used in a /// SaveFileDialog.</param> /// <returns>A string suitable for setting the Filter property of a SaveFileDialog or /// OpenFileDialog</returns> /// ------------------------------------------------------------------------------------ public static string FileFilter(FileFilterType type) { string filter = String.Format("{0} ({1})|{1}", GetResourceString("kstid" + type.ToString()), s_fileFilterExtensions[type]); return(FileUtils.FileDialogFilterCaseInsensitiveCombinations(filter)); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Builds a filter specification for a single file type for SaveFileDialog or /// OpenFileDialog. /// </summary> /// <param name="type">The type of files to include in the filter. Do not use any of the /// enumeration values starting with "All" for a filter intended to be used in a /// SaveFileDialog.</param> /// <returns>A string suitable for setting the Filter property of a SaveFileDialog or /// OpenFileDialog</returns> /// ------------------------------------------------------------------------------------ public static string FileFilter(FileFilterType type) { return String.Format("{0} ({1})|{1}", GetResourceString("kstid" + type.ToString()), m_fileFilterExtensions[type]); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Builds a filter specification for a single file type for SaveFileDialog or /// OpenFileDialog. /// </summary> /// <param name="type">The type of files to include in the filter. Do not use any of the /// enumeration values starting with "All" for a filter intended to be used in a /// SaveFileDialog.</param> /// <returns>A string suitable for setting the Filter property of a SaveFileDialog or /// OpenFileDialog</returns> /// ------------------------------------------------------------------------------------ public static string FileFilter(FileFilterType type) { string filter = String.Format("{0} ({1})|{1}", GetResourceString("kstid" + type.ToString()), s_fileFilterExtensions[type]); return FileUtils.FileDialogFilterCaseInsensitiveCombinations(filter); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Builds a filter specification for a single file type for SaveFileDialog or /// OpenFileDialog. /// </summary> /// <param name="type">The type of files to include in the filter. Do not use any of the /// enumeration values starting with "All" for a filter intended to be used in a /// SaveFileDialog.</param> /// <returns>A string suitable for setting the Filter property of a SaveFileDialog or /// OpenFileDialog</returns> /// ------------------------------------------------------------------------------------ public static string FileFilter(FileFilterType type) { return(String.Format("{0} ({1})|{1}", GetResourceString("kstid" + type.ToString()), m_fileFilterExtensions[type])); }