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

            WeightChanged(this, arg);
        }
Exemplo 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;
     }
 }
Exemplo n.º 3
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;
            }
        }
Exemplo n.º 4
0
 public void OnWeightCompleted(object sender, WeightEventArgs e)
 {
     this.Invoke(new setText(HandleWeightCompelte), new object[] { e.Value.ToString() });
 }
Exemplo n.º 5
0
 private void OnWeightChange(double weight)
 {
     if (WeightChanged == null) return;
     WeightEventArgs arg = new WeightEventArgs(weight);
     WeightChanged(this, arg);
 }
Exemplo n.º 6
0
 public void OnWeightChanged(object sender, WeightEventArgs e)
 {
     Invoke(new setText(HandleWeightChange), new object[] { e.Value.ToString() });
 }
Exemplo n.º 7
0
 public void OnWeightCompleted1(object sender, WeightEventArgs e)
 {
     try
     {
         if (this.IsHandleCreated)
             Invoke(new HandleWeightEvent2(HandleWeightChange2), new object[] { sender, e.Value });
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 8
0
 //-------------------
 /// <summary>
 /// 处理稳定重量值
 /// </summary>
 /// <param name="weight"></param>
 public void OnWeightCompleted(object sender, WeightEventArgs e)
 {
     try
     {
         this.Invoke(new HandleWeightEvent(HandleWeightCompelte), new object[] { e.Value });
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 9
0
 //未使用计量点处理
 public void OnWeightChanged1(object sender, WeightEventArgs e)
 {
     try
     {
         if (this.IsHandleCreated)
         Invoke(new HandleWeightEvent2(HandleWeightChange2), new object[] { sender, e.Value });
     }
     catch (Exception ex)
     {
         Log.Error("CarWeigh.OnWeightChanged1() : " + ex.Message);
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// 处理不稳定重量值
 /// </summary>
 /// <param name="weight"></param>
 public void OnWeightChanged(object sender, WeightEventArgs e)
 {
     try
     {
         Invoke(new HandleWeightEvent(HandleWeightChange), new object[] { e.Value });
     }
     catch (Exception ex)
     {
     }
 }