563 lines
14 KiB
VB.net
563 lines
14 KiB
VB.net
Imports System.IO
|
|
Public Class Form11
|
|
Private Sub Form11_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
If Directory.Exists(Application.StartupPath & "/lecteur média/") = True Then
|
|
repertoire = Application.StartupPath & "/lecteur média/"
|
|
repertoireavis = Application.StartupPath & "/lecteur média/"
|
|
repertoirebacup = Application.StartupPath & "/lecteur média backup/"
|
|
Else
|
|
|
|
End If
|
|
|
|
Dim volume As Integer = 0
|
|
Dim radiov As Integer = 1
|
|
Dim mis As Integer = 0
|
|
Dim démarage As Integer = 0
|
|
|
|
If File.Exists(repertoire & "co.zip") = True Then
|
|
File.Delete(repertoire & "co.zip")
|
|
End If
|
|
|
|
If File.Exists(My.Application.Info.DirectoryPath & "/transfaire.txt") = True Then
|
|
File.Delete(My.Application.Info.DirectoryPath & "/transfaire.txt")
|
|
End If
|
|
|
|
|
|
If Directory.Exists(repertoire) = False Then
|
|
Directory.CreateDirectory(repertoire)
|
|
End If
|
|
|
|
If Directory.Exists(compte) = False Then
|
|
Directory.CreateDirectory(compte)
|
|
End If
|
|
|
|
If Directory.Exists(dosplaylist) = False Then
|
|
Directory.CreateDirectory(dosplaylist)
|
|
End If
|
|
|
|
If Directory.Exists(dostheme) = False Then
|
|
Directory.CreateDirectory(dostheme)
|
|
End If
|
|
|
|
If Directory.Exists(dosparamètres) = False Then
|
|
Directory.CreateDirectory(dosparamètres)
|
|
End If
|
|
|
|
If Directory.Exists(configbackup) = False Then
|
|
Directory.CreateDirectory(configbackup)
|
|
End If
|
|
|
|
If Directory.Exists(mesbacup) = False Then
|
|
Directory.CreateDirectory(mesbacup)
|
|
End If
|
|
|
|
If Directory.Exists(cozip) = False Then
|
|
Directory.CreateDirectory(cozip)
|
|
End If
|
|
|
|
If Directory.Exists(dossérie) = False Then
|
|
Directory.CreateDirectory(dossérie)
|
|
End If
|
|
|
|
|
|
If Directory.Exists(dosparamètres & "\widgets\") = False Then
|
|
Directory.CreateDirectory(dosparamètres & "\widgets\")
|
|
End If
|
|
|
|
If File.Exists(fichiermisajourdev) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(fichiermisajourdev)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(themeselect) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(themeselect)
|
|
sw1.WriteLine("")
|
|
sw1.Close()
|
|
End If
|
|
|
|
|
|
If Directory.Exists(dosentère) = False Then
|
|
Directory.CreateDirectory(dosentère)
|
|
End If
|
|
|
|
For Each fichier As String In IO.Directory.GetFiles(cozip)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(fichier)
|
|
Next
|
|
|
|
If File.Exists(comtpeco2) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(comtpeco2)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(fichierconfigbackup) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(fichierconfigbackup)
|
|
sw1.WriteLine(0)
|
|
sw1.WriteLine(0)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(lastedbackup) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(lastedbackup)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(couleur) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(couleur)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(marqueurtemp) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(marqueurtemp)
|
|
sw1.WriteLine(10)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(localhost) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(localhost)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(lastedbackup) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(localhost)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(dosparamètres & "\widgets\" & "lançer.txt") = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(dosparamètres & "\widgets\" & "lançer.txt")
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(interface1) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(interface1)
|
|
sw1.WriteLine(1)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If File.Exists(compteco) = True Then
|
|
|
|
Else
|
|
Dim sw1 As New StreamWriter(compteco)
|
|
sw1.WriteLine(0)
|
|
sw1.Close()
|
|
End If
|
|
|
|
If Directory.Exists(film) = False Then
|
|
Directory.CreateDirectory(film)
|
|
End If
|
|
|
|
If Directory.Exists(like2) = False Then
|
|
Directory.CreateDirectory(like2)
|
|
End If
|
|
|
|
If Directory.Exists(marqueur) = False Then
|
|
Directory.CreateDirectory(marqueur)
|
|
End If
|
|
|
|
If Directory.Exists(radio) = False Then
|
|
Directory.CreateDirectory(radio)
|
|
End If
|
|
|
|
If Directory.Exists(misajours) = False Then
|
|
Directory.CreateDirectory(misajours)
|
|
End If
|
|
|
|
|
|
If Directory.Exists(doscontroleparantal) = False Then
|
|
Directory.CreateDirectory(doscontroleparantal)
|
|
End If
|
|
|
|
If Directory.Exists(doscontroleparantal & "\film\") = False Then
|
|
Directory.CreateDirectory(doscontroleparantal & "\film\")
|
|
End If
|
|
|
|
If Directory.Exists(doscontroleparantal & "\Séries\") = False Then
|
|
Directory.CreateDirectory(doscontroleparantal & "\Séries\")
|
|
End If
|
|
|
|
If Directory.Exists(portable) = False Then
|
|
Directory.CreateDirectory(portable)
|
|
End If
|
|
|
|
|
|
If File.Exists(fichiermisauto) Then
|
|
|
|
Else
|
|
Dim sw11 As New StreamWriter(fichiermisauto)
|
|
sw11.WriteLine(0)
|
|
sw11.Close()
|
|
End If
|
|
|
|
If File.Exists(Favoris2) Then
|
|
File.Delete(Favoris2)
|
|
Else
|
|
|
|
End If
|
|
|
|
If Directory.Exists(musique) = False Then
|
|
Directory.CreateDirectory(musique)
|
|
End If
|
|
|
|
If File.Exists(musiquepar) Then
|
|
|
|
Else
|
|
Dim sw7 As New StreamWriter(musiquepar)
|
|
sw7.WriteLine(1)
|
|
sw7.Close()
|
|
End If
|
|
|
|
|
|
|
|
If Directory.Exists(Favoris1) = False Then
|
|
Directory.CreateDirectory(Favoris1)
|
|
End If
|
|
|
|
If File.Exists(historique) Then
|
|
|
|
Else
|
|
Dim dw8 As New StreamWriter(historique)
|
|
dw8.WriteLine()
|
|
dw8.Close()
|
|
End If
|
|
|
|
If File.Exists(mailcontroleparantal) = True Then
|
|
|
|
Else
|
|
Dim sw20 As New StreamWriter(mailcontroleparantal)
|
|
sw20.WriteLine(0)
|
|
sw20.Close()
|
|
End If
|
|
|
|
If File.Exists(passcontroleparantal) = True Then
|
|
|
|
Else
|
|
Dim sw20 As New StreamWriter(passcontroleparantal)
|
|
sw20.WriteLine(0)
|
|
sw20.Close()
|
|
End If
|
|
|
|
If File.Exists(optioncontrleparantal) = True Then
|
|
|
|
Else
|
|
Dim sw20 As New StreamWriter(optioncontrleparantal)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.WriteLine(0)
|
|
sw20.Close()
|
|
End If
|
|
|
|
|
|
If File.Exists(settings5) = True Then
|
|
|
|
Else
|
|
Dim dw8 As New StreamWriter(settings5)
|
|
dw8.WriteLine(0)
|
|
dw8.Close()
|
|
End If
|
|
|
|
If File.Exists(settings4) Then
|
|
|
|
Else
|
|
Dim dw8 As New StreamWriter(settings4)
|
|
dw8.WriteLine(1)
|
|
dw8.Close()
|
|
End If
|
|
|
|
|
|
If File.Exists(startpage) Then
|
|
|
|
Else
|
|
Dim sw11 As New StreamWriter(startpage)
|
|
sw11.WriteLine(0)
|
|
sw11.Close()
|
|
End If
|
|
|
|
|
|
If File.Exists(setting) Then
|
|
|
|
Else
|
|
Dim sw11 As New StreamWriter(setting)
|
|
sw11.WriteLine(0)
|
|
sw11.Close()
|
|
End If
|
|
|
|
|
|
If File.Exists(filmhc) Then
|
|
|
|
Else
|
|
Dim sw10 As New StreamWriter(filmhc)
|
|
sw10.WriteLine(0)
|
|
sw10.Close()
|
|
End If
|
|
|
|
If Directory.Exists(discté) = False Then
|
|
Directory.CreateDirectory(discté)
|
|
End If
|
|
|
|
If File.Exists(misa) = True Then
|
|
File.Delete(misa)
|
|
Else
|
|
|
|
End If
|
|
|
|
If File.Exists(dev) = True Then
|
|
|
|
Else
|
|
Dim sw10 As New StreamWriter(dev)
|
|
sw10.WriteLine(0)
|
|
sw10.Close()
|
|
End If
|
|
|
|
|
|
|
|
If File.Exists(settings1) Then
|
|
|
|
|
|
Dim lines() As String = File.ReadAllLines(settings1)
|
|
|
|
If lines(2) = 1 Then
|
|
internet()
|
|
Else
|
|
lang4()
|
|
End If
|
|
lang4()
|
|
Else
|
|
Dim sw As New StreamWriter(settings1)
|
|
sw.WriteLine(volume)
|
|
sw.WriteLine(radiov)
|
|
sw.WriteLine("1")
|
|
sw.WriteLine(démarage)
|
|
sw.Close()
|
|
lang4()
|
|
End If
|
|
|
|
Dim lines41() As String = File.ReadAllLines(settings1)
|
|
Try
|
|
If lines41(4) = 1 Or lines41(4) = 0 Then
|
|
|
|
End If
|
|
Catch ex As Exception
|
|
Dim lines2() As String = File.ReadAllLines(settings1)
|
|
Dim t1 = lines2(0)
|
|
Dim t2 = lines2(1)
|
|
Dim t3 = lines2(2)
|
|
Dim t4 = lines2(3)
|
|
Dim t5 As Integer = 0
|
|
Dim sw55 As New StreamWriter(settings1)
|
|
sw55.WriteLine(t1)
|
|
sw55.WriteLine(t2)
|
|
sw55.WriteLine(t3)
|
|
sw55.WriteLine(t4)
|
|
sw55.WriteLine(t5)
|
|
sw55.Close()
|
|
End Try
|
|
|
|
Dim lines45() As String = File.ReadAllLines(settings1)
|
|
Try
|
|
If lines45(5) = 1 Or lines45(5) = 0 Then
|
|
|
|
End If
|
|
Catch ex As Exception
|
|
Dim lines46() As String = File.ReadAllLines(settings1)
|
|
Dim t1 = lines46(0)
|
|
Dim t2 = lines46(1)
|
|
Dim t3 = lines46(2)
|
|
Dim t4 = lines46(3)
|
|
Dim t5 = lines46(4)
|
|
Dim t6 = 1
|
|
Dim t7 = 5
|
|
Dim sw56 As New StreamWriter(settings1)
|
|
sw56.WriteLine(t1)
|
|
sw56.WriteLine(t2)
|
|
sw56.WriteLine(t3)
|
|
sw56.WriteLine(t4)
|
|
sw56.WriteLine(t5)
|
|
sw56.WriteLine(t6)
|
|
sw56.WriteLine(t7)
|
|
sw56.Close()
|
|
End Try
|
|
|
|
If File.Exists(imgmusique) = True Then
|
|
|
|
Else
|
|
Dim sw900 As New StreamWriter(imgmusique)
|
|
sw900.WriteLine(0)
|
|
sw900.WriteLine(0)
|
|
sw900.WriteLine(0)
|
|
sw900.Close()
|
|
End If
|
|
|
|
If File.Exists(ettt) = True Then
|
|
|
|
Else
|
|
Dim sw901 As New StreamWriter(ettt)
|
|
sw901.WriteLine(0)
|
|
sw901.WriteLine(0)
|
|
sw901.WriteLine(0)
|
|
sw901.Close()
|
|
End If
|
|
|
|
If File.Exists(compteco) = True Then
|
|
|
|
Else
|
|
Dim sw2 As New StreamWriter(compteco)
|
|
sw2.WriteLine(0)
|
|
sw2.Close()
|
|
End If
|
|
|
|
If File.Exists(comtpeco2) = True Then
|
|
|
|
Else
|
|
Dim sw2 As New StreamWriter(comtpeco2)
|
|
sw2.WriteLine(0)
|
|
sw2.Close()
|
|
End If
|
|
|
|
If File.Exists(localhost) = True Then
|
|
|
|
Else
|
|
Dim sw2 As New StreamWriter(localhost)
|
|
sw2.WriteLine(0)
|
|
sw2.Close()
|
|
End If
|
|
|
|
If File.Exists(utilitairetemps) = True Then
|
|
|
|
Else
|
|
Dim sw2 As New StreamWriter(utilitairetemps)
|
|
sw2.WriteLine(0)
|
|
sw2.Close()
|
|
End If
|
|
|
|
If Directory.Exists(dictéenligne) = True Then
|
|
|
|
Else
|
|
Directory.CreateDirectory(dictéenligne)
|
|
End If
|
|
|
|
For Each fichier As String In IO.Directory.GetFiles(dictéenligne)
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(dictéenligne & info.Name)
|
|
Next
|
|
|
|
End Sub
|
|
Sub internet()
|
|
mis()
|
|
End Sub
|
|
Sub mis()
|
|
lang4()
|
|
End Sub
|
|
Sub lang4()
|
|
set2()
|
|
End Sub
|
|
Sub set2()
|
|
Dim volume As Integer = 0
|
|
Dim plan As Integer = 0
|
|
Dim vradio As Integer = 1
|
|
If Directory.Exists(repertoire) = False Then
|
|
Directory.CreateDirectory(repertoire)
|
|
End If
|
|
|
|
If File.Exists(settings2) Then
|
|
set3()
|
|
Else
|
|
Dim sw As New StreamWriter(settings2)
|
|
sw.WriteLine(volume)
|
|
sw.WriteLine(plan)
|
|
sw.WriteLine(vradio)
|
|
sw.Close()
|
|
set3()
|
|
End If
|
|
set3()
|
|
End Sub
|
|
Sub set3()
|
|
Dim volume As Integer = 0
|
|
Dim vch As Integer = 1
|
|
Dim vmp As Integer = 1
|
|
Dim plans As Integer = 0
|
|
If File.Exists(settings3) Then
|
|
set4()
|
|
Else
|
|
Dim sw As New StreamWriter(settings3)
|
|
sw.WriteLine(volume)
|
|
sw.WriteLine(vch)
|
|
sw.WriteLine(vmp)
|
|
sw.WriteLine(plans)
|
|
sw.Close()
|
|
set4()
|
|
End If
|
|
End Sub
|
|
Sub set4()
|
|
Dim notif As Integer = 1
|
|
If File.Exists(notification) Then
|
|
set5()
|
|
Else
|
|
Dim sw As New StreamWriter(notification)
|
|
sw.WriteLine(notif)
|
|
sw.Close()
|
|
set5()
|
|
End If
|
|
End Sub
|
|
Sub set5()
|
|
Dim théme2 As Integer = 1
|
|
If File.Exists(théme) Then
|
|
passe()
|
|
Else
|
|
Dim sw As New StreamWriter(théme)
|
|
sw.WriteLine(théme2)
|
|
sw.Close()
|
|
passe()
|
|
End If
|
|
End Sub
|
|
Sub passe()
|
|
Dim lines891() As String = File.ReadAllLines(interface1)
|
|
If lines891(0) = 0 Then
|
|
Form136.Show()
|
|
Form1.Show()
|
|
Form4.Close()
|
|
Me.Close()
|
|
Else
|
|
Form1.Show()
|
|
Form4.Close()
|
|
Me.Close()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
|
|
|
|
End Sub
|
|
End Class |