Exemplo n.º 1
0
        public FileUploadEventArgs(UploadStatus status, FileUploadControl fileUploadControl, string fileName)

        {
            this.FileName          = fileName;
            this.Status            = status;
            this.FileUploadControl = fileUploadControl;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public FileUploadEventArgs(UploadStatus status, FileUploadControl fileUploadControl,string fileName)
 {
     this.FileName = fileName;
     this.Status = status;
     this.FileUploadControl = fileUploadControl;
 }