예제 #1
0
        void LoadSelectedValue()
        {
            var groupID      = ctrlGroupSelect.SelectedGroup;
            var ingredientID = ctrlIngredientSelect.SelectedIngredient;

            _ptrCurrentWeightDB = GR.Instance.IngBD.GetWeightValue(groupID, ingredientID);
            _oldWeight.Value    = _ptrCurrentWeightDB.Value;
            _newWeight.Value    = _oldWeight.Value;
        }
예제 #2
0
 void CompareBalanceAndTarget(WeightValue balanceWeight)
 {
     _relativeBalanceWeight.Value = balanceWeight.Value - _referenceWeight.Value;
     if (_relativeBalanceWeight.Value >= _targetWeight.Value)
     {
         StopIngredient();
     }
     SetBalanceValueDisplayed();
 }
예제 #3
0
 void eReferenceWeightChange(WeightValue wv)
 {
     try
     {
         _relativeBalanceWeight.Value = GV.Instance.TotalBalanceWeight.Value - _referenceWeight.Value;
     }
     catch (Exception ex)
     {
         SimpleLogger.Logger.Log("eReferenceWeightChange", ex);
         throw;
     }
 }
예제 #4
0
 void eRelativeBalanceWeightChange(WeightValue wv)
 {
     try
     {
         //display ingredient relative value
         ctrl2ValuesDisplay1.LblValue2.Text = wv.FormatKg();
     }
     catch (Exception ex)
     {
         SimpleLogger.Logger.Log("eRelativeBalanceWeightChange", ex);
         throw;
     }
 }
예제 #5
0
 void eTargetWeightChange(WeightValue wv)
 {
     try
     {
         //display target value
         ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg();
     }
     catch (Exception ex)
     {
         SimpleLogger.Logger.Log("eTargetWeightChange", ex);
         throw;
     }
 }
예제 #6
0
 void eTotalBalanceWeightChange(WeightValue wv)
 {
     try
     {
         if (_ready)
         {
             this.InvokeIfRequired(c => {
                 lblSerialPortStatus.Text = GV.Instance.TotalBalanceWeight.FormatKg();
                 c.ProcessBalanceWeightChange(wv);
             });
         }
     }
     catch (Exception ex)
     {
         SimpleLogger.Logger.Log("eTotalBalanceWeightChange", ex);
         throw;
     }
 }
예제 #7
0
        void ProcessBalanceWeightChange(WeightValue balanceWeight)
        {
            try
            {
                _relativeBalanceWeight.Value = balanceWeight.Value - _referenceWeight.Value;

                if (_IngredientIsActive && _relativeBalanceWeight.Value >= _targetWeight.Value)
                {
                    _IngredientIsActive = false;
                    GR.Instance.OutputCtrl.SetIngredientOff(_currentIngredient);
                    _timer.Start();
                }
            }
            catch (Exception ex)
            {
                SimpleLogger.Logger.Log("ProcessBalanceWeightChange", ex);
                throw;
            }
        }
예제 #8
0
 void eNewWeightChange(WeightValue wv)
 {
     //this.lblNewValue.Text = wv.FormatKg();
     ctrl2ValuesDisplay1.LblValue2.Text = wv.FormatKg();
 }
예제 #9
0
 void eOldWeightChange(WeightValue wv)
 {
     //this.lblOldValue.Text = wv.FormatKg();
     ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg();
 }
예제 #10
0
 void eTargetWeightChange(WeightValue wv)
 {
     //display target value
     ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg();
 }
예제 #11
0
 void eWeightChange(WeightValue wv)
 {
     this.InvokeIfRequired(c => {
         c.CompareBalanceAndTarget(wv);
     });
 }
예제 #12
0
파일: MainForm.cs 프로젝트: xhominum/Robot
        void eWeightChange(WeightValue wv)
        {
            string strWeight = wv.FormatKg() + Environment.NewLine;
//			this.InvokeIfRequired( c => { c.textBox1.Text += strWeight; } );
        }