Ejemplo n.º 1
0
        private void OnWeightChange(double weight)
        {
            if (WeightChanged == null)
            {
                return;
            }
            WeightEventArgs arg = new WeightEventArgs(weight);

            WeightChanged(this, arg);
        }
Ejemplo n.º 2
0
        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;
            }
        }
Ejemplo n.º 3
0
 public void OnWeightCompleted(object sender, WeightEventArgs e)
 {
     this.Invoke(new setText(HandleWeightCompelte), new object[] { e.Value.ToString() });
 }
Ejemplo n.º 4
0
 public void OnWeightChanged(object sender, WeightEventArgs e)
 {
     Invoke(new setText(HandleWeightChange), new object[] { e.Value.ToString() });
 }
Ejemplo n.º 5
0
 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;
     }
 }
Ejemplo n.º 6
0
 private void OnWeightChange(double weight)
 {
     if (WeightChanged == null) return;
     WeightEventArgs arg = new WeightEventArgs(weight);
     WeightChanged(this, arg);
 }