public static string SaveFile(string title = "Enter the name of the file to save to", string filter = "") { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { if (PrefersKdialog()) { return(KDialog.SaveFile(title)); } return(Zenity.SaveFile(title)); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return(Win32Dialog.SaveFile(title, filter)); } throw new NoImplementationException(); }
public static string OpenFolder(string title = "Choose a folder") { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { if (PrefersKdialog()) { return(KDialog.OpenFolder(title)); } return(Zenity.OpenFolder(title)); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return(Win32Dialog.OpenFolder(title)); } throw new NoImplementationException(); }
public static List <string> OpenMultipleFiles(string title = "Choose one or more files") { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { if (PrefersKdialog()) { return(KDialog.OpenMultipleFiles(title)); } return(Zenity.OpenMultipleFiles(title)); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return(Win32Dialog.OpenMultipleFiles(title)); } throw new NoImplementationException(); }