mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
**WARNING:** This PR will probably blow up all in-flight PRs at some point in the early days of CmdPal, two of us created seperate `Exts` and `exts` dirs. Depending on what the casing was on the branch that you checked one of those out from, it'd get stuck like that on your PC forever. Windows didn't care, so we never noticed. But GitHub does care, and now browsing the source on GitHub is basically impossible. Closes #38081
33 lines
1.2 KiB
C#
33 lines
1.2 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 Microsoft.CmdPal.Ext.Shell.Commands;
|
|
using Microsoft.CmdPal.Ext.Shell.Helpers;
|
|
using Microsoft.CmdPal.Ext.Shell.Properties;
|
|
using Microsoft.CommandPalette.Extensions.Toolkit;
|
|
|
|
namespace Microsoft.CmdPal.Ext.Shell;
|
|
|
|
internal sealed partial class FallbackExecuteItem : FallbackCommandItem
|
|
{
|
|
private readonly ExecuteItem _executeItem;
|
|
|
|
public FallbackExecuteItem(SettingsManager settings)
|
|
: base(new ExecuteItem(string.Empty, settings), Resources.shell_command_display_title)
|
|
{
|
|
_executeItem = (ExecuteItem)this.Command!;
|
|
Title = string.Empty;
|
|
_executeItem.Name = string.Empty;
|
|
Subtitle = Properties.Resources.generic_run_command;
|
|
Icon = Icons.RunV2; // Defined in Icons.cs and contains the execute command icon.
|
|
}
|
|
|
|
public override void UpdateQuery(string query)
|
|
{
|
|
_executeItem.Cmd = query;
|
|
_executeItem.Name = string.IsNullOrEmpty(query) ? string.Empty : Properties.Resources.generic_run_command;
|
|
Title = query;
|
|
}
|
|
}
|