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--; }
internal void OnFormRemoved(HostWindow sender, Form form) { if (!this.mdiChildren.Contains(form)) { return; } this.ClearForm(form, false); sender.Close(); }