private void OnWeightChange(double weight) { if (WeightChanged == null) { return; } WeightEventArgs arg = new WeightEventArgs(weight); WeightChanged(this, arg); }
private void OnWeightCompleted(double weight) { if (WeightCompleted == null) { return; } WeightEventArgs arg = new WeightEventArgs(weight); _count++; if (_count > _maxCount) // 稳定值计算判断 { arg.Value = weight; WeightCompleted(this, arg);// 称重完成事件 isWeightComplete = true; _count = 0; } }
public void OnWeightCompleted(object sender, WeightEventArgs e) { this.Invoke(new setText(HandleWeightCompelte), new object[] { e.Value.ToString() }); }
public void OnWeightChanged(object sender, WeightEventArgs e) { Invoke(new setText(HandleWeightChange), new object[] { e.Value.ToString() }); }
private void OnWeightCompleted(double weight) { if (WeightCompleted == null) return; WeightEventArgs arg = new WeightEventArgs(weight); _count++; if (_count > _maxCount) // 稳定值计算判断 { arg.Value = weight; WeightCompleted(this, arg);// 称重完成事件 isWeightComplete = true; _count = 0; } }
private void OnWeightChange(double weight) { if (WeightChanged == null) return; WeightEventArgs arg = new WeightEventArgs(weight); WeightChanged(this, arg); }