123456789101112131415161718192021222324252627 |
- using System.Windows.Forms;
- namespace FastReport.Utils
- {
- internal static class Dialogs
- {
- public static bool OpenImage(out string fileName)
- {
- using (OpenFileDialog dialog = new OpenFileDialog())
- {
- var filter = Res.Get("FileFilters,Images");
- #if AVALONIA
- filter = filter.Replace("*.tiff;", "").Replace("*.tif;", "").Replace("*.emf;", "").Replace("*.wmf;", "").Replace("*.ico;", "");
- #endif
- dialog.Filter = filter;
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- fileName = dialog.FileName;
- return true;
- }
- }
- fileName = null;
- return false;
- }
- }
- }
|