private void clearDataGrid() { if (!MyDialog.confirm("Do you want to clear all data?")) { return; } datagridView.Rows.Clear(); datagridView.Refresh(); initDatagridView(); }
protected override void OnFormClosing(FormClosingEventArgs e) { if (MyDialog.confirm("Do you want to exit?") == true) { Application.Exit(); } else { return; } }
private void btnGenerate_Click(object sender, EventArgs e) { if (!MyDialog.confirm("Do you want to generate stickers?")) { return; } progressBar.Show(); ThreadUtil.InvokeAsync(this, (f) => { generateStickers(); }); }