This commit is contained in:
Mike Griese
2025-08-07 14:19:06 -05:00
parent 95cfdbb93d
commit 7eaa701920
8 changed files with 19 additions and 17 deletions

View File

@@ -4,13 +4,12 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using Windows.System;
namespace SamplePagesExtension;
public partial class EvilSamplesPage : ListPage
internal sealed partial class EvilSamplesPage : ListPage
{
private readonly IListItem[] _commands = [
new ListItem(new EvilSampleListPage())

View File

@@ -172,10 +172,11 @@ internal sealed partial class SampleListPage : ListPage
{
Title = "Get the name of the Foreground window",
},
new ListItem(new JustHasProps())
{
Title = "Not actually invokable",
},
// new ListItem(new JustHasProps())
// {
// Title = "Not actually invokable",
// },
new ListItem(new CommandWithProperties())
{
Title = "I have properties",
@@ -191,7 +192,7 @@ internal sealed partial class SampleListPage : ListPage
];
}
internal sealed partial class CommandWithProperties : InvokableCommand, ICommand2
public sealed partial class CommandWithProperties : InvokableCommand, ICommand2
{
public override string Name => "Whatever";
@@ -204,7 +205,7 @@ internal sealed partial class SampleListPage : ListPage
}
#nullable enable
internal sealed partial class OtherCommandWithProperties : ICommand2, IInvokableCommand
public sealed partial class OtherCommandWithProperties : ICommand2, IInvokableCommand
{
public string Name => "Revetahw";
@@ -228,7 +229,7 @@ internal sealed partial class SampleListPage : ListPage
};
}
internal sealed partial class JustHasProps : ICommand2
public sealed partial class JustHasProps : ICommand2
{
public string Name => "JustHasProps";
@@ -252,7 +253,7 @@ internal sealed partial class SampleListPage : ListPage
};
}
internal sealed partial class AnotherCommandWithProperties : InvokableCommand, IHaveProperties
public sealed partial class AnotherCommandWithProperties : InvokableCommand, IHaveProperties
{
[DynamicDependency(DynamicallyAccessedMemberTypes.All, typeof(IHaveProperties))]
static AnotherCommandWithProperties()

View File

@@ -8,7 +8,7 @@ using Microsoft.CommandPalette.Extensions;
namespace SamplePagesExtension;
public class Program
internal class Program
{
[MTAThread]
public static void Main(string[] args)

View File

@@ -7,7 +7,7 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
namespace SamplePagesExtension;
public partial class SamplePagesCommandsProvider : CommandProvider
internal partial class SamplePagesCommandsProvider : CommandProvider
{
public SamplePagesCommandsProvider()
{

View File

@@ -14,6 +14,10 @@
<GenerateAppxPackageOnBuild>true</GenerateAppxPackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<CsWinRTComponent>true</CsWinRTComponent>
</PropertyGroup>
<ItemGroup>
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />

View File

@@ -3,13 +3,12 @@
// See the LICENSE file in the project root for more information.
using System.Timers;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
using Microsoft.VisualBasic;
namespace SamplePagesExtension;
public partial class SampleUpdatingItemsPage : ListPage
internal sealed partial class SampleUpdatingItemsPage : ListPage
{
private readonly ListItem hourItem = new(new NoOpCommand());
private readonly ListItem minuteItem = new(new NoOpCommand());

View File

@@ -7,7 +7,7 @@ using Microsoft.CommandPalette.Extensions.Toolkit;
namespace SamplePagesExtension;
public partial class SamplesListPage : ListPage
internal partial class SamplesListPage : ListPage
{
private readonly IListItem[] _commands = [

View File

@@ -3,12 +3,11 @@
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
using Microsoft.CommandPalette.Extensions;
using Microsoft.CommandPalette.Extensions.Toolkit;
namespace SamplePagesExtension;
public partial class SelfImmolateCommand : InvokableCommand
internal sealed partial class SelfImmolateCommand : InvokableCommand
{
public override ICommandResult Invoke()
{