806 lines
32 KiB
VB.net
806 lines
32 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Imports System.Net
|
|
|
|
Public Class Form32
|
|
Public urldl As String = ""
|
|
Public nommisenligne As String = ""
|
|
Public sitewebfichier As String = ""
|
|
Public upurl As String = ""
|
|
Public prix As Integer = 0
|
|
Dim dl As Integer = 0
|
|
Dim errodl As Integer = 0
|
|
Dim listb2ab As Integer = 0
|
|
Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
|
|
Form34.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
|
|
If WindowState = 1 Then
|
|
Form28.Visible = False
|
|
Else
|
|
Form28.Visible = True
|
|
End If
|
|
|
|
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(urldl & "/like.txt")
|
|
Label2.Text = vri1
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(urldl & "/telechargement.txt")
|
|
Label4.Text = "Nombre de téléchargement: " & vri2
|
|
End Sub
|
|
|
|
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
|
|
Process.Start(sitewebfichier)
|
|
End Sub
|
|
|
|
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
|
|
Dim likeup As Integer = Label2.Text + 1
|
|
Dim sw1 As New StreamWriter(dostemps & "like.txt")
|
|
sw1.WriteLine(likeup)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "like.txt", upurl & "/like.txt")
|
|
File.Delete(dostemps & "like.txt")
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/XP.txt")
|
|
Dim xp As Integer = vri1 + 30
|
|
Dim sw2 As New StreamWriter(dostemps & "XP.txt")
|
|
sw2.WriteLine(xp)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "XP.txt", ipserver & "utilisateur/" & nomutilisateur & "/XP.txt")
|
|
File.Delete(dostemps & "XP.txt")
|
|
PictureBox5.Hide()
|
|
PictureBox6.Show()
|
|
creatdoslike()
|
|
End Sub
|
|
|
|
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
|
|
Dim likeup As Integer = Label2.Text - 1
|
|
Dim sw1 As New StreamWriter(dostemps & "like.txt")
|
|
sw1.WriteLine(likeup)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "like.txt", upurl & "/like.txt")
|
|
File.Delete(dostemps & "like.txt")
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/XP.txt")
|
|
Dim xp As Integer = vri1 - 30
|
|
Dim sw2 As New StreamWriter(dostemps & "XP.txt")
|
|
sw2.WriteLine(xp)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "XP.txt", ipserver & "utilisateur/" & nomutilisateur & "/XP.txt")
|
|
File.Delete(dostemps & "XP.txt")
|
|
PictureBox5.Show()
|
|
PictureBox6.Hide()
|
|
deldoslike()
|
|
End Sub
|
|
Sub creatdoslike()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(upurl & "/like/" & nomutilisateur & "/"), System.Net.FtpWebRequest)
|
|
Dim ftpStream As Stream = Nothing
|
|
|
|
MaRequete.Credentials = New System.Net.NetworkCredential("extremedownloaders", passftp)
|
|
MaRequete.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory
|
|
|
|
Dim response As FtpWebResponse = CType(MaRequete.GetResponse, FtpWebResponse)
|
|
ftpStream = response.GetResponseStream
|
|
ftpStream.Close()
|
|
response.Close()
|
|
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End Sub
|
|
Sub deldoslike()
|
|
Try
|
|
Dim ftreq As FtpWebRequest = FtpWebRequest.Create(upurl & "/like/" & nomutilisateur & "/")
|
|
ftreq.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp As FtpWebResponse = ftreq.GetResponse
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
|
|
If Label1.Text.Contains("acheter") = True Then
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/money.txt")
|
|
If vri2 >= prix Then
|
|
Dim msg = MsgBox("voulez vous vraiment acheter " & Me.Text & " ?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Dim maj3 As New WebClient
|
|
My.Computer.Network.DownloadFile(ipsite & "extrème downloaders/utilisateur/" & nommisenligne & "/money.txt", dostemps & "money.txt")
|
|
Dim lines1() As String = File.ReadAllLines(dostemps & "money.txt")
|
|
Dim moneyutilip As Integer = lines1(0) + prix
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim sw1 As New StreamWriter(dostemps & "money.txt")
|
|
sw1.WriteLine(moneyutilip)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nommisenligne & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim moneyutilid As Integer = vri2 - prix
|
|
Dim sw2 As New StreamWriter(dostemps & "money.txt")
|
|
sw2.WriteLine(moneyutilid)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nomutilisateur & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
creatdosachat()
|
|
Else
|
|
MsgBox("achat annuler", MsgBoxStyle.Information)
|
|
End If
|
|
Else
|
|
MsgBox("vous n'avez pas assez de PB's pour acheter: " & Me.Text & "." & vbNewLine & vbNewLine & "Vos PB's: " & vri2 & vbNewLine & "Le prix: " & prix & "PB", MsgBoxStyle.Exclamation)
|
|
End If
|
|
Else
|
|
Label6.Show()
|
|
ComboBox1.Show()
|
|
Button2.Enabled = False
|
|
If dldos = "" Then
|
|
If FolderBrowserDialog1.ShowDialog = 1 Then
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Else
|
|
|
|
End If
|
|
Else
|
|
FolderBrowserDialog1.SelectedPath = dldos
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End If
|
|
End If
|
|
End Sub
|
|
Dim WithEvents téléchargerfr As WebClient
|
|
Sub creatdosachat()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(upurl & "/achat/" & nomutilisateur & "/"), System.Net.FtpWebRequest)
|
|
Dim ftpStream As Stream = Nothing
|
|
|
|
MaRequete.Credentials = New System.Net.NetworkCredential("extremedownloaders", passftp)
|
|
MaRequete.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory
|
|
|
|
Dim response As FtpWebResponse = CType(MaRequete.GetResponse, FtpWebResponse)
|
|
ftpStream = response.GetResponseStream
|
|
ftpStream.Close()
|
|
response.Close()
|
|
|
|
Label1.Text = "Télécharcher: " & Text
|
|
Button2.Enabled = True
|
|
MsgBox("achat terminer", MsgBoxStyle.Information)
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub téléchargerfr_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles téléchargerfr.DownloadProgressChanged
|
|
Label5.Show()
|
|
Label5.Text = String.Format("Téléchargement: " & e.ProgressPercentage & "% " & "{0} MB / {1} MB", (e.BytesReceived / 1024D / 1024D).ToString("0.00"), (e.TotalBytesToReceive / 1024D / 1024D).ToString("0.00"))
|
|
dl = 1
|
|
ProgressBar1.Value = e.ProgressPercentage
|
|
End Sub
|
|
|
|
Private Sub téléchargerfr_DownloadFileCompleted(sender As Object, e As AsyncCompletedEventArgs) Handles téléchargerfr.DownloadFileCompleted
|
|
Label5.Text = "Déconprétion"
|
|
ProgressBar1.Value = 0
|
|
ProgressBar1.Style = ProgressBarStyle.Marquee
|
|
BackgroundWorker1.RunWorkerAsync()
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
|
Try
|
|
IO.Compression.ZipFile.ExtractToDirectory(dostemps & Text & ".zip", FolderBrowserDialog1.SelectedPath & "\")
|
|
Catch ex As Exception
|
|
errodl = 1
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
|
|
Label6.Hide()
|
|
ComboBox1.Hide()
|
|
Label5.Hide()
|
|
Button2.Enabled = True
|
|
If errodl = 0 Then
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(urldl & "/telechargement.txt")
|
|
Dim updl As Integer = vri1 + 1
|
|
Dim sw1 As New StreamWriter(dostemps & "telechargement.txt")
|
|
sw1.WriteLine(updl)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "telechargement.txt", upurl & "/telechargement.txt")
|
|
File.Delete(dostemps & "telechargement.txt")
|
|
File.Delete(dostemps & Text & ".zip")
|
|
ProgressBar1.Value = 0
|
|
ProgressBar1.Style = ProgressBarStyle.Continuous
|
|
ProgressBar1.Hide()
|
|
Panel1.Show()
|
|
dl = 0
|
|
Form1.NotifyIcon1.BalloonTipTitle = "Terminer"
|
|
Form1.NotifyIcon1.BalloonTipText = "Le téléchargement de: " & Text & " est terminer"
|
|
Form1.NotifyIcon1.ShowBalloonTip(1)
|
|
If ComboBox1.SelectedItem = "Ne rien faire" Then
|
|
MsgBox("téléchargement terminer", MsgBoxStyle.Information)
|
|
ElseIf ComboBox1.SelectedItem = "Ouvrir le dossier de destination" Then
|
|
Process.Start(FolderBrowserDialog1.SelectedPath)
|
|
ElseIf ComboBox1.SelectedItem = "verrouiller la session" Then
|
|
Form37.va = 3
|
|
Form37.ShowDialog()
|
|
ElseIf ComboBox1.SelectedItem = "Fermer extrème downloaders" Then
|
|
Form37.va = 4
|
|
Form37.ShowDialog()
|
|
ElseIf ComboBox1.SelectedItem = "Arrêter l'ordinateur" Then
|
|
Form37.va = 5
|
|
Form37.ShowDialog()
|
|
End If
|
|
Else
|
|
File.Delete(dostemps & "telechargement.txt")
|
|
File.Delete(dostemps & Text & ".zip")
|
|
ProgressBar1.Value = 0
|
|
ProgressBar1.Style = ProgressBarStyle.Continuous
|
|
ProgressBar1.Hide()
|
|
Panel1.Show()
|
|
dl = 0
|
|
errodl = 0
|
|
MsgBox("une erreur est survenue", MsgBoxStyle.Critical)
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Form32_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
If dl = 1 Then
|
|
e.Cancel = True
|
|
MsgBox("merci d'attendre la fin de téléchargement de " & Text, MsgBoxStyle.Critical)
|
|
Else
|
|
Timer1.Stop()
|
|
PictureBox2.Image.Dispose()
|
|
File.Delete(dostemps & "logo.png")
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
Form33.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
Form35.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
|
|
Form36.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub Form32_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
ListBox1.Hide()
|
|
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/admin.txt")
|
|
|
|
If vri1 = 1 Then
|
|
PictureBox7.Show()
|
|
Else
|
|
If nommisenligne = nomutilisateur Then
|
|
PictureBox7.Show()
|
|
Else
|
|
PictureBox7.Hide()
|
|
End If
|
|
End If
|
|
|
|
Timer1.Start()
|
|
Dim lines1() As String = File.ReadAllLines(setting3)
|
|
If lines1(0) = 1 Then
|
|
ComboBox1.SelectedItem = "Ne rien faire"
|
|
ElseIf lines1(0) = 2 Then
|
|
ComboBox1.SelectedItem = "Ouvrir le dossier de destination"
|
|
ElseIf lines1(0) = 3 Then
|
|
ComboBox1.SelectedItem = "verrouiller la session"
|
|
ElseIf lines1(0) = 4 Then
|
|
ComboBox1.SelectedItem = "Fermer extrème downloaders"
|
|
ElseIf lines1(0) = 5 Then
|
|
ComboBox1.SelectedItem = "Arrêter l'ordinateur"
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
|
|
If Label1.Text.Contains("acheter") = True Then
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/money.txt")
|
|
If vri2 >= prix Then
|
|
Dim msg = MsgBox("voulez vous vraiment acheter " & Me.Text & " ?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Dim maj3 As New WebClient
|
|
My.Computer.Network.DownloadFile(ipsite & "extrème downloaders/utilisateur/" & nommisenligne & "/money.txt", dostemps & "money.txt")
|
|
Dim lines1() As String = File.ReadAllLines(dostemps & "money.txt")
|
|
Dim moneyutilip As Integer = lines1(0) + prix
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim sw1 As New StreamWriter(dostemps & "money.txt")
|
|
sw1.WriteLine(moneyutilip)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nommisenligne & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim moneyutilid As Integer = vri2 - prix
|
|
Dim sw2 As New StreamWriter(dostemps & "money.txt")
|
|
sw2.WriteLine(moneyutilid)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nomutilisateur & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
creatdosachat()
|
|
Else
|
|
MsgBox("achat annuler", MsgBoxStyle.Information)
|
|
End If
|
|
Else
|
|
MsgBox("vous n'avez pas assez de PB's pour acheter: " & Me.Text & "." & vbNewLine & vbNewLine & "Vos PB's: " & vri2 & vbNewLine & "Le prix: " & prix & "PB", MsgBoxStyle.Exclamation)
|
|
End If
|
|
Else
|
|
Label6.Show()
|
|
ComboBox1.Show()
|
|
Button2.Enabled = False
|
|
If dldos = "" Then
|
|
If FolderBrowserDialog1.ShowDialog = 1 Then
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Else
|
|
|
|
End If
|
|
Else
|
|
FolderBrowserDialog1.SelectedPath = dldos
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Panel1_Paint(sender As Object, e As PaintEventArgs) Handles Panel1.Paint
|
|
|
|
End Sub
|
|
|
|
Private Sub Panel1_Click(sender As Object, e As EventArgs) Handles Panel1.Click
|
|
If Label1.Text.Contains("acheter") = True Then
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/money.txt")
|
|
If vri2 >= prix Then
|
|
Dim msg = MsgBox("voulez vous vraiment acheter " & Me.Text & " ?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Dim maj3 As New WebClient
|
|
My.Computer.Network.DownloadFile(ipsite & "extrème downloaders/utilisateur/" & nommisenligne & "/money.txt", dostemps & "money.txt")
|
|
Dim lines1() As String = File.ReadAllLines(dostemps & "money.txt")
|
|
Dim moneyutilip As Integer = lines1(0) + prix
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim sw1 As New StreamWriter(dostemps & "money.txt")
|
|
sw1.WriteLine(moneyutilip)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nommisenligne & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
Dim moneyutilid As Integer = vri2 - prix
|
|
Dim sw2 As New StreamWriter(dostemps & "money.txt")
|
|
sw2.WriteLine(moneyutilid)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "money.txt", ipserver & "/utilisateur/" & nomutilisateur & "/money.txt")
|
|
File.Delete(dostemps & "money.txt")
|
|
creatdosachat()
|
|
Else
|
|
MsgBox("achat annuler", MsgBoxStyle.Information)
|
|
End If
|
|
Else
|
|
MsgBox("vous n'avez pas assez de PB's pour acheter: " & Me.Text & "." & vbNewLine & vbNewLine & "Vos PB's: " & vri2 & vbNewLine & "Le prix: " & prix & "PB", MsgBoxStyle.Exclamation)
|
|
End If
|
|
Else
|
|
Label6.Show()
|
|
ComboBox1.Show()
|
|
Button2.Enabled = False
|
|
If dldos = "" Then
|
|
If FolderBrowserDialog1.ShowDialog = 1 Then
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
Else
|
|
|
|
End If
|
|
Else
|
|
FolderBrowserDialog1.SelectedPath = dldos
|
|
Panel1.Hide()
|
|
ProgressBar1.Show()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.DownloadFileTaskAsync(New Uri(urldl & "/" & Text & ".zip"), (dostemps & Text & ".zip"))
|
|
Catch ex As Exception
|
|
|
|
End Try
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Panel1_MouseEnter(sender As Object, e As EventArgs) Handles Panel1.MouseEnter
|
|
Panel1.BackColor = Color.FromArgb(64, 64, 64)
|
|
End Sub
|
|
|
|
Private Sub Panel1_MouseLeave(sender As Object, e As EventArgs) Handles Panel1.MouseLeave
|
|
Panel1.BackColor = Color.FromArgb(32, 32, 32)
|
|
End Sub
|
|
|
|
Private Sub PictureBox1_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox1.MouseEnter
|
|
Panel1.BackColor = Color.FromArgb(64, 64, 64)
|
|
End Sub
|
|
|
|
Private Sub PictureBox1_MouseLeave(sender As Object, e As EventArgs) Handles PictureBox1.MouseLeave
|
|
Panel1.BackColor = Color.FromArgb(32, 32, 32)
|
|
End Sub
|
|
|
|
Private Sub Label1_MouseEnter(sender As Object, e As EventArgs) Handles Label1.MouseEnter
|
|
Panel1.BackColor = Color.FromArgb(64, 64, 64)
|
|
End Sub
|
|
|
|
Private Sub Label1_MouseLeave(sender As Object, e As EventArgs) Handles Label1.MouseLeave
|
|
Panel1.BackColor = Color.FromArgb(32, 32, 32)
|
|
End Sub
|
|
|
|
Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox7.Click
|
|
If nommisenligne = nomutilisateur Then
|
|
Dim msg = MsgBox("voulez vous vraiment supprimer: " & Text & "?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
delfile()
|
|
Else
|
|
MsgBox("action annuler", MsgBoxStyle.Information)
|
|
End If
|
|
Else
|
|
Dim msg = MsgBox("voulez vous vraiment supprimer: " & Text & "?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Dim msg2 = MsgBox("voulez vous envoyer un mail de supprétion ?", MsgBoxStyle.YesNo)
|
|
If msg2 = MsgBoxResult.Yes Then
|
|
Form41.ShowDialog()
|
|
delfile()
|
|
Else
|
|
delfile()
|
|
End If
|
|
Else
|
|
MsgBox("action annuler", MsgBoxStyle.Information)
|
|
End If
|
|
End If
|
|
End Sub
|
|
Sub delfile()
|
|
ListBox1.Items.Clear()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/like/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
If ListBox1.Items.Count = 0 Then
|
|
del2()
|
|
Else
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/like/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del2()
|
|
End If
|
|
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
Sub del2()
|
|
Timer1.Stop()
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/like/")
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
del3()
|
|
End Sub
|
|
Sub del3()
|
|
ListBox1.Items.Clear()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/achat/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
If ListBox1.Items.Count = 0 Then
|
|
del4()
|
|
Else
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/achat/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del4()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
Sub del4()
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/achat/")
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
del5()
|
|
End Sub
|
|
Sub del5()
|
|
ListBox1.Items.Clear()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del6()
|
|
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
Sub del6()
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl)
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nommisenligne & "/up.txt")
|
|
Dim upnombre = vri1 - 1
|
|
Dim sw1 As New StreamWriter(dostemps & "up.txt")
|
|
sw1.WriteLine(upnombre)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "up.txt", ipserver & "/utilisateur/" & nommisenligne & "/up.txt")
|
|
File.Delete(dostemps & "up.txt")
|
|
Form28.ComboBox2.SelectedItem = "Tout les jeux"
|
|
Form28.ComboBox3.SelectedItem = "Windows"
|
|
Form28.ComboBox4.SelectedItem = "1.19.2"
|
|
Form28.ComboBox5.SelectedItem = "1.19.2"
|
|
Form28.ComboBox6.SelectedItem = "1.19.2"
|
|
Form28.ComboBox7.SelectedItem = "1.19.2"
|
|
Form28.ComboBox1.SelectedItem = "1.19.2"
|
|
Form28.ComboBox8.SelectedItem = "1.19.2"
|
|
Form28.ftp()
|
|
MsgBox("Le fichier: " & Text & " a bien êtê supprimer", MsgBoxStyle.Information)
|
|
listb2ab = 0
|
|
ListBox1.Items.Clear()
|
|
Close()
|
|
End Sub
|
|
|
|
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
|
|
Timer2.Stop()
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/like/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
If ListBox1.Items.Count = 0 Then
|
|
del2()
|
|
Else
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/like/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del2()
|
|
End If
|
|
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
|
|
Timer3.Stop()
|
|
listb2ab = 0
|
|
ListBox1.Items.Clear()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/achat/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
If ListBox1.Items.Count = 0 Then
|
|
del4()
|
|
Else
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/achat/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.RemoveDirectory
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del4()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
|
|
Timer4.Stop()
|
|
listb2ab = 0
|
|
ListBox1.Items.Clear()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(upurl & "/")
|
|
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
|
|
|
|
ListBox1.Items.Add(str)
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
|
|
|
|
sr.Close()
|
|
|
|
|
|
listb2ab = ListBox1.Items.Count
|
|
ListBox1.SetSelected(0, True)
|
|
For x = 1 To ListBox1.Items.Count
|
|
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & "/" & ListBox1.SelectedItem)
|
|
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
|
|
ftreq2.Credentials = New NetworkCredential("extremedownloaders", passftp)
|
|
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
|
|
listb2ab = listb2ab - 1
|
|
ListBox1.SetSelected(listb2ab, True)
|
|
|
|
Next
|
|
|
|
ListBox1.Items.Clear()
|
|
listb2ab = 0
|
|
|
|
del6()
|
|
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
End Class |