19 instantiations of PanelAction
Aspire.Tray.Tests (19)
src\Aspire.Tray\Common\TrayPanel.cs (16)
420return new(false, new PanelAction(PanelActionKind.Close)); 652return new(PanelActionKind.OpenDashboard, host, target.Bounds) { Recent = recent }; 657return new(PanelActionKind.Stop, host, target.Bounds) { Recent = recent }; 659return new(PanelActionKind.Start, host, target.Bounds) { Recent = recent }; 668return new(PanelActionKind.OpenIn, host, target.Bounds) 675return new(PanelActionKind.ShowInFolder, host, target.Bounds) { Recent = recent }; 678return new(PanelActionKind.CopyPath, host, target.Bounds) { Recent = recent }; 681return new(PanelActionKind.TogglePin, host, target.Bounds) { Recent = recent }; 684return new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true }; 688return new(PanelActionKind.ToggleRecent, Anchor: target.Bounds); 700PanelConfirmKind.ClearRecent => new(PanelActionKind.ClearRecent, Anchor: target.Bounds), 701_ => new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true } 708return new(PanelActionKind.SetLaunchAtSignIn, Anchor: target.Bounds) { Enabled = _settings?.Startup?.Enabled != true }; 710return new(PanelActionKind.Documentation, Anchor: target.Bounds); 712return new(PanelActionKind.Settings, Anchor: target.Bounds); 714return new(PanelActionKind.Quit, Anchor: target.Bounds);
TrayPanelTests.cs (3)
230Assert.Equal(new PanelAction(PanelActionKind.OpenIn, host, default) { Application = "Terminal" }, 257Assert.Equal(new PanelAction(PanelActionKind.RemoveRecent, recent, remove.Bounds) { Recent = true }, action); 557Assert.Equal(new PanelAction(PanelActionKind.Stop, state.AppHosts[1], Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).Bounds), action);
17 references to PanelAction
Aspire.Tray.Tests (17)
src\Aspire.Tray\Common\TrayPanel.cs (4)
293var action = Activate(target); 355var action = _pressed is { } pressed && target is { Enabled: true } && target.Key == pressed ? Activate(target) : null; 427var action = Activate(focused); 629private PanelAction? Activate(PanelHitTarget target)
src\Aspire.Tray\Common\TrayPanelScene.cs (3)
237/// Open the AppHost's folder in <see cref="PanelAction.Application"/>, one of 261/// <summary>Turn launch at sign-in on or off, per <see cref="PanelAction.Enabled"/>.</summary> 284internal readonly record struct PanelResponse(bool Redraw, PanelAction? Action = null)
TrayPanelTests.cs (10)
217PanelAction? Pick(PanelTargetKind kind, int item = 0) 225var action = Click(panel, target.HitBounds).Action; 234var pin = Pick(PanelTargetKind.TogglePin); 255var action = Click(panel, remove.HitBounds).Action; 395var start = Click(panel, Target(panel, PanelTargetKind.Start, state.AppHosts[3]).HitBounds).Action; 555var action = Click(panel, Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).HitBounds).Action; 608var action = Click(panel, panel.Scene.Targets.Single(target => target.Kind == PanelTargetKind.Documentation).HitBounds).Action; 658var action = Click(panel, Target(panel, PanelTargetKind.ConfirmAccept, missing).HitBounds).Action; 680var setLaunch = Click(panel, launch.HitBounds).Action; 1247var clear = panel.Invoke(accept).Action;