Imports System.ComponentModel Imports System.IO Public Class Form9 Dim volume As Integer = 0 Dim plan As Integer = 0 Dim vradio As Integer = 0 Private Sub Form9_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim lines1a() As String = File.ReadAllLines(théme) If lines1a(0) = 2 Then Me.BackColor = Color.FromArgb(64, 64, 64) GunaLabel1.ForeColor = Color.White GunaLabel10.ForeColor = Color.White CheckBox1.ForeColor = Color.White GunaLabel9.ForeColor = Color.White GunaLabel2.ForeColor = Color.White ComboBox1.BackColor = Color.FromArgb(64, 64, 64) ComboBox1.ForeColor = Color.White ElseIf lines1a(0) = 3 Then Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB) GunaLabel1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) GunaLabel10.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) CheckBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) GunaLabel9.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) GunaLabel2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) ComboBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB) ComboBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB) Else End If Dim lines429() As String = File.ReadAllLines(couleur) If lines429(0) = 0 Then GunaGoogleSwitch1.CheckedOnColor = Color.FromArgb(255, 128, 0) GunaGoogleSwitch1.FillColor = Color.FromArgb(255, 128, 0) GunaGoogleSwitch5.CheckedOnColor = Color.FromArgb(255, 128, 0) GunaGoogleSwitch5.FillColor = Color.FromArgb(255, 128, 0) ElseIf lines429(0) = 1 Then GunaGoogleSwitch1.CheckedOnColor = Color.Green GunaGoogleSwitch1.FillColor = Color.Green GunaGoogleSwitch5.CheckedOnColor = Color.Green GunaGoogleSwitch5.FillColor = Color.Green ElseIf lines429(0) = 2 Then GunaGoogleSwitch1.CheckedOnColor = Color.Blue GunaGoogleSwitch1.FillColor = Color.Blue GunaGoogleSwitch5.CheckedOnColor = Color.Blue GunaGoogleSwitch5.FillColor = Color.Blue ElseIf lines429(0) = 3 Then GunaGoogleSwitch1.CheckedOnColor = Color.Red GunaGoogleSwitch1.FillColor = Color.Red GunaGoogleSwitch5.CheckedOnColor = Color.Red GunaGoogleSwitch5.FillColor = Color.Red End If ComboBox1.Enabled = False Dim lines1() As String = File.ReadAllLines(settings2) If lines1(0) <> 0 Then CheckBox1.Checked = True ComboBox1.Text = lines1(0) Else CheckBox1.Checked = False End If If lines1(1) = 1 Then GunaGoogleSwitch5.Checked = True Else GunaGoogleSwitch5.Checked = False End If If lines1(2) = 1 Then GunaGoogleSwitch1.Checked = True Else GunaGoogleSwitch1.Checked = False End If End Sub Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked = True Then ComboBox1.Enabled = True ComboBox1.SelectedItem = "50" Else ComboBox1.Enabled = False ComboBox1.SelectedItem = " " End If End Sub Private Sub Form9_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing Dim msg = MsgBox("Voulez-vous enregistrer ?", MsgBoxStyle.YesNo) If msg = MsgBoxResult.Yes Then If CheckBox1.Checked = True Then volume = ComboBox1.Text.ToString End If Dim sw As New StreamWriter(settings2) sw.WriteLine(volume) sw.WriteLine(plan) sw.WriteLine(vradio) sw.Close() MsgBox("Les paramètres ont bien été enregistrer", MsgBoxStyle.Information) Else End If End Sub Private Sub GunaGoogleSwitch5_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch5.CheckedChanged If GunaGoogleSwitch5.Checked = True Then Form8.TopMost = True plan = 1 GunaLabel10.Text = "Activer" Else Form8.TopMost = False plan = 0 GunaLabel10.Text = "Désactivé" End If End Sub Private Sub GunaGoogleSwitch1_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch1.CheckedChanged If GunaGoogleSwitch1.Checked = True Then Form8.ComboBox1.Show() vradio = 1 GunaLabel1.Text = "Activer" Else Form8.ComboBox1.Hide() vradio = 0 GunaLabel1.Text = "Désactivé" End If End Sub End Class