public void NextStep(int optProg = -1) { StepChangeRequest?.Invoke(this, new EventArgs()); int pFrom = CurrentIndex; if (optProg < 0 || optProg >= Current.Progressions.Count) // Default Progression { CurrentIndex = Current.ProgressTo >= 0 ? Current.ProgressTo : System.Math.Min(CurrentIndex + 1, Steps.Count - 1); } else // Optional Progression { CurrentIndex = Current.Progressions [optProg].DestinationIndex; } if (pFrom != CurrentIndex) // If the actual step Index changed { Current.ProgressFrom = pFrom; CopyDeviceStatus(Steps [pFrom].Patient, Current.Patient); Steps [pFrom].Patient.Deactivate(); // Additional unlinking of events and timers! } // Init step regardless of whether step Index changed; step may have been deactivated by StepChangeRequest() SetTimer(); Current.Patient.Activate(); // Trigger events for loading current Patient, and trigger propagation to devices StepChanged?.Invoke(this, new EventArgs()); Current.Patient.OnPatientEvent(Patient.PatientEventTypes.Vitals_Change); }
public void SetStep(int incIndex) { StepChangeRequest?.Invoke(this, new EventArgs()); int pFrom = CurrentIndex; CurrentIndex = II.Math.Clamp(incIndex, 0, Steps.Count - 1); if (pFrom != CurrentIndex) // If the actual step Index changed { CopyDeviceStatus(Steps [pFrom].Patient, Current.Patient); Steps [pFrom].Patient.Deactivate(); // Additional unlinking of events and timers! } // Init step regardless of whether step Index changed; step may have been deactivated by StepChangeRequest() SetTimer(); Current.Patient.Activate(); // Trigger events for loading current Patient, and trigger propagation to devices StepChanged?.Invoke(this, new EventArgs()); Current.Patient.OnPatientEvent(Patient.PatientEventTypes.Vitals_Change); }
private object Execute(Actions.Action action, object data) { object ret = null; if (action.Skip) { return(null); } CurrentAction = action; var count = action.GetItemCount(this, data); var sea = new StepEventArgs(action, count); for (int i = 0; i < count; i++) { sea.Index = i; Manager.UIThreadCall(() => StepChanged?.Invoke(this, sea)); if (State == ContextState.Stop) { return(null); } else if (State == ContextState.Pause) { _continueEvent.WaitOne(); } ret = action.Execute(this, i, data); if (ret is BreakValue) { return(ret); } if (action is Actions.ParentAction pa && !(action is Actions.Window)) { ExecuteChildren(pa, ret); } } return(ret); }
protected virtual void OnStepChanged(StepChangeEventArgs e) { StepChanged?.Invoke(this, e); }
private void InvokeStep(int step) { _appSettings.OnboardingStep = step; StepChanged?.Invoke(this, step); }
public void OnUserLoggedIn() { var step = _appSettings.OnboardingStep; StepChanged?.Invoke(this, step >= 0 ? step : 0); }
public void Finish() { _appSettings.OnboardingStep = -1; StepChanged?.Invoke(this, 0); }
/// <summary> /// Invoked whenever the current <see cref="Step"/> changes, to fire the <see cref="StepChanged"/> event. /// </summary> /// <param name="e"></param> protected virtual void OnStepChanged(EventArgs e) { StepChanged?.Invoke(this, EventArgs.Empty); }
public void StepChange(EngineData.Step step) { Step = step; StepChanged?.Invoke(step.ToString().Replace("State_", "")); }
/// <summary> /// Raises the FancyControls.Counter.ValueChanged event. /// </summary> /// <param name="e"> /// A FancyControls.ValueEventArgs that contains the event data. /// </param> protected void OnStepChanged(ValueEventArgs <int> e) { StepChanged?.Invoke(this, e); }
protected virtual void OnStepChanged(Step step) { StepChanged?.Invoke(this, step); }