Exemple #1
0
        public void Receive <T>(T eventArgs)
        {
            var stepCompletedEvent = eventArgs as StepCompletedEvent;

            if (stepCompletedEvent == null || stepCompletedEvent.WizardStep != CurrentStep)
            {
                return;
            }

            // Check that the step is not already in this state to avoid spamming the viewpager
            if (WizardFlow.IsStepCompleted(ViewPager.CurrentItem) == stepCompletedEvent.IsStepCompleted)
            {
                return;
            }

            WizardFlow.SetStepCompleted(ViewPager.CurrentItem, stepCompletedEvent.IsStepCompleted);

            ViewPager.Adapter.NotifyDataSetChanged(); //Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself.

            if (StepChanged != null)                  //Trigger the Event handler.. may be used to refresh the UI
            {
                StepChanged();
            }
        }
Exemple #2
0
 private void ProcessStepBeforeChange(WizardStep wizardStep, int position)
 {
     wizardStep.OnExit(StepExitCode.ExitNext);
     WizardFlow.SetStepCompleted(position, true);
     StateManager.PersistStepContext(wizardStep);
 }