コード例 #1
0
        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;
        }
コード例 #2
0
 private void CopyLinksTimer_Tick(object sender, EventArgs e)
 {
     CopyLinksTimer.Stop();
     lblLinksCopied.Visible = false;
     lblLinksCopied.Text    = "";
 }