Ionite
12 months ago
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@
|
||||
using CommunityToolkit.Mvvm.Input; |
||||
using StabilityMatrix.Core.Processes; |
||||
|
||||
namespace StabilityMatrix.Avalonia.Helpers; |
||||
|
||||
public static class IOCommands |
||||
{ |
||||
public static RelayCommand<string?> OpenUrlCommand { get; } = |
||||
new( |
||||
url => |
||||
{ |
||||
if (string.IsNullOrWhiteSpace(url)) |
||||
return; |
||||
|
||||
ProcessRunner.OpenUrl(url); |
||||
}, |
||||
url => !string.IsNullOrWhiteSpace(url) |
||||
); |
||||
} |
Loading…
Reference in new issue