mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
CmdPal: Removing Core projects (#45693)
Functionally, no differences. - Removed Core projects. - Core.Common => Microsoft.CmdPal.Common - Core.ViewModels => Microsoft.CmdPal.UI.ViewModels --------- Co-authored-by: Jiří Polášek <me@jiripolasek.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// 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.ViewModels.Messages;
|
||||
using Microsoft.CommandPalette.Extensions.Toolkit;
|
||||
|
||||
namespace Microsoft.CmdPal.UI.ViewModels.Commands;
|
||||
|
||||
public sealed partial class ShowDetailsCommand : InvokableCommand
|
||||
{
|
||||
public static string ShowDetailsCommandId { get; } = "com.microsoft.cmdpal.showDetails";
|
||||
|
||||
private static IconInfo IconInfo { get; } = new IconInfo("\uF000"); // KnowledgeArticle Icon
|
||||
|
||||
private DetailsViewModel Details { get; set; }
|
||||
|
||||
public ShowDetailsCommand(DetailsViewModel details)
|
||||
{
|
||||
Id = ShowDetailsCommandId;
|
||||
Name = UI.ViewModels.Properties.Resources.ShowDetailsCommand;
|
||||
Icon = IconInfo;
|
||||
Details = details;
|
||||
}
|
||||
|
||||
public override CommandResult Invoke()
|
||||
{
|
||||
// Send the ShowDetailsMessage when the action is invoked
|
||||
WeakReferenceMessenger.Default.Send<ShowDetailsMessage>(new(Details));
|
||||
return CommandResult.KeepOpen();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user