add Recommendation
This commit is contained in:
1 parent
ee4125e2bf
commit
cf5f84869d
33 files changed
+320
-141
No files matched your search
+1
-1
@@ -145,7 +145,7 @@ namespace HandyControl.Interactivity
|
||||
/// <summary>
|
||||
/// 打开链接
|
||||
/// </summary>
|
||||
public static RoutedCommand OpenLink { get; } = new RoutedCommand(nameof(OpenLink), typeof(ControlCommands));
|
||||
public static OpenLinkCommand OpenLink { get; } = new OpenLinkCommand();
|
||||
|
||||
/// <summary>
|
||||
/// 关闭程序
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace HandyControl.Interactivity
|
||||
{
|
||||
public class OpenLinkCommand : ICommand
|
||||
{
|
||||
public bool CanExecute(object parameter) => true;
|
||||
|
||||
public void Execute(object parameter)
|
||||
{
|
||||
if (parameter is string link)
|
||||
{
|
||||
Process.Start(link);
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler CanExecuteChanged;
|
||||
}
|
||||
}
|
||||
File renamed without changes.
Reference in new issue
Block a user