BrawlBuilder.BrawlBuilder.BrawlBuilder_FormClosing C# (CSharp) Method

BrawlBuilder_FormClosing() private method

private BrawlBuilder_FormClosing ( object sender, FormClosingEventArgs e ) : void
sender object
e System.Windows.Forms.FormClosingEventArgs
return void
		private void BrawlBuilder_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (buildWorker.IsBusy)
			{
				// Cancel quitting, if user chooses to quit, then the background worker will do it once it cancels.
				e.Cancel = true;

				DialogResult result = MessageBox.Show("A build is in progress, quitting will stop the current build. Are you sure you want to quit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

				if (result == DialogResult.No)
					return;

				_exiting = true;
				_dontTouch = true;
				SetStatus("Quitting...", true);
				buildWorker.CancelAsync();
			}
		}