| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TeamAAS_VP.Models
- {
- public class Yield : BindableBase
- {
- private int _OK;
- public int OK
- {
- get { return _OK; }
- set { SetProperty(ref _OK,value); Update(); }
- }
- private int _NG;
- public int NG
- {
- get { return _NG; }
- set { SetProperty(ref _NG, value); Update(); }
- }
- private int _Throw;
- public int Throw
- {
- get { return _Throw; }
- set { SetProperty(ref _Throw, value); }
- }
- private int _Total;
- public int Total
- {
- get { return _Total; }
- set { SetProperty(ref _Total, value); }
- }
- private double _Ratio;
- public double Ratio
- {
- get { return _Ratio; }
- set { SetProperty(ref _Ratio, value); }
- }
- private void Update()
- {
- Total = _OK + _NG;
- Ratio = (double)_OK / (double)(Total);
- }
- }
- }
|