Beispiel #1
0
 private void OnWeightComplete(ScaleEventArgs e)
 {
     //This method is called from the background thread; it is called through a BeginInvoke
     //call so that it is always marshaled to the thread that owns the dataset
     try {
         this.mWeight = e.Weight;
         if (this.ScaleWeightReading != null)
         {
             this.ScaleWeightReading(this, new ScaleEventArgs(e.Weight, e.Error));
         }
     }
     catch (Exception) { }
 }
Beispiel #2
0
 private void OnWeightComplete(ScaleEventArgs e)
 {
     //This method is called from the background thread; it is called through a BeginInvoke
     //call so that it is always marshaled to the thread that owns the dataset
     try {
         this.mWeight   = e.Weight;
         this.mIsStable = (e.Error == ScaleError.None);
         if (WeightChanged != null)
         {
             WeightChanged(this, e);
         }
         if (this.mCallback != null)
         {
             this.mCallback.WeightReading(e.Weight, e.Error);
         }
     }
     catch (Exception ex) { System.Diagnostics.Debugger.Log(0, "", ex.ToString()); }
 }