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