Ejemplo n.º 1
0
        /// <include file='doc\DocumentManager.uex' path='docs/doc[@for="DocumentManager.OnDesignerCreated"]/*' />
        /// <devdoc>
        ///     The designer should call this after it successfully loads.
        /// </devdoc>
        public void OnDesignerCreated(DesignerEventArgs e)
        {
            designers.Add(e.Designer);
            documents = null;
            DesignerEventHandler handler = (DesignerEventHandler)eventTable[DOCUMENT_CREATED_EVENT];

            if (handler != null)
            {
                handler.Invoke(this, e);
            }
        }
Ejemplo n.º 2
0
        /// <include file='doc\DocumentManager.uex' path='docs/doc[@for="DocumentManager.OnDesignerDisposed"]/*' />
        /// <devdoc>
        ///     The designer should call this before it disposes itself.
        /// </devdoc>
        public void OnDesignerDisposed(DesignerEventArgs e)
        {
            DesignerEventHandler handler = (DesignerEventHandler)eventTable[DOCUMENT_DISPOSED_EVENT];

            if (handler != null)
            {
                handler.Invoke(this, e);
            }
            if (designers.Contains(e.Designer))
            {
                designers.Remove(e.Designer);
            }
            if (activeDesigner == e.Designer)
            {
                activeDesigner = null;
            }
            documents = null;
        }