コード例 #1
0
ファイル: frmEditRecipe.cs プロジェクト: xhominum/Robot
        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
ファイル: frmManualMode.cs プロジェクト: xhominum/Robot
 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
ファイル: frmEditRecipe.cs プロジェクト: xhominum/Robot
 void eNewWeightChange(WeightValue wv)
 {
     //this.lblNewValue.Text = wv.FormatKg();
     ctrl2ValuesDisplay1.LblValue2.Text = wv.FormatKg();
 }
コード例 #9
0
ファイル: frmEditRecipe.cs プロジェクト: xhominum/Robot
 void eOldWeightChange(WeightValue wv)
 {
     //this.lblOldValue.Text = wv.FormatKg();
     ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg();
 }
コード例 #10
0
ファイル: frmManualMode.cs プロジェクト: xhominum/Robot
 void eTargetWeightChange(WeightValue wv)
 {
     //display target value
     ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg();
 }
コード例 #11
0
ファイル: frmManualMode.cs プロジェクト: xhominum/Robot
 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; } );
        }