private async Task CopyLinks() { btnCopyLinks.Enabled = false; CopyLinksTimer.Stop(); int count = 0; await Task.Run(() => { var logsToCopy = dBLogDataGridView.SelectedRows.Cast <DataGridViewRow>() .Select(row => (int)row.Cells["colID"].Value); count = Logic.CopyLinks(this, logsToCopy.ToArray()); }); lblLinksCopied.Visible = true; lblLinksCopied.Text = $"{count} {Languages.Language.Data.ActionsCopied}"; CopyLinksTimer.Stop(); CopyLinksTimer.Start(); btnCopyLinks.Enabled = true; }
private void CopyLinksTimer_Tick(object sender, EventArgs e) { CopyLinksTimer.Stop(); lblLinksCopied.Visible = false; lblLinksCopied.Text = ""; }