mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Just standardizing built-in extensions to use a `internal sealed class Icons` for all their non-dynamic icons. Looks like a LOT of changes, but it's icons all the way down.
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
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.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Resources;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.CmdPal.Ext.WindowsSettings.Classes;
|
|
using Microsoft.CmdPal.Ext.WindowsSettings.Properties;
|
|
using Microsoft.CommandPalette.Extensions;
|
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
|
using Windows.ApplicationModel.DataTransfer;
|
|
using Windows.Networking.NetworkOperators;
|
|
using Windows.UI;
|
|
|
|
namespace Microsoft.CmdPal.Ext.WindowsSettings.Commands;
|
|
|
|
internal sealed partial class CopySettingCommand : InvokableCommand
|
|
{
|
|
private readonly WindowsSetting _entry;
|
|
|
|
internal CopySettingCommand(WindowsSetting entry)
|
|
{
|
|
Name = Resources.CopyCommand;
|
|
Icon = Icons.CopyIcon;
|
|
_entry = entry;
|
|
}
|
|
|
|
public override CommandResult Invoke()
|
|
{
|
|
ClipboardHelper.SetText(_entry.Command);
|
|
|
|
return CommandResult.Dismiss();
|
|
}
|
|
}
|