| | |
| | | if (vm != null && vm.Items != null) |
| | | { |
| | | var item = vm.Items.FirstOrDefault(); |
| | | if (item != null) |
| | | { |
| | | this.barTxtQ.EditValue = $"{Math.Round(item.Q, 1)}m³/h"; |
| | | this.barTxtH.EditValue = $"{Math.Round(item.H, 2)}m"; |
| | | this.barTxtP.EditValue = $"{Math.Round(item.P ?? 0, 1)}kW"; |
| | | this.barTxtE.EditValue = $"{Math.Round(item.E ?? 0, 1)}%"; |
| | | } |
| | | SetCurrent(item); |
| | | } |
| | | } |
| | | |
| | | //设置当前 |
| | | private void SetCurrent(PumpRunViewItemViewModel item) |
| | | { |
| | | if (item != null) |
| | | { |
| | | this.barTxtQ.EditValue = $"{Math.Round(item.Q, 1)}m³/h"; |
| | | this.barTxtH.EditValue = $"{Math.Round(item.H, 2)}m"; |
| | | this.barTxtP.EditValue = $"{Math.Round(item.P ?? 0, 1)}kW"; |
| | | this.barTxtE.EditValue = $"{Math.Round(item.E ?? 0, 1)}%"; |
| | | } |
| | | } |
| | | |