コード例 #1
0
 private void ShowCurrentDownloadFileName(string name)
 {
     if (this.labelCurrentItem.InvokeRequired)
     {
         ShowCurrentDownloadFileNameCallBack cb = new ShowCurrentDownloadFileNameCallBack(ShowCurrentDownloadFileName);
         this.Invoke(cb, new object[] { name });
     }
     else
     {
         this.labelCurrentItem.Text = name;
     }
 }
コード例 #2
0
 /// <summary>
 /// 显示正在下载的文件
 /// </summary>
 /// <param name="name"></param>
 private void ShowCurrentDownloadFileName(string name, long size)
 {
     if (this.lblFileName.InvokeRequired)
     {
         ShowCurrentDownloadFileNameCallBack cb = new ShowCurrentDownloadFileNameCallBack(ShowCurrentDownloadFileName);
         this.Invoke(cb, new object[] { name, size });
     }
     else
     {
         this.lblFileName.Text = $"文件信息:{name}({size / 1024}KB)";
     }
 }
コード例 #3
0
 private void ShowCurrentDownloadFileName(string name)
 {
     if (labelCurrentItem.InvokeRequired)
     {
         ShowCurrentDownloadFileNameCallBack cb = ShowCurrentDownloadFileName;
         Invoke(cb, name);
     }
     else
     {
         labelCurrentItem.Text = name;
     }
 }
コード例 #4
0
 private void ShowCurrentDownloadFileName(string name)
 {
     if (this.labelCurrentItem.InvokeRequired)
     {
         ShowCurrentDownloadFileNameCallBack cb = new ShowCurrentDownloadFileNameCallBack(ShowCurrentDownloadFileName);
         this.Invoke(cb, new object[] { name });
     }
     else
     {
         this.labelCurrentItem.Text = name;
     }
 }