Browse Source

Add File and Folder browser IOCommands

pull/495/head
Ionite 9 months ago
parent
commit
0d81845b95
No known key found for this signature in database
  1. 24
      StabilityMatrix.Avalonia/Helpers/IOCommands.cs

24
StabilityMatrix.Avalonia/Helpers/IOCommands.cs

@ -16,4 +16,28 @@ public static class IOCommands
}, },
url => !string.IsNullOrWhiteSpace(url) url => !string.IsNullOrWhiteSpace(url)
); );
public static AsyncRelayCommand<string?> OpenFileBrowserCommand { get; } =
new(
async path =>
{
if (string.IsNullOrWhiteSpace(path))
return;
await ProcessRunner.OpenFileBrowser(path);
},
path => !string.IsNullOrWhiteSpace(path)
);
public static AsyncRelayCommand<string?> OpenFolderBrowserCommand { get; } =
new(
async path =>
{
if (string.IsNullOrWhiteSpace(path))
return;
await ProcessRunner.OpenFolderBrowser(path);
},
path => !string.IsNullOrWhiteSpace(path)
);
} }

Loading…
Cancel
Save