diff --git a/PetWash.Api/petwash.db-shm b/PetWash.Api/petwash.db-shm
new file mode 100644
index 0000000..fe9ac28
Binary files /dev/null and b/PetWash.Api/petwash.db-shm differ
diff --git a/PetWash.Api/petwash.db-wal b/PetWash.Api/petwash.db-wal
new file mode 100644
index 0000000..e69de29
diff --git a/PetWashControl/ViewModels/MainViewModel.cs b/PetWashControl/ViewModels/MainViewModel.cs
index e7a4f58..bb062af 100644
--- a/PetWashControl/ViewModels/MainViewModel.cs
+++ b/PetWashControl/ViewModels/MainViewModel.cs
@@ -71,6 +71,23 @@ public partial class MainViewModel : ObservableObject
[ObservableProperty]
private double _roomTemperature = 25.0;
+ [ObservableProperty]
+ private string _currentCarouselImage = "/Images/dog.png";
+
+ [ObservableProperty]
+ private string _deviceNumber = "设备编号: PW-001";
+
+ [ObservableProperty]
+ private string _currentDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+
+ [ObservableProperty]
+ private string _currentDayOfWeek = DateTime.Now.ToString("dddd", new System.Globalization.CultureInfo("zh-CN"));
+
+ private readonly System.Timers.Timer _carouselTimer;
+ private readonly System.Timers.Timer _clockTimer;
+ private readonly string[] _carouselImages = { "/Images/dog.png", "/Images/dog1.jpg" };
+ private int _currentImageIndex = 0;
+
public MainViewModel()
{
_config = new ConfigurationService();
@@ -81,6 +98,31 @@ public partial class MainViewModel : ObservableObject
// 初始化洗护步骤
InitializeWashSteps();
+
+ // 初始化图片轮播定时器(每5秒切换)
+ _carouselTimer = new System.Timers.Timer(5000);
+ _carouselTimer.Elapsed += (s, e) =>
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ _currentImageIndex = (_currentImageIndex + 1) % _carouselImages.Length;
+ CurrentCarouselImage = _carouselImages[_currentImageIndex];
+ });
+ };
+ _carouselTimer.Start();
+
+ // 初始化时钟定时器(每秒更新)
+ _clockTimer = new System.Timers.Timer(1000);
+ _clockTimer.Elapsed += (s, e) =>
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ var now = DateTime.Now;
+ CurrentDateTime = now.ToString("yyyy-MM-dd HH:mm:ss");
+ CurrentDayOfWeek = now.ToString("dddd", new System.Globalization.CultureInfo("zh-CN"));
+ });
+ };
+ _clockTimer.Start();
}
private void InitializeWashSteps()
diff --git a/PetWashControl/Views/MainWindow.xaml b/PetWashControl/Views/MainWindow.xaml
index 82e5544..b8826c7 100644
--- a/PetWashControl/Views/MainWindow.xaml
+++ b/PetWashControl/Views/MainWindow.xaml
@@ -105,6 +105,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+ Margin="10">
+
+
+
+
+
+
+
+
+
+
@@ -338,7 +380,7 @@
HorizontalAlignment="Center"/>
-
+
-
+ Margin="10">
+
+
+
+
+
+
+
+
+
+