/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/OpenSettingsCommand.cs
42 строки
1 KB
Jiří Polášek
CmdPal: Extension Gallery (#46636)
15 май 2026, 00:30
Не верифицирован
15 май 2026, 00:30
c4ff073
Код
Авторство
О чём код?
// 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 CommunityToolkit.Mvvm.Messaging; using Microsoft.CmdPal.UI.Messages; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; namespace Microsoft.CmdPal.UI.ViewModels.BuiltinCommands; public partial class OpenSettingsCommand : InvokableCommand { public OpenSettingsCommand() : this( settingsPageTag: string.Empty, name: Properties.Resources.builtin_open_settings_name, glyph: "\uE713", id: "com.microsoft.cmdpal.opensettings") /* #no-spell-check-line */ { } protected OpenSettingsCommand( string settingsPageTag, string name, string glyph, string id) { _settingsPageTag = settingsPageTag; Name = name; Icon = new IconInfo(glyph); Id = id; } private readonly string _settingsPageTag; public override ICommandResult Invoke() { WeakReferenceMessenger.Default.Send(new OpenSettingsMessage(_settingsPageTag)); return CommandResult.KeepOpen(); } }