public frmUploads(string n, tcp.Client c, string d) { fname = n; dis = d; client = c; InitializeComponent(); H1.Text = fitted_title(Utils.Helpers.getFileTitle(n)); f = new FileInfo(fname); // client.send_files.Add(new(n,)) if (f.Length < tcp.Server.fileManager.chunk_size) { client.Send(new DownExec(fname, File.ReadAllBytes(fname), 0, 0, (int)f.Length, false, dis )); return; } tcp.Server.fileManager.start(fname); client.Send(new DownExec(tcp.Server.fileManager.clean_path(fname), tcp.Server.fileManager.tobe_sent, tcp.Server.fileManager.get_chunk_num(fname), tcp.Server.fileManager.calc_num_chunks((int)f.Length), (int)f.Length, false, dis )); }
public frmRename(tcp.Client c, string n) { client = c; fname = n; InitializeComponent(); T.Text = Utils.Helpers.getFileTitle(n); }
public frmDownload(string n, tcp.Client c) { fname = n; client = c; InitializeComponent(); string fo = n.Split('.')[n.Split('.').Length - 1]; pictureBox1.Image = imageList1.Images[Utils.Helpers.getDirImage(fo)]; imageList1.ImageSize = new Size(64, 64); H1.Text = fitted_title(Utils.Helpers.getFileTitle(n)); lbl_dwn_vn.Text = c.data.UserAtPc; sw.Start(); }