Esempio n. 1
0
        public AuthorisationModel(IAuthorisationView authorisationView, IWizard wizard)
        {
            this.wizard = wizard;
            // register events and handlers
            this.authorisationView = authorisationView;
            //register new subscription event handler with event
            authorisationView.RegisterNewSubscription(NewSubscriptionHandler);
            //register new certificate handler with new event
            authorisationView.RegisterNewCertificate(NewCertificateHandler);
            //register new changed SID selection handler
            authorisationView.RegisterChangedSIDSelection(ChangedSIDSelectionHandler);
            //register for changes to selection of the certificates on the ui.
            authorisationView.RegisterChangedCertificateSelection(ChangedCertificateSelectionHandler);
            //register for create button click
            authorisationView.RegisterCreate(CreateButtonHandler);
            //register password changed handler
            authorisationView.RegisterCertificatePasswordChanged(CertficatePasswordChanged);

            ITabNavigation genericPanel = CastITabNavigation(authorisationView);
            genericPanel.RegisterNext(NextHandler,TabNumber);

            // set up display on the view if there are SID's to show
            if (wizard.GetSIDList() != null && wizard.GetCertList() != null)
            {
                authorisationView.DisplaySubsriptions(wizard.GetSIDList());
                authorisationView.DisplayCertificates(wizard.GetCertList());
                authorisationView.DisableCreate();
                authorisationView.EnableNext();
            }
        }