Пример #1
0
        private void ConversionProgress_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (ForceClose)
            {
                return;
            }

            if (AllowUpdate)
            {
                e.Cancel = true;

                var result = UserNotifier.ShowQuestion("Do you want to stop conversion?");

                if (result == DialogResult.Yes)
                {
                    AllowUpdate = false;
                    BeginInvoke(new InvokeDelegate(Close));
                }
            }
        }