示例#1
0
        private void Init()
        {
            _model        = new Wizard();
            StepContainer = new StepController();

            var lstControllers = new List <IController>
            {
                new InvoiceController(new InvoiceView(), _model),
                new UserDocumentController(new UserDocumentView(), _model),
                new UserGenderController(new UserGenderView(), _model),
                new CampaignController(new CampaignView(), _model),
                new ShufflingController(new ShufflingView(), _model),
                new PrintController(new PrintView(), _model),
                new TryAgainController(new TryAgainView(), _model)
            };

            var iStep = 0;

            lstControllers.ForEach(item =>
            {
                BindStepEvents(item);
                StepContainer.Add(++iStep, item);
            });

            StepContainer.OnStepMovedEventHandler += OnStepMovedEventHandler;
            StepContainer.MoveFirstStep();
        }