1298 lines
55 KiB
VB.net
1298 lines
55 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Imports System.Net
|
|
Imports System.Security.Policy
|
|
|
|
Public Class Form29
|
|
Dim urlup As String = ""
|
|
Private Sub Form29_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
ComboBox1.SelectedItem = "logiciels"
|
|
Label1.Text = "Nom du fichier: " & OpenFileDialog1.SafeFileName
|
|
ComboBox5.SelectedItem = "Gratuit"
|
|
ComboBox6.SelectedItem = "0"
|
|
ComboBox7.SelectedItem = "oui"
|
|
Else
|
|
Close()
|
|
End If
|
|
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
|
|
If ComboBox1.SelectedItem = "Jeux" Then
|
|
ComboBox2.Items.Clear()
|
|
ComboBox2.Show()
|
|
Label3.Show()
|
|
ComboBox2.Items.Add("Tout les jeux")
|
|
ComboBox2.Items.Add("Minecraft")
|
|
ComboBox2.SelectedItem = "Tout les jeux"
|
|
ComboBox3.Hide()
|
|
ComboBox4.Hide()
|
|
Button1.Hide()
|
|
Label8.Hide()
|
|
Label5.Hide()
|
|
Label4.Hide()
|
|
ElseIf ComboBox1.SelectedItem = "ISO" Then
|
|
ComboBox2.Items.Clear()
|
|
ComboBox2.Show()
|
|
Label3.Show()
|
|
ComboBox2.Items.Add("Windows")
|
|
ComboBox2.Items.Add("Linux")
|
|
ComboBox2.Items.Add("Autre")
|
|
ComboBox2.SelectedItem = "Windows"
|
|
ComboBox3.Items.Clear()
|
|
ComboBox4.Items.Clear()
|
|
ComboBox3.Hide()
|
|
ComboBox4.Hide()
|
|
Button1.Hide()
|
|
Label8.Hide()
|
|
Label5.Hide()
|
|
Label4.Hide()
|
|
Else
|
|
ComboBox2.Items.Clear()
|
|
ComboBox2.Hide()
|
|
Label3.Hide()
|
|
ComboBox3.Items.Clear()
|
|
ComboBox4.Items.Clear()
|
|
ComboBox3.Hide()
|
|
ComboBox4.Hide()
|
|
Button1.Hide()
|
|
Label8.Hide()
|
|
Label5.Hide()
|
|
Label4.Hide()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub ComboBox2_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedValueChanged
|
|
If ComboBox2.SelectedItem = "Minecraft" Then
|
|
ComboBox3.Items.Clear()
|
|
ComboBox3.Items.Add("shaders")
|
|
ComboBox3.Items.Add("serveur préfaits")
|
|
ComboBox3.Items.Add("Plugins")
|
|
ComboBox3.Items.Add("pack de texture")
|
|
ComboBox3.Items.Add("Mods")
|
|
ComboBox3.Items.Add("Maps")
|
|
ComboBox3.Items.Add("Launchers")
|
|
|
|
ComboBox4.Items.Clear()
|
|
ComboBox4.Items.Add("1.7.10")
|
|
ComboBox4.Items.Add("1.8")
|
|
ComboBox4.Items.Add("1.8.1")
|
|
ComboBox4.Items.Add("1.8.2")
|
|
ComboBox4.Items.Add("1.8.3")
|
|
ComboBox4.Items.Add("1.8.4")
|
|
ComboBox4.Items.Add("1.8.5")
|
|
ComboBox4.Items.Add("1.8.6")
|
|
ComboBox4.Items.Add("1.8.7")
|
|
ComboBox4.Items.Add("1.8.9")
|
|
ComboBox4.Items.Add("1.9")
|
|
ComboBox4.Items.Add("1.9.1")
|
|
ComboBox4.Items.Add("1.9.2")
|
|
ComboBox4.Items.Add("1.9.3")
|
|
ComboBox4.Items.Add("1.9.4")
|
|
ComboBox4.Items.Add("1.10")
|
|
ComboBox4.Items.Add("1.10.1")
|
|
ComboBox4.Items.Add("1.10.2")
|
|
ComboBox4.Items.Add("1.11")
|
|
ComboBox4.Items.Add("1.11.1")
|
|
ComboBox4.Items.Add("1.11.2")
|
|
ComboBox4.Items.Add("1.12")
|
|
ComboBox4.Items.Add("1.12.1")
|
|
ComboBox4.Items.Add("1.12.2")
|
|
ComboBox4.Items.Add("1.13")
|
|
ComboBox4.Items.Add("1.13.1")
|
|
ComboBox4.Items.Add("1.14")
|
|
ComboBox4.Items.Add("1.14.1")
|
|
ComboBox4.Items.Add("1.14.2")
|
|
ComboBox4.Items.Add("1.14.3")
|
|
ComboBox4.Items.Add("1.14.4")
|
|
ComboBox4.Items.Add("1.15")
|
|
ComboBox4.Items.Add("1.15.1")
|
|
ComboBox4.Items.Add("1.15.2")
|
|
ComboBox4.Items.Add("1.16")
|
|
ComboBox4.Items.Add("1.16.1")
|
|
ComboBox4.Items.Add("1.16.2")
|
|
ComboBox4.Items.Add("1.16.3")
|
|
ComboBox4.Items.Add("1.16.4")
|
|
ComboBox4.Items.Add("1.16.5")
|
|
ComboBox4.Items.Add("1.17")
|
|
ComboBox4.Items.Add("1.17.1")
|
|
ComboBox4.Items.Add("1.18")
|
|
ComboBox4.Items.Add("1.18.1")
|
|
ComboBox4.Items.Add("1.18.2")
|
|
ComboBox4.Items.Add("1.19")
|
|
ComboBox4.Items.Add("1.19.1")
|
|
ComboBox4.Items.Add("1.19.2")
|
|
ComboBox3.Show()
|
|
Label4.Show()
|
|
ComboBox3.SelectedItem = "shaders"
|
|
Else
|
|
ComboBox3.Items.Clear()
|
|
ComboBox3.Hide()
|
|
Label4.Hide()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox3_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedValueChanged
|
|
If ComboBox3.SelectedItem = "Launchers" Then
|
|
ComboBox4.Hide()
|
|
Label5.Hide()
|
|
Label8.Hide()
|
|
Button1.Hide()
|
|
ElseIf ComboBox3.SelectedItem = "Mods" Then
|
|
ComboBox4.SelectedItem = "1.19.2"
|
|
ComboBox4.Show()
|
|
Label5.Show()
|
|
Label8.Show()
|
|
Button1.Show()
|
|
ElseIf ComboBox3.SelectedItem = "Plugins" Then
|
|
ComboBox4.SelectedItem = "1.19.2"
|
|
ComboBox4.Show()
|
|
Label5.Show()
|
|
Label8.Show()
|
|
Button1.Show()
|
|
Else
|
|
ComboBox4.SelectedItem = "1.19.2"
|
|
ComboBox4.Show()
|
|
Label5.Show()
|
|
Label8.Hide()
|
|
Button1.Hide()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.SelectedIndexChanged
|
|
If ComboBox5.SelectedItem = "Payant" Then
|
|
TextBox1.Show()
|
|
Else
|
|
TextBox1.Hide()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Label5_Click(sender As Object, e As EventArgs) Handles Label5.Click, Label6.Click, Label7.Click, Label9.Click, Label10.Click, Label11.Click
|
|
|
|
End Sub
|
|
|
|
Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub ComboBox6_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedValueChanged
|
|
If ComboBox6.SelectedItem = "0" Then
|
|
PictureBox1.Hide()
|
|
PictureBox2.Hide()
|
|
PictureBox3.Hide()
|
|
PictureBox4.Hide()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "1" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Hide()
|
|
PictureBox3.Hide()
|
|
PictureBox4.Hide()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "2" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Hide()
|
|
PictureBox4.Hide()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "3" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Hide()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "4" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "5" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "6" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Show()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "7" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Show()
|
|
PictureBox7.Show()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "8" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Show()
|
|
PictureBox7.Show()
|
|
PictureBox8.Show()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "9" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Show()
|
|
PictureBox7.Show()
|
|
PictureBox8.Show()
|
|
PictureBox9.Show()
|
|
PictureBox10.Hide()
|
|
ElseIf ComboBox6.SelectedItem = "10" Then
|
|
PictureBox1.Show()
|
|
PictureBox2.Show()
|
|
PictureBox3.Show()
|
|
PictureBox4.Show()
|
|
PictureBox5.Show()
|
|
PictureBox6.Show()
|
|
PictureBox7.Show()
|
|
PictureBox8.Show()
|
|
PictureBox9.Show()
|
|
PictureBox10.Show()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox1.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox2.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox3.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox4.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox5.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox6.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox7.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox7.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox8_Click(sender As Object, e As EventArgs) Handles PictureBox8.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox8.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox9.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox9.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox10_Click(sender As Object, e As EventArgs) Handles PictureBox10.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox10.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
|
|
|
|
End Sub
|
|
|
|
Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
|
|
If TextBox3.Text.Contains(".") Or TextBox3.Text.Contains("\") Or TextBox3.Text.Contains("/") Or TextBox3.Text.Contains(":") Or TextBox3.Text.Contains("*") Or TextBox3.Text.Contains("?") Or TextBox3.Text.Contains("""") Or TextBox3.Text.Contains("<") Or TextBox3.Text.Contains(">") Or TextBox3.Text.Contains("|") Then
|
|
MsgBox("les caractères suivants:" & vbNewLine & " \/:*?""<>|." & vbNewLine & vbNewLine & "sont interdit", MsgBoxStyle.Exclamation)
|
|
TextBox3.Clear()
|
|
Else
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox11_Click(sender As Object, e As EventArgs) Handles PictureBox11.Click
|
|
If OpenFileDialog2.ShowDialog = 1 Then
|
|
PictureBox11.Image = Image.FromFile(OpenFileDialog2.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
If TextBox3.Text = "" Or TextBox3.Text = " " Or TextBox3.Text = " " Then
|
|
MsgBox("merci d'entrer un nom", MsgBoxStyle.Critical)
|
|
Else
|
|
If ComboBox5.SelectedItem = "Payant" Then
|
|
If TextBox1.Text = "" Or TextBox1.Text = " " Or TextBox1.Text = " " Or TextBox1.Text = "0" Then
|
|
MsgBox("merci d'entrer un prix", MsgBoxStyle.Critical)
|
|
Else
|
|
If TextBox2.Text = "" Or TextBox2.Text = " " Or TextBox2.Text = " " Then
|
|
MsgBox("merci d'entrer une descirption", MsgBoxStyle.Critical)
|
|
Else
|
|
If ComboBox7.SelectedItem = "oui" Then
|
|
If TextBox4.Text = "" Or TextBox4.Text = " " Then
|
|
MsgBox("merci d'entrer un site web", MsgBoxStyle.Critical)
|
|
Else
|
|
confirup()
|
|
End If
|
|
Else
|
|
confirup()
|
|
End If
|
|
End If
|
|
End If
|
|
Else
|
|
If TextBox2.Text = "" Or TextBox2.Text = " " Or TextBox2.Text = " " Then
|
|
MsgBox("merci d'entrer une descirption", MsgBoxStyle.Critical)
|
|
Else
|
|
If ComboBox7.SelectedItem = "oui" Then
|
|
If TextBox4.Text = "" Or TextBox4.Text = " " Then
|
|
MsgBox("merci d'entrer un site web", MsgBoxStyle.Critical)
|
|
Else
|
|
confirup()
|
|
End If
|
|
Else
|
|
confirup()
|
|
End If
|
|
End If
|
|
End If
|
|
End If
|
|
End Sub
|
|
Sub confirup()
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/level.txt")
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/up.txt")
|
|
|
|
If vri1 = 0 And vri2 = 5 Then
|
|
MsgBox("vous être niveaux 0 vous n'est pouvez envoyer que 5 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 1 And vri2 = 7 Then
|
|
MsgBox("vous être niveaux 1 vous n'est pouvez envoyer que 7 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 2 And vri2 = 14 Then
|
|
MsgBox("vous être niveaux 2 vous n'est pouvez envoyer que 14 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 3 And vri2 = 28 Then
|
|
MsgBox("vous être niveaux 3 vous n'est pouvez envoyer que 28 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 4 And vri2 = 56 Then
|
|
MsgBox("vous être niveaux 4 vous n'est pouvez envoyer que 56 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 5 And vri2 = 112 Then
|
|
MsgBox("vous être niveaux 5 vous n'est pouvez envoyer que 112 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 6 And vri2 = 224 Then
|
|
MsgBox("vous être niveaux 6 vous n'est pouvez envoyer que 224 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 7 And vri2 = 448 Then
|
|
MsgBox("vous être niveaux 7 vous n'est pouvez envoyer que 448 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 8 And vri2 = 896 Then
|
|
MsgBox("vous être niveaux 8 vous n'est pouvez envoyer que 896 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 9 And vri2 = 1792 Then
|
|
MsgBox("vous être niveaux 9 vous n'est pouvez envoyer que 1 792 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 10 And vri2 = 3584 Then
|
|
MsgBox("vous être niveaux 10 vous n'est pouvez envoyer que 3 584 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 11 And vri2 = 7168 Then
|
|
MsgBox("vous être niveaux 11 vous n'est pouvez envoyer que 7 168 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 12 And vri2 = 14336 Then
|
|
MsgBox("vous être niveaux 12 vous n'est pouvez envoyer que 14 336 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 13 And vri2 = 28672 Then
|
|
MsgBox("vous être niveaux 13 vous n'est pouvez envoyer que 28 672 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 14 And vri2 = 57344 Then
|
|
MsgBox("vous être niveaux 14 vous n'est pouvez envoyer que 57 344 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 15 And vri2 = 114688 Then
|
|
MsgBox("vous être niveaux 15 vous n'est pouvez envoyer que 114 688 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 16 And vri2 = 229376 Then
|
|
MsgBox("vous être niveaux 16 vous n'est pouvez envoyer que 229 376 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 17 And vri2 = 458752 Then
|
|
MsgBox("vous être niveaux 17 vous n'est pouvez envoyer que 458 752 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 18 And vri2 = 917504 Then
|
|
MsgBox("vous être niveaux 18 vous n'est pouvez envoyer que 917 504 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 19 And vri2 = 1835008 Then
|
|
MsgBox("vous être niveaux 19 vous n'est pouvez envoyer que 1 835 008 fichier", MsgBoxStyle.Exclamation)
|
|
ElseIf vri1 = 20 And vri2 = 3670016 Then
|
|
MsgBox("vous être niveaux 19 vous n'est pouvez envoyer que 3 670 016 fichier", MsgBoxStyle.Exclamation)
|
|
Else
|
|
Dim msg = MsgBox("Voulez vous envoyer: " & TextBox3.Text & " ? Une fois un ligne vous ne pouvez plus le modifier.", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
vérifup()
|
|
Else
|
|
MsgBox("mis en ligne annuler", MsgBoxStyle.Information)
|
|
End If
|
|
End If
|
|
End Sub
|
|
Sub vérifup()
|
|
If ComboBox1.SelectedItem = "logiciels" Then
|
|
vérifuplogi()
|
|
ElseIf ComboBox1.SelectedItem = "Jeux" Then
|
|
If ComboBox2.SelectedItem = "Tout les jeux" Then
|
|
vérifupJeux()
|
|
Else
|
|
vérifupminecraft
|
|
End If
|
|
|
|
ElseIf ComboBox1.SelectedItem = "ISO" Then
|
|
vérifupISO
|
|
ElseIf ComboBox1.SelectedItem = "Autre" Then
|
|
vérifupAutre
|
|
End If
|
|
End Sub
|
|
Sub vérifuplogi()
|
|
Form30.Label1.Text = "vérification des fichier"
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/logiciels/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le logiciel: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
Sub creatfile()
|
|
Form30.Label1.Text = "copie et comprétion du fichier"
|
|
Form30.Show()
|
|
Me.Enabled = False
|
|
If Directory.Exists(dostemps & TextBox3.Text) = True Then
|
|
BackgroundWorker1.RunWorkerAsync()
|
|
Else
|
|
Directory.CreateDirectory(dostemps & TextBox3.Text)
|
|
BackgroundWorker1.RunWorkerAsync()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox7_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox7.SelectedValueChanged
|
|
If ComboBox7.SelectedItem = "oui" Then
|
|
TextBox4.Show()
|
|
Else
|
|
TextBox4.Hide()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
|
Timer1.Stop()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/logiciels/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le logiciel: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer1.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
|
FileCopy(OpenFileDialog1.FileName, dostemps & TextBox3.Text & "/" & OpenFileDialog1.SafeFileName)
|
|
IO.Compression.ZipFile.CreateFromDirectory(dostemps & TextBox3.Text, dostemps & "/" & TextBox3.Text & ".zip")
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker1_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
|
|
Form30.Label1.Text = "création des fichier suplémentaire"
|
|
|
|
Directory.CreateDirectory(dostemps & TextBox3.Text & "2")
|
|
|
|
If ComboBox6.SelectedItem = "0" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("0")
|
|
sw1.Close()
|
|
ElseIf ComboBox6.SelectedItem = "1" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("1")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
ElseIf ComboBox6.SelectedItem = "2" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("2")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
ElseIf ComboBox6.SelectedItem = "3" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("3")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
ElseIf ComboBox6.SelectedItem = "4" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("4")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
ElseIf ComboBox6.SelectedItem = "5" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("5")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
ElseIf ComboBox6.SelectedItem = "6" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("6")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
PictureBox6.Image.Save(dostemps & TextBox3.Text & "2/" & "image6.png")
|
|
ElseIf ComboBox6.SelectedItem = "7" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("7")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
PictureBox6.Image.Save(dostemps & TextBox3.Text & "2/" & "image6.png")
|
|
PictureBox7.Image.Save(dostemps & TextBox3.Text & "2/" & "image7.png")
|
|
ElseIf ComboBox6.SelectedItem = "8" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("8")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
PictureBox6.Image.Save(dostemps & TextBox3.Text & "2/" & "image6.png")
|
|
PictureBox7.Image.Save(dostemps & TextBox3.Text & "2/" & "image7.png")
|
|
PictureBox8.Image.Save(dostemps & TextBox3.Text & "2/" & "image8.png")
|
|
ElseIf ComboBox6.SelectedItem = "9" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("9")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
PictureBox6.Image.Save(dostemps & TextBox3.Text & "2/" & "image6.png")
|
|
PictureBox7.Image.Save(dostemps & TextBox3.Text & "2/" & "image7.png")
|
|
PictureBox8.Image.Save(dostemps & TextBox3.Text & "2/" & "image8.png")
|
|
PictureBox9.Image.Save(dostemps & TextBox3.Text & "2/" & "image9.png")
|
|
ElseIf ComboBox6.SelectedItem = "10" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "image.txt")
|
|
sw1.WriteLine("10")
|
|
sw1.Close()
|
|
PictureBox1.Image.Save(dostemps & TextBox3.Text & "2/" & "image1.png")
|
|
PictureBox2.Image.Save(dostemps & TextBox3.Text & "2/" & "image2.png")
|
|
PictureBox3.Image.Save(dostemps & TextBox3.Text & "2/" & "image3.png")
|
|
PictureBox4.Image.Save(dostemps & TextBox3.Text & "2/" & "image4.png")
|
|
PictureBox5.Image.Save(dostemps & TextBox3.Text & "2/" & "image5.png")
|
|
PictureBox6.Image.Save(dostemps & TextBox3.Text & "2/" & "image6.png")
|
|
PictureBox7.Image.Save(dostemps & TextBox3.Text & "2/" & "image7.png")
|
|
PictureBox8.Image.Save(dostemps & TextBox3.Text & "2/" & "image8.png")
|
|
PictureBox9.Image.Save(dostemps & TextBox3.Text & "2/" & "image9.png")
|
|
PictureBox10.Image.Save(dostemps & TextBox3.Text & "2/" & "image10.png")
|
|
End If
|
|
|
|
PictureBox11.Image.Save(dostemps & TextBox3.Text & "2/" & "logo.png")
|
|
|
|
If ComboBox7.SelectedItem = "oui" Then
|
|
Dim sw1 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "site.txt")
|
|
sw1.WriteLine("1")
|
|
sw1.Close()
|
|
IO.File.WriteAllText(dostemps & TextBox3.Text & "2/" & "site2.txt", TextBox4.Text)
|
|
Else
|
|
Dim sw2 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "site.txt")
|
|
sw2.WriteLine("0")
|
|
sw2.Close()
|
|
End If
|
|
|
|
If ComboBox5.SelectedItem = "Payant" Then
|
|
Dim sw3 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "prix.txt")
|
|
sw3.WriteLine(TextBox1.Text)
|
|
sw3.Close()
|
|
Else
|
|
Dim sw4 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "prix.txt")
|
|
sw4.WriteLine("0")
|
|
sw4.Close()
|
|
End If
|
|
|
|
IO.File.WriteAllText(dostemps & TextBox3.Text & "2/" & "info.txt", TextBox2.Text)
|
|
|
|
Dim sw5 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "like.txt")
|
|
sw5.WriteLine("0")
|
|
sw5.Close()
|
|
|
|
Dim sw6 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "telechargement.txt")
|
|
sw6.WriteLine("0")
|
|
sw6.Close()
|
|
|
|
Dim sw7 As New StreamWriter(dostemps & TextBox3.Text & "2/" & "auteur.txt")
|
|
sw7.WriteLine(nomutilisateur)
|
|
sw7.Close()
|
|
|
|
If ComboBox1.SelectedItem = "logiciels" Then
|
|
urlup = "Communautaire/logiciels/"
|
|
ElseIf ComboBox1.SelectedItem = "Jeux" Then
|
|
|
|
If ComboBox2.SelectedItem = "Tout les jeux" Then
|
|
urlup = "Communautaire/Jeux/Tout les jeux/"
|
|
Else
|
|
If ComboBox3.SelectedItem = "shaders" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/shaders/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "serveur préfaits" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/serveur préfaits/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "Plugins" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/Plugins/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "pack de texture" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/pack de texture/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "Mods" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/Mods/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "Maps" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/Maps/" & ComboBox4.SelectedItem & "/"
|
|
ElseIf ComboBox3.SelectedItem = "Launchers" Then
|
|
urlup = "Communautaire/Jeux/Minecraft/Launchers/"
|
|
End If
|
|
End If
|
|
ElseIf ComboBox1.SelectedItem = "ISO" Then
|
|
If ComboBox2.SelectedItem = "Windows" Then
|
|
urlup = "Communautaire/ISO/Windows/"
|
|
ElseIf ComboBox2.SelectedItem = "Linux" Then
|
|
urlup = "Communautaire/ISO/Linux/"
|
|
ElseIf ComboBox2.SelectedItem = "Autre" Then
|
|
urlup = "Communautaire/ISO/Autre/"
|
|
End If
|
|
ElseIf ComboBox1.SelectedItem = "Autre" Then
|
|
urlup = "Communautaire/Autre/"
|
|
End If
|
|
createdos()
|
|
End Sub
|
|
Sub createdos()
|
|
Form30.Label1.Text = "création des dossier serveur"
|
|
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text), 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()
|
|
createdos2()
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
|
|
Timer2.Stop()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text), 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()
|
|
createdos2()
|
|
Catch ex As Exception
|
|
Timer2.Start()
|
|
End Try
|
|
End Sub
|
|
Sub createdos2()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text & "/like/"), 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()
|
|
createdos3()
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
|
|
Timer3.Stop()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text & "/like/"), 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()
|
|
createdos3()
|
|
Catch ex As Exception
|
|
Timer3.Start()
|
|
End Try
|
|
End Sub
|
|
Sub createdos3()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text & "/achat/"), 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()
|
|
upfichier
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
Sub upfichier()
|
|
BackgroundWorker2.RunWorkerAsync()
|
|
End Sub
|
|
|
|
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
|
|
Timer4.Stop()
|
|
Try
|
|
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & urlup & TextBox3.Text & "/achat/"), 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()
|
|
upfichier()
|
|
Catch ex As Exception
|
|
Timer4.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker2_DoWork(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker2.DoWork
|
|
Form30.Label1.Text = "envoie des fichier suplémentaire"
|
|
For Each fichier As String In IO.Directory.GetFiles(dostemps & TextBox3.Text & "2")
|
|
Dim info As New IO.FileInfo(fichier)
|
|
My.Computer.Network.UploadFile(dostemps & TextBox3.Text & "2/" & info.Name, ipserver & urlup & TextBox3.Text & "/" & info.Name)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub BackgroundWorker2_RunWorkerCompleted(sender As Object, e As RunWorkerCompletedEventArgs) Handles BackgroundWorker2.RunWorkerCompleted
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.UploadFileTaskAsync(ipserver & urlup & TextBox3.Text & "/" & TextBox3.Text & ".zip", dostemps & TextBox3.Text & ".zip")
|
|
Catch ex As Exception
|
|
Timer5.Start()
|
|
End Try
|
|
End Sub
|
|
Dim WithEvents téléchargerfr As WebClient
|
|
|
|
Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles Timer5.Tick
|
|
Timer5.Stop()
|
|
Try
|
|
téléchargerfr = New WebClient
|
|
téléchargerfr.UploadFileTaskAsync(ipserver & urlup & TextBox3.Text & "/" & TextBox3.Text & ".zip", dostemps & TextBox3.Text & ".zip")
|
|
Catch ex As Exception
|
|
Timer5.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub téléchargerfr_UploadProgressChanged(sender As Object, e As UploadProgressChangedEventArgs) Handles téléchargerfr.UploadProgressChanged
|
|
Form30.Label1.Text = String.Format("Envoie du fichier: " & e.ProgressPercentage & "%" & " {0} MB / {1} MB", (e.BytesSent / 1024D / 1024D).ToString("0.00"), (e.TotalBytesToSend / 1024D / 1024D).ToString("0.00"))
|
|
Form30.ProgressBar1.Style = ProgressBarStyle.Continuous
|
|
Form30.ProgressBar1.Value = e.ProgressPercentage
|
|
End Sub
|
|
|
|
Private Sub téléchargerfr_UploadFileCompleted(sender As Object, e As UploadFileCompletedEventArgs) Handles téléchargerfr.UploadFileCompleted
|
|
Dim maj1 As New WebClient
|
|
Dim vri1 As String = maj1.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/up.txt")
|
|
Dim upfile = vri1 + 1
|
|
Dim sw1 As New StreamWriter(dostemps & "up.txt")
|
|
sw1.WriteLine(upfile)
|
|
sw1.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "up.txt", ipserver & "/utilisateur/" & nomutilisateur & "/up.txt")
|
|
File.Delete(dostemps & "up.txt")
|
|
Dim maj2 As New WebClient
|
|
Dim vri2 As String = maj2.DownloadString(ipsite & "extrème downloaders/utilisateur/" & nomutilisateur & "/XP.txt")
|
|
Dim upXP = vri2 + 15
|
|
Dim sw2 As New StreamWriter(dostemps & "XP.txt")
|
|
sw2.WriteLine(upXP)
|
|
sw2.Close()
|
|
My.Computer.Network.UploadFile(dostemps & "XP.txt", ipserver & "/utilisateur/" & nomutilisateur & "/XP.txt")
|
|
File.Delete(dostemps & "XP.txt")
|
|
Form30.dlform30 = 0
|
|
Form30.Close()
|
|
MsgBox("mis en ligne terminer", MsgBoxStyle.Information)
|
|
Close()
|
|
End Sub
|
|
Sub vérifupJeux()
|
|
Form30.Label1.Text = "vérification des fichier"
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Jeux/Tout les jeux/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le Jeux: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer6.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer6_Tick(sender As Object, e As EventArgs) Handles Timer6.Tick
|
|
Timer6.Stop()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Jeux/Tout les jeux/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le Jeux: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer6.Start()
|
|
End Try
|
|
End Sub
|
|
Sub vérifupminecraft()
|
|
Form30.Label1.Text = "vérification des fichier"
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Jeux/Minecraft/" & ComboBox3.SelectedItem & "/" & ComboBox4.SelectedItem & "/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le " & ComboBox3.SelectedItem & ": " & TextBox3.Text & " a dêja en ligne " & "sur la version " & ComboBox4.SelectedItem, MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer7.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer7_Tick(sender As Object, e As EventArgs) Handles Timer7.Tick
|
|
Timer7.Stop()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Jeux/Minecraft/" & ComboBox3.SelectedItem & "/" & ComboBox4.SelectedItem & "/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le " & ComboBox3.SelectedItem & ": " & TextBox3.Text & " a dêja en ligne " & "sur la version " & ComboBox4.SelectedItem, MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer7.Start()
|
|
End Try
|
|
End Sub
|
|
Sub vérifupISO()
|
|
Form30.Label1.Text = "vérification des fichier"
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/ISO/" & ComboBox2.SelectedItem & "/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le fichier ISO: " & TextBox3.Text & " a dêja en ligne " & "sur la cotégorie " & ComboBox2.SelectedItem, MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer8.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer8_Tick(sender As Object, e As EventArgs) Handles Timer8.Tick
|
|
Timer8.Stop()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/ISO/" & ComboBox2.SelectedItem & "/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le fichier ISO: " & TextBox3.Text & " a dêja en ligne " & "sur la cotégorie " & ComboBox2.SelectedItem, MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer8.Start()
|
|
End Try
|
|
End Sub
|
|
Sub vérifupAutre()
|
|
Form30.Label1.Text = "vérification des fichier"
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Autre/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le fichier: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer9.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Timer9_Tick(sender As Object, e As EventArgs) Handles Timer9.Tick
|
|
Timer9.Stop()
|
|
Try
|
|
Dim fwr As FtpWebRequest
|
|
fwr = FtpWebRequest.Create(ipserver & "Communautaire/Autre/")
|
|
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
|
|
|
|
Directory.CreateDirectory(doscompte & str)
|
|
|
|
|
|
str = sr.ReadLine()
|
|
|
|
End While
|
|
sr.Close()
|
|
|
|
If Directory.Exists(doscompte & TextBox3.Text) = True Then
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
MsgBox("Le fichier: " & TextBox3.Text & " a dêja en ligne", MsgBoxStyle.Critical)
|
|
Else
|
|
For Each fichier As String In IO.Directory.GetDirectories(doscompte)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Directory.Delete(doscompte & info.Name)
|
|
Next
|
|
creatfile()
|
|
End If
|
|
Catch ex As Exception
|
|
Timer9.Start()
|
|
End Try
|
|
End Sub
|
|
|
|
Private Sub Form29_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
Me.Dispose()
|
|
PictureBox1.Hide()
|
|
PictureBox2.Hide()
|
|
PictureBox3.Hide()
|
|
PictureBox4.Hide()
|
|
PictureBox5.Hide()
|
|
PictureBox6.Hide()
|
|
PictureBox7.Hide()
|
|
PictureBox8.Hide()
|
|
PictureBox9.Hide()
|
|
PictureBox10.Hide()
|
|
TextBox1.Clear()
|
|
TextBox2.Clear()
|
|
TextBox3.Clear()
|
|
TextBox4.Clear()
|
|
TextBox1.Hide()
|
|
Label2.Hide()
|
|
Label3.Hide()
|
|
Label5.Hide()
|
|
Label8.Hide()
|
|
Button1.Hide()
|
|
ComboBox2.Hide()
|
|
ComboBox3.Hide()
|
|
ComboBox4.Hide()
|
|
For Each fichier1 As String In IO.Directory.GetDirectories(dostemps)
|
|
Dim info As New IO.FileInfo(fichier1)
|
|
Directory.Delete(fichier1, recursive:=True)
|
|
Next
|
|
|
|
For Each fichier As String In IO.Directory.GetFiles(dostemps)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(dostemps & info.Name)
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
Form31.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub TextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles TextBox1.KeyPress
|
|
Dim desNumero() As Char = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
|
|
If Not desNumero.Contains(e.KeyChar) And Not Asc(e.KeyChar) = 8 Then
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
End Class |