1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| If Me.DLlisteCheckedListBox.CheckedItems.Count <> 0 Then
Dim x As Integer
For x = 0 To Me.DLlisteCheckedListBox.CheckedItems.Count - 1
If My.Computer.FileSystem.FileExists(T_Path.Text & "\" & version) = False Then
If T_Path.Text = "" Then
MsgBox("Veuillez remplir tous les champs")
Else
Dl.Donwload_File_3("URL", "destination", False) 'lance la 3eme methode
Me.DLButton.Enabled = False
Me.cancelButton1.Enabled = True
End If
Else
If T_Path.Text = "" Then
MsgBox("Veuillez remplir tous les champs")
Else
If MessageBox.Show("Le fichier existe déjà. Voulez-vous le remplacer?", "erreur", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
My.Computer.FileSystem.DeleteFile(T_Path.Text & "\" & version, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently, FileIO.UICancelOption.DoNothing)
Dl.Donwload_File_3"URL", "destination", False) 'lance la 3eme methode
Me.DLButton.Enabled = False
Me.cancelButton1.Enabled = True
Else
Exit Sub
End If
End If
End If
Next x
Else
MessageBox.Show("Veuillez cocher 1 case...", "erreur", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If |
Partager