コード例 #1
0
        public AboutView()
        {
            InitializeComponent();

            presenter = Bootstrapper.ServiceLocator.GetService <IAboutViewPresenter>();
            this.AttachToPresenter(presenter, false);
        }
コード例 #2
0
 public void DetatchFromPresenter()
 {
     lock (this)
     {
         if (presenter != null)
         {
             presenter.DisconnectView(this);
             presenter = null;
         }
     }
 }
コード例 #3
0
        //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);
        }