ME3Explorer.KFreonTPFTools3.Form_Closing C# (CSharp) Method

Form_Closing() private method

private Form_Closing ( object sender, FormClosingEventArgs e ) : void
sender object
e System.Windows.Forms.FormClosingEventArgs
return void
        private void Form_Closing(object sender, FormClosingEventArgs e)
        {
            if (CancelButton.Visible && MessageBox.Show("Background Tasks are running. Are you sure you want to close?", "Reeeally sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.No)
            {
                e.Cancel = true;

                /*Task.Run(() =>
                {
                    while (!OverallStatusLabel.Text.ToLowerInvariant().Contains("failed"))
                        System.Threading.Thread.Sleep(100);

                    DebugOutput.PrintLn("-----Execution of TPF/DDS Tools closing...-----");
                    CurrentInstance = null;
                    SaveProperties();
                    this.Close();
                });*/
            }
            else
            {
                cts.Cancel();
                DebugOutput.PrintLn("-----Execution of TPF/DDS Tools closing...-----");
                CurrentInstance = null;
                SaveProperties();
            }
        }
KFreonTPFTools3