23 instantiations of TextCommand
Aspire.Tray.Tests (23)
src\Aspire.Tray\Common\TrayPanel.cs (23)
860
sink.Add(new
TextCommand
(headerBounds, general ? "GENERAL" : "ABOUT", PanelFontRole.Section, palette.TextTertiary));
932
commands.Add(new
TextCommand
(title, "Aspire", PanelFontRole.Title, palette.TextPrimary));
938
commands.Add(new
TextCommand
(statusBounds, status, PanelFontRole.Body, palette.TextSecondary));
954
? new
TextCommand
(text, notice, PanelFontRole.Body, palette.BannerText)
955
: new
TextCommand
(text, notice, PanelFontRole.Body, palette.BannerText, MaxLines: 2));
977
commands.Add(new
TextCommand
(titleBounds, title, PanelFontRole.Name, palette.TextPrimary, PanelTextAlignment.Center));
978
commands.Add(new
TextCommand
(hintBounds, hint, PanelFontRole.Body, palette.TextSecondary,
996
commands.Add(new
TextCommand
(labelBounds, label, PanelFontRole.Section, palette.TextTertiary));
1006
commands.Add(new
TextCommand
(labelBounds, label, PanelFontRole.Section, palette.TextTertiary));
1017
commands.Add(new
TextCommand
(clear, "Clear", PanelFontRole.Body, palette.Accent, PanelTextAlignment.Center));
1044
commands.Add(new
TextCommand
(new(TextLeft, top + 8, textRight - TextLeft, 18), host.DisplayName, PanelFontRole.Name, palette.TextPrimary));
1045
commands.Add(new
TextCommand
(new(TextLeft, top + 27, textRight - TextLeft, 16), detail, PanelFontRole.Body,
1160
commands.Add(new
TextCommand
(new(TextLeft + 26, item.Y, item.Right - 8 - TextLeft - 26, item.Height), label,
1175
commands.Add(new
TextCommand
(new(TextLeft, item.Y, labelRight - TextLeft, item.Height), label, PanelFontRole.Body, palette.TextPrimary));
1228
commands.Add(new
TextCommand
(questionBounds, question, PanelFontRole.Name, palette.TextPrimary));
1229
commands.Add(new
TextCommand
(detailBounds, detail, PanelFontRole.Body, palette.TextSecondary,
1248
commands.Add(new
TextCommand
(cancelBounds, "Cancel", PanelFontRole.Button, palette.TextPrimary, PanelTextAlignment.Center));
1262
commands.Add(new
TextCommand
(acceptBounds, accept, PanelFontRole.Button, palette.OnColor, PanelTextAlignment.Center));
1274
commands.Add(new
TextCommand
(title, TraySettingsText.PanelTitle, PanelFontRole.Title, palette.TextPrimary));
1297
commands.Add(new
TextCommand
(new(20, top + 8, textWidth, 20), title, PanelFontRole.Name,
1299
commands.Add(new
TextCommand
(new(20, top + 28, textWidth, 30), description, PanelFontRole.Body,
1308
commands.Add(new
TextCommand
(name, "Aspire Tray", PanelFontRole.Name, palette.TextPrimary));
1318
commands.Add(new
TextCommand
(bounds, line, PanelFontRole.Body, palette.TextSecondary, Truncation: PanelTruncation.Middle));
19 references to TextCommand
Aspire.Tray.Tests (19)
Helpers\TrayPanelSvgRenderer.cs (2)
60
case
TextCommand
text:
119
private static XElement RenderText(
TextCommand
text)
TrayPanelTests.cs (17)
114
var texts = scene.Commands.OfType<
TextCommand
>().ToList();
136
Assert.Contains(scene.Commands.OfType<
TextCommand
>(), text => text.Text == "RECENT · 2");
160
Assert.Contains(panel.Scene.Commands.OfType<
TextCommand
>(), text => text.Text == "No AppHosts running");
206
panel.Scene.Commands.OfType<
TextCommand
>().Where(text => text.Bounds.Y >= items[0].Bounds.Y && text.Bounds.Bottom <= items[^1].Bounds.Bottom)
238
Assert.Contains(panel.Scene.Commands.OfType<
TextCommand
>(), text => text.Text == "Show in File Explorer");
636
var texts = panel.Scene.Commands.OfType<
TextCommand
>().Select(text => text.Text).ToList();
657
Assert.Contains(panel.Scene.Commands.OfType<
TextCommand
>(), text => text.Text == missing.Id.AppHostPath);
683
var texts = panel.Scene.Commands.OfType<
TextCommand
>().Select(text => text.Text).ToList();
701
Assert.Contains(panel.Scene.Commands.OfType<
TextCommand
>(), text => text.Text == TraySettingsText.StableNativeInstallationRequired);
713
Assert.Contains(panel.Scene.Commands.OfType<
TextCommand
>(),
829
Assert.Contains(scene.Commands.OfType<
TextCommand
>(), text => text.Text == $"Unhealthy · {location} · PID 48213");
880
var header = scene.Commands.OfType<
TextCommand
>().Where(text => text.Bounds.Bottom <= TrayPanel.HeaderHeight).ToList();
910
Assert.Contains(withNotice.Scene.Commands.OfType<
TextCommand
>(), text => text.Text.StartsWith("Unable to save", StringComparison.Ordinal));
1026
var
label = Assert.Single(panel.Scene.Commands.OfType<
TextCommand
>(), text => text.Bounds == accept.Bounds);
1134
Assert.All(scene.Commands.OfType<
TextCommand
>().Where(text => text.Color != palette.Accent),
1347
Assert.DoesNotContain(scene.Commands.OfType<
TextCommand
>(), text => text.Text == "Documentation");