44 lines
1.3 KiB
VB.net
44 lines
1.3 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Imports System.Net
|
|
|
|
Public Class upséries2
|
|
Public nom As String = ""
|
|
Public urllike As String = ""
|
|
Public url As String = ""
|
|
Private Sub upséries2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
Me.BackColor = Form1.BackColor
|
|
Me.ForeColor = Form1.ForeColor
|
|
Button1.BackColor = BackColor
|
|
Text = nom
|
|
Label3.Text = nom
|
|
ListBox1.Hide()
|
|
ListBox1.Items.Clear()
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(urllike & "/saison/")
|
|
fwr.Credentials = New NetworkCredential("yoannsafe", 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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
sr.Close()
|
|
|
|
Label4.Text = ListBox1.Items.Count
|
|
End Sub
|
|
|
|
Private Sub upséries2_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
PictureBox1.Image.Dispose()
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
nouvelle_saison.ShowDialog()
|
|
End Sub
|
|
End Class |