|
|
|
@ -6,7 +6,7 @@ using Splat; |
|
|
|
|
|
|
|
namespace Perspex.Controls |
|
|
|
{ |
|
|
|
public abstract class FileDialog : CommonDialog |
|
|
|
public abstract class FileDialog : SystemDialog |
|
|
|
{ |
|
|
|
public List<FileDialogFilter> Filters { get; set; } = new List<FileDialogFilter>(); |
|
|
|
public string InitialFileName { get; set; } |
|
|
|
@ -20,7 +20,7 @@ namespace Perspex.Controls |
|
|
|
|
|
|
|
public async Task<string> ShowAsync(Window window = null) |
|
|
|
=> |
|
|
|
((await Locator.Current.GetService<ICommonDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl)) ?? |
|
|
|
((await Locator.Current.GetService<ISystemDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl)) ?? |
|
|
|
new string[0]).FirstOrDefault(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -29,10 +29,10 @@ namespace Perspex.Controls |
|
|
|
public bool AllowMultiple { get; set; } |
|
|
|
|
|
|
|
public Task<string[]> ShowAsync(Window window = null) |
|
|
|
=> Locator.Current.GetService<ICommonDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl); |
|
|
|
=> Locator.Current.GetService<ISystemDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl); |
|
|
|
} |
|
|
|
|
|
|
|
public abstract class CommonDialog |
|
|
|
public abstract class SystemDialog |
|
|
|
{ |
|
|
|
public string Title { get; set; } |
|
|
|
} |