예제 #1
0
        private void frmUpdate_FormClosing(object sender, FormClosingEventArgs e)
        {
            if ((Program.Status == UpdateStatus.Incomplete) &&
                (MessageBox.Show(this, "The update has not completed!\nAre you sure you want to cancel the update?", "Cancel?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No))
            {
                e.Cancel = true;
                return;
            }

            _update.End();
            _closeTimer.Stop();
            _service.CancelAsync(this);
        }