增加商铺列表

This commit is contained in:
chfei committed 2026-11-16 12:17:45 +08:00
1 parent d5232c581c
commit 440510aa8c
19 files changed
+734 -77

No files matched your search

@@ -22,6 +22,10 @@ class Program
[STAThread]
static int Main(string[] args)
{
if (args.Contains("--shops"))
{
return ShopManagementChecks.Run();
}
var handler = new LoginHandler();
using var httpClient = new HttpClient(handler);
using var client = new StoreApiClient(new ApiClientOptions { BaseUrl = new Uri("http://localhost:14312/api/") }, httpClient);
@@ -79,7 +83,17 @@ class Program
grid.UpdateLayout();
Check(ReferenceEquals(grid.SelectedRowBackground, app.FindResource("SelectedBackgroundBrush")), "主题选中背景");
Check(ReferenceEquals(grid.SelectedRowForeground, app.FindResource("SelectedForegroundBrush")), "主题选中文字");
Console.WriteLine("PASS: DataGridEx theme retains template, data rows and selection colors.");
grid.SelectedRowBackground = System.Windows.Media.Brushes.LightGreen;
grid.SelectedRowForeground = System.Windows.Media.Brushes.DarkGreen;
foreach (string rowStyle in new[] { "DataGridExRowStyle", "DataGridExDefaultRowStyle" })
{
grid.RowStyle = (Style)grid.FindResource(rowStyle);
grid.UpdateLayout();
var row = (DataGridRow)grid.ItemContainerGenerator.ContainerFromIndex(0);
var border = (Border)row.Template.FindName("border", row);
Check(ReferenceEquals(border.Background, grid.SelectedRowBackground), $"{rowStyle} 应使用外部选中背景");
}
Console.WriteLine("PASS: DataGridEx template, data rows, theme colors and custom selection background.");
}
finally { window.Close(); app.Shutdown(); }
return 0;