Exemplo n.º 1
0
        public static void Run <TWizardController>(BaseNavigatorControl navigator, WizardOnAction action)
            where TWizardController : WizardController, new()
        {
            var wizard = GetWizard <TWizardController>(navigator);

            wizard.Run(action);
        }
Exemplo n.º 2
0
        public void Run(WizardOnAction action)
        {
            if (!WizardSteps.ContainsKey(Navigator.GetType()))
            {
                return;
            }

            foreach (var step in WizardSteps[Navigator.GetType()].Where(step => step.OnAction.Contains(action)))
            {
                step.Run(this, action);
            }
        }
Exemplo n.º 3
0
        public string GetHeader(WizardOnAction action)
        {
            if (!WizardSteps.ContainsKey(Navigator.GetType()))
            {
                return(null);
            }

            return(WizardSteps[Navigator.GetType()]
                   .Where(step => step.OnAction.Contains(action))
                   .Where(r => r.EnabledHandler == null || r.EnabledHandler(this, action))
                   .Select(step => step.Header)
                   .FirstOrDefault());
        }
Exemplo n.º 4
0
        public static string GetHeader <TWizardController>(BaseNavigatorControl navigator, WizardOnAction action)
            where TWizardController : WizardController, new()
        {
            var wizard = GetWizard <TWizardController>(navigator);

            return(wizard.GetHeader(action));
        }
Exemplo n.º 5
0
 public abstract void Run(WizardController wizardController, WizardOnAction onAction);
Exemplo n.º 6
0
 protected WizardStep(Type onForm, WizardOnAction onAction, Type toAction, Type toForm, Type toFormNavigatorInfo)
     : this(onForm, new [] { onAction }, toAction, toForm, toFormNavigatorInfo)
 {
 }