270 lines
11 KiB
VB.net
270 lines
11 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Imports System.Windows.Controls
|
|
Imports MetroSet_UI.Interfaces
|
|
|
|
Public Class Form22
|
|
Dim br As Integer = 0
|
|
Dim bf As Integer = 0
|
|
Dim bs As Integer = 0
|
|
Dim bl As Integer = 0
|
|
Dim bps As Integer = 0
|
|
Dim bds As Integer = 0
|
|
Dim bm As Integer = 0
|
|
Private Sub Form22_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
|
|
Form3.ChromeTabcontrol1.TabPages.Remove(Form3.TabPage18)
|
|
|
|
Label1.Text = "Controle parentaux pour: " & nomprofils
|
|
|
|
GunaCirclePictureBox1.Image = Form3.GunaCirclePictureBox1.Image
|
|
|
|
Dim lines102() As String = File.ReadAllLines(couleur)
|
|
If lines102(0) = 0 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch1.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch2.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch3.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch3.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch4.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch4.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch5.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch6.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch6.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch7.FillColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch7.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
ElseIf lines102(0) = 1 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch1.FillColor = Color.Green
|
|
GunaGoogleSwitch2.FillColor = Color.Green
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch3.FillColor = Color.Green
|
|
GunaGoogleSwitch3.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch4.FillColor = Color.Green
|
|
GunaGoogleSwitch4.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch5.FillColor = Color.Green
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch6.FillColor = Color.Green
|
|
GunaGoogleSwitch6.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch7.FillColor = Color.Green
|
|
GunaGoogleSwitch7.CheckedOnColor = Color.Green
|
|
ElseIf lines102(0) = 2 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch1.FillColor = Color.Blue
|
|
GunaGoogleSwitch2.FillColor = Color.Blue
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch3.FillColor = Color.Blue
|
|
GunaGoogleSwitch3.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch4.FillColor = Color.Blue
|
|
GunaGoogleSwitch4.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch5.FillColor = Color.Blue
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch6.FillColor = Color.Blue
|
|
GunaGoogleSwitch6.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch7.FillColor = Color.Blue
|
|
GunaGoogleSwitch7.CheckedOnColor = Color.Blue
|
|
ElseIf lines102(0) = 3 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch1.FillColor = Color.Red
|
|
GunaGoogleSwitch2.FillColor = Color.Red
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch3.FillColor = Color.Red
|
|
GunaGoogleSwitch3.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch4.FillColor = Color.Red
|
|
GunaGoogleSwitch4.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch5.FillColor = Color.Red
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch6.FillColor = Color.Red
|
|
GunaGoogleSwitch6.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch7.FillColor = Color.Red
|
|
GunaGoogleSwitch7.CheckedOnColor = Color.Red
|
|
End If
|
|
|
|
Dim lines2() As String = File.ReadAllLines(théme)
|
|
If lines2(0) = 2 Then
|
|
Me.BackColor = Color.FromArgb(64, 64, 64)
|
|
Button1.BackColor = Color.FromArgb(64, 64, 64)
|
|
Button2.BackColor = Color.FromArgb(64, 64, 64)
|
|
Button1.ForeColor = Color.White
|
|
Button2.ForeColor = Color.White
|
|
Label1.ForeColor = Color.White
|
|
Label2.ForeColor = Color.White
|
|
Label3.ForeColor = Color.White
|
|
Label4.ForeColor = Color.White
|
|
Label5.ForeColor = Color.White
|
|
Label6.ForeColor = Color.White
|
|
Label7.ForeColor = Color.White
|
|
Label8.ForeColor = Color.White
|
|
ElseIf lines2(0) = 3 Then
|
|
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Button1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Button2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
Button1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Button2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label3.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label4.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label5.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label6.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label7.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label8.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
End If
|
|
|
|
Dim lines1() As String = File.ReadAllLines(optioncontrleparantal)
|
|
If lines1(0) = 1 Then
|
|
GunaGoogleSwitch1.Checked = True
|
|
End If
|
|
|
|
If lines1(1) = 1 Then
|
|
GunaGoogleSwitch2.Checked = True
|
|
End If
|
|
|
|
If lines1(2) = 1 Then
|
|
GunaGoogleSwitch3.Checked = True
|
|
End If
|
|
|
|
If lines1(3) = 1 Then
|
|
GunaGoogleSwitch4.Checked = True
|
|
End If
|
|
|
|
If lines1(4) = 1 Then
|
|
GunaGoogleSwitch5.Checked = True
|
|
End If
|
|
|
|
If lines1(5) = 1 Then
|
|
GunaGoogleSwitch6.Checked = True
|
|
End If
|
|
|
|
If lines1(6) = 1 Then
|
|
GunaGoogleSwitch7.Checked = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form22_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
Dim sw1 As New StreamWriter(optioncontrleparantal)
|
|
sw1.WriteLine(br)
|
|
sw1.WriteLine(bf)
|
|
sw1.WriteLine(bs)
|
|
sw1.WriteLine(bl)
|
|
sw1.WriteLine(bps)
|
|
sw1.WriteLine(bds)
|
|
sw1.WriteLine(bm)
|
|
sw1.Close()
|
|
If br = 1 Then
|
|
Form1.ComboBox1.Enabled = False
|
|
Form1.Button3.Enabled = False
|
|
Form8.ComboBox1.Enabled = False
|
|
Else
|
|
Form1.ComboBox1.Enabled = True
|
|
Form1.Button3.Enabled = True
|
|
Form8.ComboBox1.Enabled = True
|
|
End If
|
|
|
|
If bl = 1 Then
|
|
Form3.ChromeTabcontrol1.TabPages.Remove(Form3.TabPage18)
|
|
Else
|
|
Form3.ChromeTabcontrol1.TabPages.Add(Form3.TabPage18)
|
|
End If
|
|
|
|
If bps = 1 Then
|
|
Form12.PlaylistStoreToolStripMenuItem.Visible = False
|
|
Else
|
|
Form12.PlaylistStoreToolStripMenuItem.Visible = True
|
|
End If
|
|
|
|
If bds = 1 Then
|
|
Form21.DictéToolStripMenuItem.Visible = False
|
|
Else
|
|
Form21.DictéToolStripMenuItem.Visible = True
|
|
End If
|
|
|
|
If bm = 1 Then
|
|
Form1.MusiqueStreamingToolStripMenuItem1.Visible = False
|
|
Else
|
|
Form1.MusiqueStreamingToolStripMenuItem1.Visible = True
|
|
End If
|
|
|
|
Form23.Close()
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch1_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch1.CheckedChanged
|
|
If GunaGoogleSwitch1.Checked = True Then
|
|
br = 1
|
|
Else
|
|
br = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch2_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch2.CheckedChanged
|
|
If GunaGoogleSwitch2.Checked = True Then
|
|
Button1.Visible = True
|
|
bf = 1
|
|
Else
|
|
Button1.Visible = False
|
|
For Each fichier As String In IO.Directory.GetFiles(doscontroleparantal & "\film\")
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(doscontroleparantal & "\film\" & info.Name)
|
|
Next
|
|
bf = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch3_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch3.CheckedChanged
|
|
If GunaGoogleSwitch3.Checked = True Then
|
|
Button2.Visible = True
|
|
bs = 1
|
|
Else
|
|
Button2.Visible = False
|
|
For Each fichier As String In IO.Directory.GetFiles(doscontroleparantal & "\Séries\")
|
|
Dim info As New IO.FileInfo(fichier)
|
|
File.Delete(doscontroleparantal & "\Séries\" & info.Name)
|
|
Next
|
|
bs = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch4_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch4.CheckedChanged
|
|
If GunaGoogleSwitch4.Checked = True Then
|
|
bl = 1
|
|
Else
|
|
bl = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch5_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch5.CheckedChanged
|
|
If GunaGoogleSwitch5.Checked = True Then
|
|
bps = 1
|
|
Else
|
|
bps = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch6_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch6.CheckedChanged
|
|
If GunaGoogleSwitch6.Checked = True Then
|
|
bds = 1
|
|
Else
|
|
bds = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch7_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch7.CheckedChanged
|
|
If GunaGoogleSwitch7.Checked = True Then
|
|
bm = 1
|
|
Else
|
|
bm = 0
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
Form33.optas = 0
|
|
Form33.ShowDialog()
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
|
Form33.optas = 1
|
|
Form33.ShowDialog()
|
|
End Sub
|
|
End Class |