mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
26 lines
709 B
C#
26 lines
709 B
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
namespace Microsoft.CommandPalette.Extensions.Toolkit;
|
|
|
|
public partial class OpenUrlCommand : InvokableCommand
|
|
{
|
|
private readonly string _target;
|
|
|
|
public CommandResult Result { get; set; } = CommandResult.KeepOpen();
|
|
|
|
public OpenUrlCommand(string target)
|
|
{
|
|
_target = target;
|
|
Name = Properties.Resources.OpenUrlCommand_Open;
|
|
Icon = new IconInfo("\uE8A7");
|
|
}
|
|
|
|
public override CommandResult Invoke()
|
|
{
|
|
ShellHelpers.OpenInShell(_target);
|
|
return Result;
|
|
}
|
|
}
|