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; }
void CompareBalanceAndTarget(WeightValue balanceWeight) { _relativeBalanceWeight.Value = balanceWeight.Value - _referenceWeight.Value; if (_relativeBalanceWeight.Value >= _targetWeight.Value) { StopIngredient(); } SetBalanceValueDisplayed(); }
void eReferenceWeightChange(WeightValue wv) { try { _relativeBalanceWeight.Value = GV.Instance.TotalBalanceWeight.Value - _referenceWeight.Value; } catch (Exception ex) { SimpleLogger.Logger.Log("eReferenceWeightChange", ex); throw; } }
void eRelativeBalanceWeightChange(WeightValue wv) { try { //display ingredient relative value ctrl2ValuesDisplay1.LblValue2.Text = wv.FormatKg(); } catch (Exception ex) { SimpleLogger.Logger.Log("eRelativeBalanceWeightChange", ex); throw; } }
void eTargetWeightChange(WeightValue wv) { try { //display target value ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg(); } catch (Exception ex) { SimpleLogger.Logger.Log("eTargetWeightChange", ex); throw; } }
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; } }
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; } }
void eNewWeightChange(WeightValue wv) { //this.lblNewValue.Text = wv.FormatKg(); ctrl2ValuesDisplay1.LblValue2.Text = wv.FormatKg(); }
void eOldWeightChange(WeightValue wv) { //this.lblOldValue.Text = wv.FormatKg(); ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg(); }
void eTargetWeightChange(WeightValue wv) { //display target value ctrl2ValuesDisplay1.LblValue1.Text = wv.FormatKg(); }
void eWeightChange(WeightValue wv) { this.InvokeIfRequired(c => { c.CompareBalanceAndTarget(wv); }); }
void eWeightChange(WeightValue wv) { string strWeight = wv.FormatKg() + Environment.NewLine; // this.InvokeIfRequired( c => { c.textBox1.Text += strWeight; } ); }