示例#1
0
        /// <summary>
        /// Sets the view internally.
        /// </summary>
        /// <param name="view">The new view for this display.</param>
        /// <param name="notifyView">if set to <c>true</c> the view will be notified so that it can adapt to the change.</param>
        internal virtual void SetViewInternal(ViewBase view, bool notifyView)
        {
            this.view = view;

            if (this.view != null)
            {
                if (notifyView)
                {
                    this.view.SetDisplayInternal(this, false);

                    if (this.ViewChanged != null)
                    {
                        this.ViewChanged(this, EventArgs.Empty);
                    }
                }

                this.Controls.Add(this.view);
            }
        }
示例#2
0
        /// <summary>
        /// Clears the view internally.
        /// </summary>
        internal virtual void ClearViewInternal()
        {
            if (this.view != null && this.Controls.Contains(this.view))
            {
                this.Controls.Remove(this.view);
            }

            this.view = null;
        }