void StopIngredient() { GR.Instance.OutputCtrl.SetAllIngredientOff(); btnStartStop.Text = "Start"; btnStartStop.BackColor = Color.Lime; ctrlNumPad.Enabled = true; ctrlIngredientSelect1.Enabled = true; _operationStatus = enumOperationStatus.Stopped; }
void StartIngredient() { btnStartStop.Text = "Stop"; btnStartStop.BackColor = Color.Red; ctrlNumPad.Enabled = false; ctrlIngredientSelect1.Enabled = false; _referenceWeight.Value = GV.Instance.TotalBalanceWeight.Value; GR.Instance.OutputCtrl.SetIngredientOn(ctrlIngredientSelect1.SelectedIngredient); _operationStatus = enumOperationStatus.Started; }
public void RequestStop() { if (OpStatus == enumOperationStatus.Started) { OpStatus = enumOperationStatus.Stopping; StopRequested.Raise(this); OpStatus = enumOperationStatus.Stopped; // Stopped.Raise(this); } }
public void RequestStart() { if (OpStatus == enumOperationStatus.Stopped) { OpStatus = enumOperationStatus.Starting; OperationStatusEventArgs args = new OperationStatusEventArgs(); StartRequested.Raise(this, args); if (args.StartSuccess) { OpStatus = enumOperationStatus.Started; // Started.Raise(this); } else { OpStatus = enumOperationStatus.Stopped; } } }
// public event EventHandler Stopped; public OperationStatus() { OpStatus = enumOperationStatus.Stopped; }