Example #1
0
        ////////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////////
        private void Manager_WindowClosing(object sender, WindowClosingEventArgs e)
        {
            e.Cancel = !exit && exitConfirmation;

            if (!exit && exitConfirmation && exitDialog == null)
            {
                exitDialog = new ExitDialog(Manager);
                exitDialog.Init();
                exitDialog.Closed += new WindowClosedEventHandler(closeDialog_Closed);
                exitDialog.ShowModal();
                Manager.Add(exitDialog);
            }
            else if (!exitConfirmation)
            {
                Exit();
            }
        }
		////////////////////////////////////////////////////////////////////////////	  

		////////////////////////////////////////////////////////////////////////////
		private void Manager_WindowClosing(object sender, WindowClosingEventArgs e)
		{
			e.Cancel = !exit && exitConfirmation;

			if (!exit && exitConfirmation && exitDialog == null)
			{
				exitDialog = new ExitDialog(Manager);
				exitDialog.Init();
				exitDialog.Closed += new WindowClosedEventHandler(closeDialog_Closed);
				exitDialog.ShowModal();
				Manager.Add(exitDialog);
			}
			else if (!exitConfirmation)
			{
				Exit();
			}
		}