| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using Prism.Commands;
- namespace SKMC.Api.Product.Record
- {
- /// <summary>
- /// 简单的生产数据统计工具
- /// </summary>
- public class ProductionBoard
- {
- private static ProductionBoard instance;
- public DelegateCommand ClearDataCommand { get; set; }
- private ProductionBoard()
- {
- ClearDataCommand = new DelegateCommand(() => Clear());
- }
- public static ProductionBoard Instance()
- {
- if (instance == null) instance = new ProductionBoard();
- return instance;
- }
- public ProductionRecord ProductionRecord { get; set; } = new ProductionRecord();
- /// <summary>
- /// 清空生产统计数据
- /// </summary>
- public void Clear()
- {
- ProductionRecord.ConsumeAll = 0;
- ProductionRecord.Total = 0;
- ProductionRecord.NumNG = 0;
- ProductionRecord.NumOK = 0;
- ProductionRecord.Yield = 0;
- ProductionRecord.Uph = 0;
- }
- }
- }
|