bool networkStatus = NetworkInterface.GetIsNetworkAvailable(); private bool m_Cancel = false; public bool Cancelled { get; set; } private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e) { if (networkStatus == true) { outsetUpdates(); } else { this.Visible = false; LauncherForm lForm = new LauncherForm(); lForm.Show(); return; } if(this.Cancel) { MessageBox.Show("Update cancelled."); this.Visible = false; e.Cancel = true; LauncherForm mainForm = new LauncherForm(); mainForm.Show(); return; } } private void BeginningUpdaterCheck_Load(object sender, EventArgs e) { backgroundWorker1.RunWorkerAsync(); } private void skipToFormButton_Click(object sender, EventArgs e) { this.Cancelled = true; this.Hide(); LauncherForm mainForm = new LauncherForm(); this.m_Cancel = true; mainForm.Show(); return; }
this.Cancelled = true; ... this.m_Cancel = true;
if(this.Cancel)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)