Files
petwash/液位显示功能说明.md
GukSang.Jin 9c66b6cd82
2026-03-03 16:55:02 +08:00

98 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 液位显示功能说明
## 更新内容
### 1. 新增浴露液位显示
在系统参数设置页面的固定参数显示区域,新增了三个浴露液位显示项:
**右列新增项(在风温设置下方):**
- 1号浴露液位显示1号沐浴露的剩余量百分比
- 2号浴露液位显示2号沐浴露的剩余量百分比
- 3号浴露液位显示3号沐浴露的剩余量百分比
### 2. 界面布局
固定参数显示区域现在采用平衡的两列布局:
**左列4项**
- 水温设置40°C
- 风温设置45°C
- 水压设置:标准
- 1号浴露液位80% ⭐ 新增
**右列3项**
- 2号浴露液位75% ⭐ 新增
- 3号浴露液位70% ⭐ 新增
- 系统版本v1.0.0
### 3. 技术实现
#### MainViewModel.cs
添加了三个新的可观察属性:
```csharp
[ObservableProperty]
private int _shampoo1Level = 80;
[ObservableProperty]
private int _shampoo2Level = 75;
[ObservableProperty]
private int _shampoo3Level = 70;
```
#### MainWindow.xaml
在固定参数显示区域的右列添加了三个液位显示Border
- 使用数据绑定显示液位百分比
- 绿色字体(#4CAF50)表示正常状态
- 格式化显示:`{Binding Shampoo1Level, StringFormat={}{0}%}`
### 4. 默认值
- 1号浴露液位80%
- 2号浴露液位75%
- 3号浴露液位70%
### 5. 未来扩展
液位数据可以通过以下方式更新:
1. MQTT消息接收设备实时液位数据
2. 定时器模拟液位消耗
3. 根据洗护次数自动计算液位下降
### 6. 显示效果
- 液位以百分比形式显示0-100%
- 绿色字体表示液位正常
- 可以根据液位值动态改变颜色:
- 绿色(>50%):正常
- 橙色20-50%):警告
- 红色(<20%):需要补充
## 完整的系统参数页面布局
### 可调参数(两列布局)
**左列:**
1. 首次喷水
2. 喷沐浴露1
3. 沐浴1后喷水
4. 喷沐浴露2
5. 沐浴2后喷水
**右列:**
6. 喷沐浴露3
7. 沐浴3后喷水
8. 冷风机时间
9. 热风机时间
10. 紫外线杀菌
### 固定参数显示(两列平衡布局)
**左列4项**
- 水温设置40°C
- 风温设置45°C
- 水压设置:标准
- 1号浴露液位80% ⭐
**右列3项**
- 2号浴露液位75% ⭐
- 3号浴露液位70% ⭐
- 系统版本v1.0.0
## 编译状态
✅ 项目编译成功,无错误