private void BtnClearCache_Click(object sender, EventArgs e) { if (this.InvokeRequired) { DelegateBtnClearCache inv = new DelegateBtnClearCache(this.BtnClearCache_Click); this.Invoke(inv, new object[] { sender, e }); } else { DialogResult result = MessageBox.Show("Are you sure you want to delete all items in configured Shared Cache nodes?", "Your Attention is needed!", MessageBoxButtons.YesNo); switch (result) { case DialogResult.Yes: { CACHE.SharedCache.Clear(); this.FullResetForm(); this.UpdateLblAmount(); this.BindStats(); break; } case DialogResult.Abort: case DialogResult.Cancel: case DialogResult.Ignore: case DialogResult.No: case DialogResult.None: case DialogResult.OK: case DialogResult.Retry: default: break; } } }
private void BtnClearCache_Click(object sender, EventArgs e) { if (this.InvokeRequired) { DelegateBtnClearCache inv = new DelegateBtnClearCache(this.BtnClearCache_Click); this.Invoke(inv, new object[] { sender, e} ); } else { DialogResult result = MessageBox.Show("Are you sure you want to delete all items in configured Shared Cache nodes?", "Your Attention is needed!", MessageBoxButtons.YesNo); switch (result) { case DialogResult.Yes: { CACHE.SharedCache.Clear(); this.FullResetForm(); this.UpdateLblAmount(); this.BindStats(); break; } case DialogResult.Abort: case DialogResult.Cancel: case DialogResult.Ignore: case DialogResult.No: case DialogResult.None: case DialogResult.OK: case DialogResult.Retry: default: break; } } }