Ejemplo n.º 1
0
        public SelectGeneratorView()
        {
            InitializeComponent();

            presenter = Bootstrapper.ServiceLocator.GetService <ISelectGeneratorViewPresenter>();
            this.AttachToPresenter(presenter, true);
        }
Ejemplo n.º 2
0
 public void DetatchFromPresenter()
 {
     lock (this)
     {
         if (presenter != null)
         {
             presenter.DisconnectView(this);
             presenter = null;
         }
     }
 }
Ejemplo n.º 3
0
        public void AttachToPresenter(ISelectGeneratorViewPresenter presenter, bool requiresInitialState)
        {
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }

            DetatchFromPresenter();

            this.presenter = presenter;

            presenter.ConnectView(this, requiresInitialState);
        }