diff --git a/.claude/settings.local.json b/.claude/settings.local.json
index ec2d8c5..36e6ad9 100644
--- a/.claude/settings.local.json
+++ b/.claude/settings.local.json
@@ -8,7 +8,9 @@
"Bash(dotnet --version)",
"Bash(dotnet sln *)",
"Bash(dotnet clean *)",
- "Bash(cat)"
+ "Bash(cat)",
+ "Bash(sed -i '' 's|Background=\"#0F1620\" CornerRadius=\"8\" Padding=\"22\" BorderBrush=\"#1A2F4A\"|CornerRadius=\"8\" Padding=\"22\" BorderBrush=\"#1E3550\"|g' HomePageView.axaml)",
+ "Bash(sed -i '' 's|||g' HomePageView.axaml)"
]
}
}
diff --git a/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml b/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml
index dff2e85..958dca6 100644
--- a/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml
+++ b/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml
@@ -3,26 +3,67 @@
x:Class="Sln.Wcs.UI.Views.Base.EntityEditWindow"
x:CompileBindings="False"
SizeToContent="WidthAndHeight"
- MaxWidth="750" MaxHeight="700"
+ MaxWidth="780" MaxHeight="700"
WindowStartupLocation="CenterOwner"
Title="编辑"
- Background="#0F1620"
- Foreground="#BCC8D6"
+ Background="Transparent"
+ TransparencyLevelHint="AcrylicBlur"
+ ExtendClientAreaToDecorationsHint="True"
+ ExtendClientAreaChromeHints="PreferSystemChrome"
+ SystemDecorations="Full"
CanResize="False">
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml.cs b/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml.cs
index 316870b..c023b6c 100644
--- a/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml.cs
+++ b/Sln.Wcs.UI/Views/Base/EntityEditWindow.axaml.cs
@@ -24,7 +24,7 @@ public partial class EntityEditWindow : Window
public Task ShowDialog(object entity, List fields, bool isEdit, Window owner)
{
_entity = entity;
- Title = isEdit ? "编辑" : "新增";
+ TitleText.Text = isEdit ? "编辑" : "新增";
BuildForm(fields);
_tcs = new TaskCompletionSource();
ShowDialog(owner);
@@ -43,27 +43,27 @@ public partial class EntityEditWindow : Window
if (prop is null) continue;
var value = prop.GetValue(_entity);
- // 每行一个字段容器: 标题 + 输入框
+ // 字段卡片
var cell = new Border
{
- Width = 340,
- Padding = new Thickness(0, 4, 10, 4),
+ Width = 345,
+ Padding = new Thickness(12, 6),
+ Margin = new Thickness(0, 3),
};
- var row = new Grid
- {
- ColumnDefinitions = new ColumnDefinitions("100,*"),
- };
+ var row = new Grid { ColumnDefinitions = new ColumnDefinitions("90,*") };
+ // 标签
var label = new TextBlock
{
- Text = field.DisplayName + ":",
+ Text = field.DisplayName,
FontSize = 12,
- Foreground = Brush.Parse("#8B9BB5"),
+ Foreground = Brush.Parse("#7B8FA8"),
VerticalAlignment = VerticalAlignment.Center,
};
row.Children.Add(label);
+ // 输入框
Control input;
if (field.FieldType == FieldType.CheckBox)
{
@@ -71,7 +71,7 @@ public partial class EntityEditWindow : Window
{
IsChecked = value is int iv ? iv == 1 : (value as bool? ?? false),
IsEnabled = !field.IsReadOnly,
- Foreground = Brush.Parse("#DDE4F0"),
+ Foreground = Brush.Parse("#BCC8D6"),
VerticalAlignment = VerticalAlignment.Center,
};
cb.IsCheckedChanged += (_, _) =>
@@ -85,9 +85,13 @@ public partial class EntityEditWindow : Window
Text = value?.ToString() ?? "",
IsReadOnly = field.IsReadOnly,
Watermark = field.DisplayName,
- Background = Brush.Parse("#0C1622"),
+ Background = Brush.Parse("#0A0E14"),
Foreground = Brush.Parse("#DDE4F0"),
BorderBrush = Brush.Parse("#1A2F4A"),
+ BorderThickness = new Thickness(1),
+ CornerRadius = new CornerRadius(3),
+ Padding = new Thickness(8, 5),
+ FontSize = 12,
};
if (field.FieldType == FieldType.Number)
{
diff --git a/Sln.Wcs.UI/Views/Base/LocationInfoListView.axaml b/Sln.Wcs.UI/Views/Base/LocationInfoListView.axaml
index c8e0a49..ba10bed 100644
--- a/Sln.Wcs.UI/Views/Base/LocationInfoListView.axaml
+++ b/Sln.Wcs.UI/Views/Base/LocationInfoListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Base/MaterialInfoListView.axaml b/Sln.Wcs.UI/Views/Base/MaterialInfoListView.axaml
index ad78f03..03df5ed 100644
--- a/Sln.Wcs.UI/Views/Base/MaterialInfoListView.axaml
+++ b/Sln.Wcs.UI/Views/Base/MaterialInfoListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Base/StoreInfoListView.axaml b/Sln.Wcs.UI/Views/Base/StoreInfoListView.axaml
index 0eaea2c..9e65c5f 100644
--- a/Sln.Wcs.UI/Views/Base/StoreInfoListView.axaml
+++ b/Sln.Wcs.UI/Views/Base/StoreInfoListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Device/DeviceHostListView.axaml b/Sln.Wcs.UI/Views/Device/DeviceHostListView.axaml
index b4d28d1..8270255 100644
--- a/Sln.Wcs.UI/Views/Device/DeviceHostListView.axaml
+++ b/Sln.Wcs.UI/Views/Device/DeviceHostListView.axaml
@@ -1,12 +1,12 @@
-
-
-
+
+
-
-
+
+
diff --git a/Sln.Wcs.UI/Views/Device/DeviceInfoListView.axaml b/Sln.Wcs.UI/Views/Device/DeviceInfoListView.axaml
index a918276..cdc0745 100644
--- a/Sln.Wcs.UI/Views/Device/DeviceInfoListView.axaml
+++ b/Sln.Wcs.UI/Views/Device/DeviceInfoListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Device/DeviceParamListView.axaml b/Sln.Wcs.UI/Views/Device/DeviceParamListView.axaml
index a54e72a..667828f 100644
--- a/Sln.Wcs.UI/Views/Device/DeviceParamListView.axaml
+++ b/Sln.Wcs.UI/Views/Device/DeviceParamListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/HomePageView.axaml b/Sln.Wcs.UI/Views/HomePageView.axaml
index d1d5ed0..529697e 100644
--- a/Sln.Wcs.UI/Views/HomePageView.axaml
+++ b/Sln.Wcs.UI/Views/HomePageView.axaml
@@ -3,8 +3,15 @@
x:Class="Sln.Wcs.UI.Views.HomePageView">
+
-
+
+
+
+
+
+
+
@@ -14,32 +21,31 @@
FontSize="12" Foreground="#7B8FA8" TextWrapping="Wrap" LineHeight="20" />
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
+
+
+
+
+
+
+
@@ -49,57 +55,47 @@
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
+
+
+
+
+
+
+
@@ -108,39 +104,36 @@
-
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
@@ -149,45 +142,41 @@
-
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
+
-
-
+
-
-
+
-
diff --git a/Sln.Wcs.UI/Views/MainWindow.axaml b/Sln.Wcs.UI/Views/MainWindow.axaml
index b22fb0d..283d836 100644
--- a/Sln.Wcs.UI/Views/MainWindow.axaml
+++ b/Sln.Wcs.UI/Views/MainWindow.axaml
@@ -13,20 +13,45 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/MainWindow.axaml.cs b/Sln.Wcs.UI/Views/MainWindow.axaml.cs
index e1a2e41..f1c19d2 100644
--- a/Sln.Wcs.UI/Views/MainWindow.axaml.cs
+++ b/Sln.Wcs.UI/Views/MainWindow.axaml.cs
@@ -25,6 +25,17 @@ public partial class MainWindow : Window
_navVm.PageChanged += OnPageChanged;
BuildMenu();
_navVm.LoadDefaultPage();
+
+ // 时钟
+ var timer = new System.Timers.Timer(1000);
+ timer.Elapsed += (_, _) =>
+ Avalonia.Threading.Dispatcher.UIThread.Post(() =>
+ ClockText.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+ timer.Start();
+ ClockText.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+ // 退出按钮
+ LogoutBtn.Click += (_, _) => Close();
}
private void BuildMenu()
diff --git a/Sln.Wcs.UI/Views/Path/PathDetailsListView.axaml b/Sln.Wcs.UI/Views/Path/PathDetailsListView.axaml
index 2c188dd..3ed2e1a 100644
--- a/Sln.Wcs.UI/Views/Path/PathDetailsListView.axaml
+++ b/Sln.Wcs.UI/Views/Path/PathDetailsListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Path/PathInfoListView.axaml b/Sln.Wcs.UI/Views/Path/PathInfoListView.axaml
index 4a21e31..5b8e82a 100644
--- a/Sln.Wcs.UI/Views/Path/PathInfoListView.axaml
+++ b/Sln.Wcs.UI/Views/Path/PathInfoListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Task/TaskDetailListView.axaml b/Sln.Wcs.UI/Views/Task/TaskDetailListView.axaml
index 2cd6347..5043480 100644
--- a/Sln.Wcs.UI/Views/Task/TaskDetailListView.axaml
+++ b/Sln.Wcs.UI/Views/Task/TaskDetailListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/Sln.Wcs.UI/Views/Task/TaskQueueListView.axaml b/Sln.Wcs.UI/Views/Task/TaskQueueListView.axaml
index a233226..fe31953 100644
--- a/Sln.Wcs.UI/Views/Task/TaskQueueListView.axaml
+++ b/Sln.Wcs.UI/Views/Task/TaskQueueListView.axaml
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+