Exemple #1
0
 public SocketModule(Information i)
 {
     l_S       = new List <SockInfo>();
     PointInfo = new Information();
     m         = new ModuleFalt(i.Complete, i.RW, i.sPos_n, i.sPos_n_l);
     Array.Copy(m.Complete, PointInfo.Complete, PointInfo.Complete.Length);
     Array.Copy(m.RW, PointInfo.RW, PointInfo.RW.Length);
     Array.Copy(m.sPos_n, PointInfo.sPos_n, PointInfo.sPos_n.Length);
     Array.Copy(m.sPos_n_l, PointInfo.sPos_n_l, PointInfo.sPos_n_l.Length);
     PointInfo.type              = i.type;
     filename                    = PointInfo.name = i.name;
     name                        = filename.Substring(filename.LastIndexOf(@"\") + 1);
     PointInfo.filename          = i.filename;
     PointInfo.Di_file_num       = i.Di_file_num;
     PointInfo.total_file_number = i.total_file_number;
     DownLoadSize                = PointInfo.DownLoadSize = i.DownLoadSize;
     t_size                      = PointInfo.t_Size = i.t_Size;
     if (i.type == 1)
     {
         type = i.filename.Substring(i.filename.LastIndexOf("."));
     }
     else
     {
         type = "文件夹";
     }
 }
Exemple #2
0
 public SocketModule(List <SockInfo> l, int t)
 {
     m                     = new ModuleFalt();
     l_S                   = new List <SockInfo>();
     PointInfo             = new Information();
     l_S                   = l;
     PointInfo.type        = t;
     PointInfo.Di_file_num = 0;
     t_size                = PointInfo.t_Size = l[0].i.size;
     if (t == 1)
     {
         type               = l[0].file.Name.Substring(l[0].file.Name.LastIndexOf("."));
         filename           = PointInfo.name = l[0].file.Name;
         PointInfo.filename = l[0].file.Name;
     }
     else
     {
         type     = "文件夹";
         filename = PointInfo.name = l[0].di.FullName;
         PointInfo.total_file_number = l_S[0].i.number;
     }
     name = filename.Substring(filename.LastIndexOf(@"\") + 1);
 }