Пример #1
0
 /// <summary>
 /// 删除文件传输控件,清除相关控件资源
 /// </summary>
 /// <param name="p2pFile"></param>
 private void delTabItem(p2pFile p2pFile)
 {
     try
     {
         foreach (TabPage tabItem in filelistfrom.tabControl1.TabPages)
         {
             if ((tabItem.Tag as p2pFile).FileMD5Value == p2pFile.FileMD5Value)
             {
                 p2pFile.Dispose();
                 this.filelistfrom.tabControl1.TabPages.Remove(tabItem);
                 tabItem.Dispose();
             }
         }
     }
     catch { }
 }