public AboutView() { InitializeComponent(); presenter = Bootstrapper.ServiceLocator.GetService <IAboutViewPresenter>(); this.AttachToPresenter(presenter, false); }
public void DetatchFromPresenter() { lock (this) { if (presenter != null) { presenter.DisconnectView(this); presenter = null; } } }
//public void ShowForm() //{ // this.ShowDialog(); //} public void AttachToPresenter(IAboutViewPresenter presenter, bool requiresInitialState) { if (presenter == null) { throw new ArgumentNullException("presenter"); } DetatchFromPresenter(); this.presenter = presenter; presenter.ConnectView(this, requiresInitialState); }