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