Пример #1
0
        internal void OnMdiChildClosing(DockWindowCancelEventArgs e)
        {
            HostWindow host = e.NewWindow as HostWindow;

            if (host == null)
            {
                return;
            }

            Form form = host.MdiChild;

            if (form == null)
            {
                return;
            }

            this.suspendFormClear++;
            //explicitly call Close on the Form, many users have complained about their favourite Closing/Closed events missing
            form.Close();
            if (form.IsDisposed)
            {
                this.ClearForm(form, false);
            }
            else
            {
                e.Cancel = true;
            }
            this.suspendFormClear--;
        }
Пример #2
0
        protected internal override void OnClosing(DockWindowCancelEventArgs e)
        {
            base.OnClosing(e);

            if (this.MdiChild != null)
            {
                this.DockManager.MdiController.OnMdiChildClosing(e);
            }
        }
Пример #3
0
 /// <summary>
 /// Called by the owning RadDock instance when this window is about to close.
 /// Allows specific DockWindow implementations to optionally cancel the operation and/or perform additional actions.
 /// </summary>
 /// <param name="e"></param>
 protected internal virtual void OnClosing(DockWindowCancelEventArgs e)
 {
 }