A summary description of Namespace Upload {///
Public Form1 () {// // Windows Form Designer Support for // InitializeComponent ();
// // Todo: Add any constructor code after INITIALIZEComponent call //}
///
#REGION Windows Form Designer The code ///
/// summary> private () {this.label1 = new system.windows.forms.Label (); this.label2 = new system.windows.forms.label (); this.txturi = new system. Windows.Forms.TextBox (); this.btnSelect = new System.Windows.Forms.Button (); this.btnUpLoad = new System.Windows.Forms.Button (); this.stBar = new System.Windows.Forms.StatusBar (); This.lstfiles = new system.Windows.Forms = new system.Windows.Forms = new system.windows.Forms = new system.windows.Formte = new system.windows.Forms.Button (); this. Suspendlayout (); // // label1 // this.label1.Location = new system.drawing.point (24, 15); this.label1.name = "label1"; this.label1.size = new system.drawing. Size (48, 23); this.label1.tabindex = 0; this.label1.text = "Upload to:"; /// Label2 // this.label2.location = new system.drawing.point (8, 56 ); This.label2.name = "label2"; this.label2.size = new system.drawing.size (64, 23); this.label2.tabindex = 1; this.Label2.text = "Upload file:"; // // txturi // this.txturi.location = new system.drawing.point (80, 16); this.txturi.name = "txturi"; this.txturi.size = new system. Drawing.size (256, 21); this.txturi.tabindex = 2; this.txturi.text = ""; /// btnselect // this.btnselect.point = new system.drawing.point (336, 56) This.btnselect.name = "btnselect"; this.btnselect.tabindex = 4; this.btnselect.text = "Select ..."; this.btnselect.click = new system.eventhandler (this.btnselect_click); / / // btnupload // this.btnupload.location =
New system.drawing.point (336, 120); this.btnupload.name = "btNupload"; this.btnupload.tabindex = 5; this.btnupload.text = "To upload"; this.btnupload.click = new system . EventHandler (this.btnupload_click); // // stbar // this.stbar.location = new system.drawing.point (0, 176); this.stbar.name = "stbar"; this.stbar.showPanels = true ; this.stBar.Size = new System.Drawing.Size (424, 22); this.stBar.TabIndex = 6; // // openFile // this.openFile.Multiselect = true; this.openFile.Title = "select Upload file "; // // Lstfiles // this.lstfiles.ItemHeight = 12; this.lstfiles.location = new system.drawing.point (80, 56); this.lstfiles.name =" lstfiles "; this. Lstfiles.size = new system.drawing.size (256, 88); this.lstfiles.tabindex = 7; // // btndelete // this.btndelete.location = new system.drawing.point (336, 88); this .btndelete.name = "btndelete"; this.btndelete.tabindex = 8; this.btndelete.text = "Remove from list"; this.btndelete.click = new system.e VENTHANDLER (this.btndelete_click); // // form1 // this.autoscalebasesize = new system.drawing.size (6, 14); this.clientsize = new system.drawing.size (424, 198); this.Controls. Ad (this.btndelete); this.controls.add (this.lstfiles); this.controls.add (this.stbar); this.controls.add (this.btnupload); this.controls.add (this.btnselect) Im.controls.add (this.txturi); this.controls.add (this.label2); this.controls.add (this.Label1); this.Name = "form1"; this.text = "form1"; this.ResumeLayout (false);} #ENDREGION
/// Private void btndelete_click (object sender, system.eventargs e) {if (lstfiles.selectedIndIndex == - 1) {return;} lstfiles.items.removeat (Lstfiles.SelectedIndex);} private void btnUpLoad_Click (object sender, System.EventArgs e) {Thread th = new Thread (new ThreadStart (StartUpLoad)); th.Start ();} private void StartUpLoad () {string url = txtURI.Text; string path = string .Empty; int i = 0; btNupload.enabled = false; try {stbar.text = "Start upload file ..."; for (int J = 0; j