first commit
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
|
||||
Public Class Form18
|
||||
Private Sub Form18_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
Try
|
||||
ComboBox1.Items.Clear()
|
||||
Dim fwr As FtpWebRequest
|
||||
fwr = FtpWebRequest.Create(ipserver & "utilisateur/" & Form2.TextBox8.Text & "/code de récupération/")
|
||||
fwr.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
||||
fwr.Method = WebRequestMethods.Ftp.ListDirectory
|
||||
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
|
||||
|
||||
Dim str As String = sr.ReadLine()
|
||||
While Not str Is Nothing
|
||||
|
||||
|
||||
ComboBox1.Items.Add(str)
|
||||
|
||||
str = sr.ReadLine()
|
||||
|
||||
End While
|
||||
sr.Close()
|
||||
If ComboBox1.Items.Count = "0" Then
|
||||
MsgBox("vous n'avez plus de code de récupération", MsgBoxStyle.Critical)
|
||||
Close()
|
||||
Else
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
Timer1.Stop()
|
||||
Try
|
||||
ComboBox1.Items.Clear()
|
||||
Dim fwr As FtpWebRequest
|
||||
fwr = FtpWebRequest.Create(ipserver & "utilisateur/" & Form2.TextBox8.Text & "/code de récupération/")
|
||||
fwr.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
||||
fwr.Method = WebRequestMethods.Ftp.ListDirectory
|
||||
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
|
||||
|
||||
Dim str As String = sr.ReadLine()
|
||||
While Not str Is Nothing
|
||||
|
||||
|
||||
ComboBox1.Items.Add(str)
|
||||
|
||||
str = sr.ReadLine()
|
||||
|
||||
End While
|
||||
sr.Close()
|
||||
If ComboBox1.Items.Count = "0" Then
|
||||
MsgBox("vous n'avez plus de code de récupération", MsgBoxStyle.Critical)
|
||||
Else
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedValueChanged
|
||||
Form19.ShowDialog()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user