public FileUploadEventArgs(UploadStatus status, FileUploadControl fileUploadControl, string fileName) { this.FileName = fileName; this.Status = status; this.FileUploadControl = fileUploadControl; }
private void addTabPage(string fileName) { FileInfo file = new FileInfo(fileName); if (file.Length >= 2097152) { chatMessageViewerControl1.AddInformation("你上传的文件过大!仅限 2M"); return; } FileUploadControl fileUpload = null; if (!this.tabControlVideo.Controls.Contains(this.tabPage3)) { createTabPage(); } fileUpload = new FileUploadControl(fileName, uploadURL); fileUpload.FileUploadCompleted += new EventHandler<FileUploadEventArgs>(fileUpload_FileUploadCompleted); this.uploadTasks.Add(fileUpload.FtpUpload); this.tabPage3.Controls.Add(fileUpload); fileUpload.Dock = DockStyle.Top; }
static void TestFileUploadControl() { Form f = new Form(); FileUploadControl c = new FileUploadControl("c:\\a.exe", ""); c.Dock = DockStyle.Top; c = new FileUploadControl("c:\\a.exe", Properties.Settings.Default.FtpURL); f.Controls.Add(c); //c = new FileUploadControl("c:\\a.exe", Properties.Settings.Default.FtpURL); //c.Dock = DockStyle.Top; //f.Controls.Add(c); Application.Run(f); }
public FileUploadEventArgs(UploadStatus status, FileUploadControl fileUploadControl,string fileName) { this.FileName = fileName; this.Status = status; this.FileUploadControl = fileUploadControl; }