接昨天的文章Winform(C#.NET)自动更新组件的使用及部分功能实现

强制更新的实现部分:

将DownloadConfirm窗体修改成单纯的类

 1 public class DownloadConfirm
 2     {
 3         #region The private fields
 4         List<DownloadFileInfo> downloadFileList = null;
 5         #endregion
 6 
 7         #region The constructor of DownloadConfirm
 8         public DownloadConfirm(List<DownloadFileInfo> downloadfileList)
 9         {
10             downloadFileList = downloadfileList;
11         }
12         #endregion
13 
14         #region The private method
15         private void OnLoad(object sender, EventArgs e)
16         {
17             foreach (DownloadFileInfo file in this.downloadFileList)
18             {
19                 ListViewItem item = new ListViewItem(new string[] { file.FileName, file.LastVer, file.Size.ToString(), file.Version });
20             }
21         }
22         #endregion
23     }
View Code

相关文章:

  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-02-13
  • 2021-12-03
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2021-11-26
  • 2021-10-03
  • 2021-10-27
  • 2022-12-23
  • 2021-12-03
  • 2021-05-26
相关资源
相似解决方案