diff --git a/PetWashControl/Services/ConfigurationService.cs b/PetWashControl/Services/ConfigurationService.cs
index c9bf6ab..da4b5af 100644
--- a/PetWashControl/Services/ConfigurationService.cs
+++ b/PetWashControl/Services/ConfigurationService.cs
@@ -18,7 +18,7 @@ public class ConfigurationService
public int SprayShampoo1Time { get; set; } = 1; // 喷沐浴露1时间
public int SprayShampoo2Time { get; set; } = 1; // 喷沐浴露2时间
public int SprayShampoo3Time { get; set; } = 1; // 喷沐浴露3时间
- public int SprayWaterTime { get; set; } = 2; // 喷水时间(保留用于兼容)
public int ColdAirTime { get; set; } = 2; // 冷风机时间
public int HotAirTime { get; set; } = 5; // 热风机时间
+ public int UvSterilizationTime { get; set; } = 3; // 紫外线杀菌时间
}
diff --git a/PetWashControl/ViewModels/MainViewModel.cs b/PetWashControl/ViewModels/MainViewModel.cs
index ff88fb0..4f8c9f0 100644
--- a/PetWashControl/ViewModels/MainViewModel.cs
+++ b/PetWashControl/ViewModels/MainViewModel.cs
@@ -112,15 +112,24 @@ public partial class MainViewModel : ObservableObject
[ObservableProperty]
private int _sprayShampoo3Time = 1;
- [ObservableProperty]
- private int _sprayWaterTime = 2;
-
[ObservableProperty]
private int _coldAirTime = 2;
[ObservableProperty]
private int _hotAirTime = 5;
+ [ObservableProperty]
+ private int _uvSterilizationTime = 3;
+
+ [ObservableProperty]
+ private int _shampoo1Level = 80;
+
+ [ObservableProperty]
+ private int _shampoo2Level = 75;
+
+ [ObservableProperty]
+ private int _shampoo3Level = 70;
+
private readonly System.Timers.Timer _carouselTimer;
private readonly System.Timers.Timer _clockTimer;
private readonly string[] _carouselImages = { "/Images/dog.png", "/Images/dog1.png", "/Images/dog2.png" };
@@ -142,9 +151,9 @@ public partial class MainViewModel : ObservableObject
SprayShampoo1Time = _config.SprayShampoo1Time;
SprayShampoo2Time = _config.SprayShampoo2Time;
SprayShampoo3Time = _config.SprayShampoo3Time;
- SprayWaterTime = _config.SprayWaterTime;
ColdAirTime = _config.ColdAirTime;
HotAirTime = _config.HotAirTime;
+ UvSterilizationTime = _config.UvSterilizationTime;
// 初始化洗护步骤
InitializeWashSteps();
@@ -186,6 +195,7 @@ public partial class MainViewModel : ObservableObject
WashSteps.Add(new WashStep { Name = "第四次冲水", Status = "等待中" });
WashSteps.Add(new WashStep { Name = "热风吹毛", Status = "等待中" });
WashSteps.Add(new WashStep { Name = "冷热风混合", Status = "等待中" });
+ WashSteps.Add(new WashStep { Name = "紫外线杀菌", Status = "等待中" });
}
public async Task InitializeAsync()
@@ -294,11 +304,11 @@ public partial class MainViewModel : ObservableObject
_config.SprayShampoo1Time = SprayShampoo1Time;
_config.SprayShampoo2Time = SprayShampoo2Time;
_config.SprayShampoo3Time = SprayShampoo3Time;
- _config.SprayWaterTime = SprayWaterTime;
_config.ColdAirTime = ColdAirTime;
_config.HotAirTime = HotAirTime;
+ _config.UvSterilizationTime = UvSterilizationTime;
- _logger.LogInfo($"系统参数已保存 - 首次喷水:{FirstSprayWaterTime}min, 沐浴1后喷水:{AfterShampoo1SprayTime}min, 沐浴2后喷水:{AfterShampoo2SprayTime}min, 沐浴3后喷水:{AfterShampoo3SprayTime}min, 喷沐浴露1:{SprayShampoo1Time}min, 喷沐浴露2:{SprayShampoo2Time}min, 喷沐浴露3:{SprayShampoo3Time}min, 喷水:{SprayWaterTime}min, 冷风:{ColdAirTime}min, 热风:{HotAirTime}min");
+ _logger.LogInfo($"系统参数已保存 - 首次喷水:{FirstSprayWaterTime}min, 沐浴1后喷水:{AfterShampoo1SprayTime}min, 沐浴2后喷水:{AfterShampoo2SprayTime}min, 沐浴3后喷水:{AfterShampoo3SprayTime}min, 喷沐浴露1:{SprayShampoo1Time}min, 喷沐浴露2:{SprayShampoo2Time}min, 喷沐浴露3:{SprayShampoo3Time}min, 冷风:{ColdAirTime}min, 热风:{HotAirTime}min, 紫外线杀菌:{UvSterilizationTime}min");
MessageBox.Show("系统参数保存成功!", "成功", MessageBoxButton.OK, MessageBoxImage.Information);
}
@@ -529,7 +539,8 @@ public partial class MainViewModel : ObservableObject
("护理液喷洒", SprayShampoo3Time * 60),
("第四次冲水", AfterShampoo3SprayTime * 60),
("热风吹毛", HotAirTime * 60),
- ("冷热风混合", ColdAirTime * 60)
+ ("冷热风混合", ColdAirTime * 60),
+ ("紫外线杀菌", UvSterilizationTime * 60)
};
int totalDuration = steps.Sum(s => s.Item2);
@@ -694,6 +705,7 @@ public partial class MainViewModel : ObservableObject
case "第一次冲水":
case "第二次冲水":
case "第三次冲水":
+ case "第四次冲水":
// 冲水阶段:水温在38-42度之间波动
WaterTemperature = 40.0 + (random.NextDouble() - 0.5) * 4;
RoomTemperature = 25.0 + (random.NextDouble() - 0.5) * 2;
@@ -701,6 +713,7 @@ public partial class MainViewModel : ObservableObject
case "沐浴露喷洒":
case "香波喷洒":
+ case "护理液喷洒":
// 喷洒阶段:水温略低
WaterTemperature = 38.0 + (random.NextDouble() - 0.5) * 2;
RoomTemperature = 25.0 + (random.NextDouble() - 0.5) * 2;
@@ -718,6 +731,12 @@ public partial class MainViewModel : ObservableObject
RoomTemperature = 30.0 - progress * 5 + (random.NextDouble() - 0.5) * 2;
break;
+ case "紫外线杀菌":
+ // 紫外线杀菌阶段:温度稳定
+ WaterTemperature = 25.0 + (random.NextDouble() - 0.5) * 1;
+ RoomTemperature = 26.0 + (random.NextDouble() - 0.5) * 1;
+ break;
+
default:
// 默认温度
WaterTemperature = 40.0 + (random.NextDouble() - 0.5) * 2;
diff --git a/PetWashControl/Views/MainWindow.xaml b/PetWashControl/Views/MainWindow.xaml
index 9159b8b..1daea55 100644
--- a/PetWashControl/Views/MainWindow.xaml
+++ b/PetWashControl/Views/MainWindow.xaml
@@ -1808,41 +1808,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1950,11 +1950,29 @@
Padding="15,12"
Margin="0,0,0,10">
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+