41 references to PanelSection
aspire-tray (41)
src\Aspire.Tray\Common\TrayPanel.cs (38)
88
private (
PanelSection
Section, AppHostId Host)? _actions;
163
public (
PanelSection
Section, AppHostId Host)? ActionsRow => _actions;
232
_focus = new(PanelTargetKind.Back,
PanelSection
.None, null);
260
BeginConfirm(new(PanelConfirmKind.RemoveMissing,
PanelSection
.Recent, host));
580
_focus = new(PanelTargetKind.Settings,
PanelSection
.None, null);
654
var recent = target.Key.Section ==
PanelSection
.Recent;
712
BeginConfirm(new(PanelConfirmKind.ClearRecent,
PanelSection
.Recent, null));
769
Add(ListItemKind.Empty, EmptyStateHeight,
PanelSection
.None, null);
771
AddSection(
PanelSection
.Running, running, expanded: true);
772
AddSection(
PanelSection
.Pinned, pinned, expanded: true);
773
AddSection(
PanelSection
.Recent, state.RecentAppHosts, IsRecentExpanded);
777
void Add(ListItemKind kind, double height,
PanelSection
section, AppHostMenuItem? host, PanelTargetKind target = default)
783
void AddSection(
PanelSection
section, IReadOnlyList<AppHostMenuItem> hosts, bool expanded)
791
if (section ==
PanelSection
.Recent && _confirm is { Kind: PanelConfirmKind.ClearRecent })
818
Add(ListItemKind.SectionHeader, SectionHeaderHeight,
PanelSection
.None, null, PanelTargetKind.LaunchAtSignIn);
819
Add(ListItemKind.SettingsToggle, SettingsRowHeight,
PanelSection
.None, null, PanelTargetKind.LaunchAtSignIn);
820
Add(ListItemKind.SectionHeader, SectionHeaderHeight,
PanelSection
.None, null, PanelTargetKind.Documentation);
821
Add(ListItemKind.About, AboutHeight,
PanelSection
.None, null);
892
item.Section ==
PanelSection
.Running && duplicateNames.Contains(item.Host!.DisplayName), palette);
1008
case ListItemKind.SectionHeader when item.Section ==
PanelSection
.Recent && _settings is null:
1132
private void AddSectionHeader(List<PanelCommand> commands, List<PanelHitTarget> targets,
PanelSection
section, double top,
1137
PanelSection
.Running => "RUNNING",
1138
PanelSection
.Pinned => "PINNED",
1142
if (section !=
PanelSection
.Recent)
1145
AddLabel(section ==
PanelSection
.Running ? "section.running" : "section.pinned",
1146
section ==
PanelSection
.Running ? "Running" : "Pinned", labelBounds, chrome: false);
1170
private void AddRow(List<PanelCommand> commands, List<PanelHitTarget> targets, AppHostMenuItem host,
PanelSection
section,
1243
PanelSection
.Running => _state.AppHosts.Where(host => host.Id.AppHostPid != 0),
1244
PanelSection
.Pinned => _state.AppHosts.Where(host => host.Id.AppHostPid == 0),
1257
private List<(PanelTargetKind Kind, int Item, PanelIcon Icon, string Label, string Name)> GetRowActions(AppHostMenuItem host,
PanelSection
section)
1276
if (section ==
PanelSection
.Recent)
1288
private void AddActions(List<PanelCommand> commands, List<PanelHitTarget> targets, AppHostMenuItem host,
PanelSection
section,
1383
var
section = confirm.Section;
1418
var backKey = new PanelTargetKey(PanelTargetKind.Back,
PanelSection
.None, null);
1431
var key = new PanelTargetKey(kind,
PanelSection
.None, null);
1489
var key = new PanelTargetKey(kind,
PanelSection
.None, null);
1629
private readonly record struct ListItem(ListItemKind Kind, double Y, double Height,
PanelSection
Section, AppHostMenuItem? Host,
1633
private sealed record PanelConfirm(PanelConfirmKind Kind,
PanelSection
Section, AppHostMenuItem? Host);
src\Aspire.Tray\Common\TrayPanelScene.cs (1)
165
internal readonly record struct PanelTargetKey(PanelTargetKind Kind,
PanelSection
Section, AppHostId? Host, int Item = 0);
TrayApplication.NativeSmoke.cs (2)
270
.Concat(row.Key.Section ==
PanelSection
.Recent ? [$"Remove {name} from recent AppHosts"] : []);
433
var rows = panel.Scene.Targets.Where(target => target.Kind == PanelTargetKind.Row && target.Key.Section !=
PanelSection
.Recent).ToList();