Files
2026-06-18 14:15:48 +02:00

264 lines
12 KiB
VB.net

Imports System.ComponentModel
Imports System.IO
Public Class Form197
Dim closea = 1
Private Sub Form197_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Form4.Visible = False
Me.Size = New Size(295, 85)
Me.MaximumSize = New Size(295, 85)
Me.MaximizeBox = Me.MaximizeBox
Me.MinimumSize = New Size(295, 85)
Me.MinimizeBox = Me.MinimizeBox
For Each fichier As String In IO.Directory.GetDirectories(dosprofils)
Dim info As New IO.DirectoryInfo(fichier)
ComboBox1.Items.Add(info.Name)
Next
If ComboBox1.Items.Count = 1 Then
ComboBox1.SelectedIndex = 0
Else
End If
End Sub
Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedValueChanged
Try
Dim sw1 As New StreamWriter(profils)
sw1.WriteLine(ComboBox1.SelectedItem)
sw1.Close()
Catch ex As Exception
Dim sw1 As New StreamWriter(profils)
sw1.WriteLine(ComboBox1.SelectedItem)
sw1.Close()
End Try
Me.Size = New Size(310, 226)
Me.MaximumSize = New Size(310, 226)
Me.MaximizeBox = Me.MaximizeBox
Me.MinimumSize = New Size(310, 226)
Me.MinimizeBox = Me.MinimizeBox
Me.Text = "Profil de " & ComboBox1.SelectedItem
ComboBox1.Hide()
GunaCirclePictureBox1.Image = Image.FromFile(dosprofils & "/" & ComboBox1.SelectedItem & "/photo.png")
GunaCirclePictureBox1.Visible = True
If TimeOfDay.Hour < 12 Then
Label1.Text = "Bonjour; " & ComboBox1.SelectedItem
Label1.Show()
ElseIf TimeOfDay.Hour >= 12 And TimeOfDay.Hour < 19 Then
Label1.Text = "Bonne après midi; " & ComboBox1.SelectedItem
Label1.Show()
ElseIf TimeOfDay.Hour >= 19 Then
Label1.Text = "Bonsoir; " & ComboBox1.SelectedItem
Label1.Show()
End If
coutprofils = ComboBox1.Items.Count
Dim lines1() As String = File.ReadAllLines(dosprofils & "/" & ComboBox1.SelectedItem & "/default.txt")
If lines1(0) = 1 Then
Try
Dim lines1a() As String = File.ReadAllLines(théme)
Form4.BackColor = BackColor
Form4.PictureBox1.BackColor = BackColor
Form4.PictureBox2.BackColor = BackColor
If lines1a(0) = 2 Then
Me.BackColor = Color.FromArgb(64, 64, 64)
Label1.BackColor = Color.FromArgb(64, 64, 64)
GunaCirclePictureBox1.BackColor = Color.FromArgb(64, 64, 64)
Label1.ForeColor = Color.White
Form4.BackColor = BackColor
Form4.PictureBox1.BackColor = BackColor
Form4.PictureBox2.BackColor = BackColor
ElseIf lines1a(0) = 3 Then
Dim lines1b() As String = File.ReadAllLines(themeselect)
Dim lines1c() As String = File.ReadAllLines(dostheme & "\" & lines1b(0) & "\colorplans.txt")
Dim A As String = lines1c(0)
Dim R As String = lines1c(1)
Dim G As String = lines1c(2)
Dim B As String = lines1c(3)
Me.BackColor = Color.FromArgb(A, R, G, B)
Form4.BackColor = Color.FromArgb(A, R, G, B)
Form4.PictureBox1.BackColor = Color.FromArgb(A, R, G, B)
Form4.PictureBox2.BackColor = Color.FromArgb(A, R, G, B)
Form1.colorbackA = A
Form1.colorbackR = R
Form1.colorbackG = G
Form1.colorbackB = B
Dim lines2() As String = File.ReadAllLines(dostheme & "\" & lines1b(0) & "\colorpolice.txt")
Dim A1 As String = lines2(0)
Dim R1 As String = lines2(1)
Dim G1 As String = lines2(2)
Dim B1 As String = lines2(3)
Me.ForeColor = Color.FromArgb(A1, R1, G1, B1)
Label1.ForeColor = Color.FromArgb(A1, R1, G1, B1)
Form1.themeforecoloA = A1
Form1.themeforecoloR = R1
Form1.themeforecoloG = G1
Form1.themeforecoloB = B1
Dim lines3() As String = File.ReadAllLines(dostheme & "\" & lines1b(0) & "\colorprograbar.txt")
Dim A3 As String = lines3(0)
Dim R3 As String = lines3(1)
Dim G3 As String = lines3(2)
Dim B3 As String = lines3(3)
Form1.trackparcolorA = A3
Form1.trackparcolorR = R3
Form1.trackparcolorG = G3
Form1.trackparcolorB = B3
Dim A4 As String = lines3(5)
Dim R4 As String = lines3(6)
Dim G4 As String = lines3(7)
Dim B4 As String = lines3(8)
Form1.trackparproA = A4
Form1.trackparproR = R4
Form1.trackparproG = G4
Form1.trackparproB = B4
End If
Catch ex As Exception
End Try
Else
Try
Dim lines1a() As String = File.ReadAllLines(dosprofils & ComboBox1.SelectedItem & "\théme.txt")
Form4.BackColor = BackColor
Form4.PictureBox1.BackColor = BackColor
Form4.PictureBox2.BackColor = BackColor
If lines1a(0) = 2 Then
Me.BackColor = Color.FromArgb(64, 64, 64)
Label1.BackColor = Color.FromArgb(64, 64, 64)
GunaCirclePictureBox1.BackColor = Color.FromArgb(64, 64, 64)
Label1.ForeColor = Color.White
Form4.BackColor = BackColor
Form4.PictureBox1.BackColor = BackColor
Form4.PictureBox2.BackColor = BackColor
ElseIf lines1a(0) = 3 Then
Dim lines1b() As String = File.ReadAllLines(dosprofils & ComboBox1.SelectedItem & "\Théme\Théme select.txt")
Dim lines1c() As String = File.ReadAllLines(dosprofils & ComboBox1.SelectedItem & "\Théme\" & lines1b(0) & "\colorplans.txt")
Dim A As String = lines1c(0)
Dim R As String = lines1c(1)
Dim G As String = lines1c(2)
Dim B As String = lines1c(3)
Me.BackColor = Color.FromArgb(A, R, G, B)
Form4.BackColor = Color.FromArgb(A, R, G, B)
Form4.PictureBox1.BackColor = Color.FromArgb(A, R, G, B)
Form4.PictureBox2.BackColor = Color.FromArgb(A, R, G, B)
Form1.colorbackA = A
Form1.colorbackR = R
Form1.colorbackG = G
Form1.colorbackB = B
Dim lines2() As String = File.ReadAllLines(dosprofils & ComboBox1.SelectedItem & "\Théme\" & lines1b(0) & "\colorpolice.txt")
Dim A1 As String = lines2(0)
Dim R1 As String = lines2(1)
Dim G1 As String = lines2(2)
Dim B1 As String = lines2(3)
Me.ForeColor = Color.FromArgb(A1, R1, G1, B1)
Label1.ForeColor = Color.FromArgb(A1, R1, G1, B1)
Form1.themeforecoloA = A1
Form1.themeforecoloR = R1
Form1.themeforecoloG = G1
Form1.themeforecoloB = B1
Dim lines3() As String = File.ReadAllLines(dosprofils & ComboBox1.SelectedItem & "\Théme\" & lines1b(0) & "\colorprograbar.txt")
Dim A3 As String = lines3(0)
Dim R3 As String = lines3(1)
Dim G3 As String = lines3(2)
Dim B3 As String = lines3(3)
Form1.trackparcolorA = A3
Form1.trackparcolorR = R3
Form1.trackparcolorG = G3
Form1.trackparcolorB = B3
Dim A4 As String = lines3(5)
Dim R4 As String = lines3(6)
Dim G4 As String = lines3(7)
Dim B4 As String = lines3(8)
Form1.trackparproA = A4
Form1.trackparproR = R4
Form1.trackparproG = G4
Form1.trackparproB = B4
End If
Catch ex As Exception
End Try
repertoire = repertoireavis & "\profils\" & ComboBox1.SelectedItem & "\"
dossérie = repertoire & "\Séries\"
settings1 = repertoire & "settings1.txt"
settings2 = repertoire & "settings2.txt"
settings3 = repertoire & "settings3.txt"
notification = repertoire & "notification.txt"
théme = repertoire & "théme.txt"
historique = repertoire & "historique.txt"
film = repertoire & "\film\"
filmhc = film & "film.txt"
nomprofils = ComboBox1.SelectedItem
Favoris1 = repertoire & "\Favoris\"
Favoris2 = repertoire & "favoris.txt"
setting = film & "setting.txt"
settings4 = film & "setting 2.txt"
settings5 = film & "setting 3.txt"
musique = repertoire & "\musique\"
musiquepar = musique & "paraméttre.txt"
startpage = repertoire & "start page.txt"
discté = repertoire & "\dictée\"
radio = repertoire & "\radio\"
like2 = film & "\like\"
marqueur = repertoire & "\Marqueur\"
dev = repertoire & "dev.txt"
portable = repertoire & "\portable\"
compte = repertoire & "\compte\"
compteco = compte & "compte.txt"
comtpeco2 = compte & "connecter.txt"
localhost = compte & "localhost.txt"
settingcompte = cozip & "/setting.txt"
date1 = compte & "date.txt"
php = compte & "index.php"
dictéenligne = discté & "\en Dicté en ligne\"
dictétemp = repertoire & "dicté temp.txt"
cozip = compte & "\co\"
imgmusique = repertoire & "img.txt"
ettt = repertoire & "éditeur de texte.txt"
marqueurtemp = repertoire & "marqueur temps.txt"
couleur = repertoire & "color.txt"
dosparamètres = repertoire & "\paramètres\"
fichiermisauto = dosparamètres & "mis a jour automatique.txt"
interface1 = dosparamètres & "interface.txt"
dosentère = misajours & "\version présédante\"
utilitairestemp = configbackup & "\utilitaire.txt"
dosplaylist = repertoire & "\playlist\"
fichierinstall = repertoire & "\fichierinstall.txt"
dosprofils = repertoireavis & "profils\"
profils = repertoireavis & "profils.txt"
doscontroleparantal = repertoire & "\Contrôle parental\"
mailcontroleparantal = doscontroleparantal & "\mail.txt"
passcontroleparantal = doscontroleparantal & "\pass.txt"
optioncontrleparantal = doscontroleparantal & "\option.txt"
dostheme = repertoire & "\Théme\"
lecteurnom = lecteurnom & " - " & ComboBox1.SelectedItem
themeselect = dostheme & "\Théme select.txt"
End If
If File.Exists(dosprofils & "/" & ComboBox1.SelectedItem & "\passe.txt") = True Then
Me.Visible = False
Form200.ShowDialog()
Else
Timer1.Start()
End If
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Timer1.Stop()
closea = 0
Close()
End Sub
Private Sub Form197_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
If closea = 1 Then
e.Cancel = True
Else
GunaCirclePictureBox1.Image.Dispose()
Form4.Visible = True
Form11.Visible = False
Form11.Show()
End If
End Sub
End Class