protected override void OnClosing(CancelEventArgs e) { m_chessFacade.BoardChanged -= HandleBoardChangedEvent; m_chessFacade.WhitePawnPromoted -= HandleWhitePawnPromotedEvent; m_chessFacade.BlackPawnPromoted -= HandleBlackPawnPromotedEvent; m_chessFacade.StatusInfo -= HandleStateChangedEvent; m_chessFacade.WhiteClockNotifier -= HandleWhiteTimeEvent; m_chessFacade.BlackClockNotifier -= HandleBlackTimeEvent; OutputWriter.WriteOutput -= HandleWriteOutput; m_chessFacade.Quit(); base.OnClosing(e); }