/// <summary>
        /// Notifies the view about its initialization if the view
        /// class implements the <see cref="INotifiedView"/> interface.
        /// </summary>
        /// <param name="view">The view to be notified.</param>
        #endregion
        protected void NotifyInitialize(IView view)
        {
            INotifiedView winformsView = view as INotifiedView;

            if (winformsView != null)
            {
                winformsView.Initialize();
            }
        }
        private void NotifyViewsOnActivation(IView activatedView)
        {
            INotifiedView prevActiveWFView = prevActiveView as INotifiedView;

            if (prevActiveWFView != null)
            {
                prevActiveWFView.Activate(false);
            }
            INotifiedView winformsView = activatedView as INotifiedView;

            if (winformsView != null)
            {
                winformsView.Activate(true);
            }
            prevActiveView = activatedView;
        }
Exemple #3
0
        /// <summary>
        /// A method used to notify views about their (de)activation.
        /// </summary>
        #endregion
        protected virtual void NotifyViewsOnActivation(IView activatedView)
        {
            INotifiedView prActiveNotifiedView = prevActiveView as INotifiedView;

            if (prActiveNotifiedView != null)
            {
                prActiveNotifiedView.Activate(false);
            }
            INotifiedView activatedNotifiedView = activatedView as INotifiedView;

            if (activatedNotifiedView != null)
            {
                activatedNotifiedView.Activate(true);
            }
            prevActiveView = activatedView;
        }