20 instantiations of PanelAction
Aspire.Tray.Tests (20)
src\Aspire.Tray\Common\TrayPanel.cs (16)
525return new(false, new PanelAction(PanelActionKind.Close)); 757return new(PanelActionKind.OpenDashboard, host, target.Bounds) { Recent = recent }; 762return new(PanelActionKind.Stop, host, target.Bounds) { Recent = recent }; 764return new(PanelActionKind.Start, host, target.Bounds) { Recent = recent }; 773return new(PanelActionKind.OpenIn, host, target.Bounds) 780return new(PanelActionKind.ShowInFolder, host, target.Bounds) { Recent = recent }; 783return new(PanelActionKind.CopyPath, host, target.Bounds) { Recent = recent }; 786return new(PanelActionKind.TogglePin, host, target.Bounds) { Recent = recent }; 789return new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true }; 793return new(PanelActionKind.ToggleRecent, Anchor: target.Bounds); 805PanelConfirmKind.ClearRecent => new(PanelActionKind.ClearRecent, Anchor: target.Bounds), 806_ => new(PanelActionKind.RemoveRecent, host, target.Bounds) { Recent = true } 813return new(PanelActionKind.SetLaunchAtSignIn, Anchor: target.Bounds) { Enabled = _settings?.Startup?.Enabled != true }; 815return new(PanelActionKind.Documentation, Anchor: target.Bounds); 817return new(PanelActionKind.Settings, Anchor: target.Bounds); 819return new(PanelActionKind.Quit, Anchor: target.Bounds);
src\Aspire.Tray\Linux\LinuxTrayPanel.cs (1)
581_execute(new(PanelActionKind.Settings));
TrayPanelTests.cs (3)
270Assert.Equal(new PanelAction(PanelActionKind.OpenIn, host, default) { Application = "Terminal" }, 297Assert.Equal(new PanelAction(PanelActionKind.RemoveRecent, recent, remove.Bounds) { Recent = true }, action); 661Assert.Equal(new PanelAction(PanelActionKind.Stop, state.AppHosts[1], Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).Bounds), action);
21 references to PanelAction
Aspire.Tray.Tests (21)
src\Aspire.Tray\Common\TrayPanel.cs (4)
321var action = Activate(target); 417var action = !wasDraggingScrollbar && _pressed is { } pressed && target is { Enabled: true } && target.Key == pressed 532var action = Activate(focused); 734private PanelAction? Activate(PanelHitTarget target)
src\Aspire.Tray\Common\TrayPanelScene.cs (3)
279/// Open the AppHost's folder in <see cref="PanelAction.Application"/>, one of 303/// <summary>Turn launch at sign-in on or off, per <see cref="PanelAction.Enabled"/>.</summary> 326internal readonly record struct PanelResponse(bool Redraw, PanelAction? Action = null)
src\Aspire.Tray\Linux\LinuxTrayApplication.cs (2)
602private void ExecutePanelAction(PanelAction action) 615private void ExecutePanelCommand(PanelAction action)
src\Aspire.Tray\Linux\LinuxTrayPanel.cs (2)
13private readonly Action<PanelAction> _execute; 149Action<PanelAction> execute, LinuxPanelBackend backend)
TrayPanelTests.cs (10)
257PanelAction? Pick(PanelTargetKind kind, int item = 0) 265var action = Click(panel, target.HitBounds).Action; 274var pin = Pick(PanelTargetKind.TogglePin); 295var action = Click(panel, remove.HitBounds).Action; 435var start = Click(panel, Target(panel, PanelTargetKind.Start, state.AppHosts[3]).HitBounds).Action; 659var action = Click(panel, Target(panel, PanelTargetKind.Stop, state.AppHosts[1]).HitBounds).Action; 712var action = Click(panel, panel.Scene.Targets.Single(target => target.Kind == PanelTargetKind.Documentation).HitBounds).Action; 762var action = Click(panel, Target(panel, PanelTargetKind.ConfirmAccept, missing).HitBounds).Action; 784var setLaunch = Click(panel, launch.HitBounds).Action; 1487var clear = panel.Invoke(accept).Action;