159 lines
6.8 KiB
VB.net
159 lines
6.8 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
Public Class Form13
|
|
Dim volume As Integer = 0
|
|
Dim vch As Integer = 0
|
|
Dim vmp As Integer = 0
|
|
Dim plans As Integer = 0
|
|
|
|
Private Sub Form13_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)
|
|
CheckBox1.BackColor = Color.FromArgb(64, 64, 64)
|
|
CheckBox1.ForeColor = Color.White
|
|
GunaLabel1.ForeColor = Color.White
|
|
GunaLabel2.ForeColor = Color.White
|
|
GunaLabel3.ForeColor = Color.White
|
|
GunaLabel4.ForeColor = Color.White
|
|
GunaLabel9.ForeColor = Color.White
|
|
GunaLabel10.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)
|
|
CheckBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
CheckBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel3.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel4.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel9.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
GunaLabel10.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)
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.FromArgb(255, 128, 0)
|
|
GunaGoogleSwitch2.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
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch2.FillColor = Color.Green
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Green
|
|
GunaGoogleSwitch5.FillColor = Color.Green
|
|
ElseIf lines429(0) = 2 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch1.FillColor = Color.Blue
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch2.FillColor = Color.Blue
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Blue
|
|
GunaGoogleSwitch5.FillColor = Color.Blue
|
|
ElseIf lines429(0) = 3 Then
|
|
GunaGoogleSwitch1.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch1.FillColor = Color.Red
|
|
GunaGoogleSwitch2.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch2.FillColor = Color.Red
|
|
GunaGoogleSwitch5.CheckedOnColor = Color.Red
|
|
GunaGoogleSwitch5.FillColor = Color.Red
|
|
End If
|
|
|
|
|
|
ComboBox1.Enabled = False
|
|
|
|
Dim lines() As String = File.ReadAllLines(settings3)
|
|
If lines(0) <> 0 Then
|
|
CheckBox1.Checked = True
|
|
ComboBox1.Text = lines(0)
|
|
ComboBox1.Enabled = True
|
|
End If
|
|
If lines(1) = 1 Then
|
|
GunaGoogleSwitch5.Checked = True
|
|
End If
|
|
If lines(2) = 1 Then
|
|
GunaGoogleSwitch1.Checked = True
|
|
End If
|
|
If lines(3) = 1 Then
|
|
GunaGoogleSwitch2.Checked = True
|
|
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 Form13_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
Dim msg = MsgBox("Voulez-vous enregistrer ?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Dim sw As New StreamWriter(settings3)
|
|
sw.WriteLine(volume)
|
|
sw.WriteLine(vch)
|
|
sw.WriteLine(vmp)
|
|
sw.WriteLine(plans)
|
|
sw.Close()
|
|
If vch = 1 Then
|
|
Form12.TextBox1.Show()
|
|
ElseIf vch = 0 Then
|
|
Form12.TextBox1.Hide()
|
|
ElseIf vmp = 1 Then
|
|
Form12.ListBox1.Show()
|
|
ElseIf vmp = 0 Then
|
|
Form12.ListBox1.Hide()
|
|
ElseIf plans = 1 Then
|
|
Form12.TopMost = True
|
|
ElseIf plans = 0 Then
|
|
Form12.TopMost = False
|
|
End If
|
|
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
|
|
vch = 1
|
|
GunaLabel10.Text = "Activé"
|
|
Else
|
|
vch = 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
|
|
vmp = 1
|
|
GunaLabel1.Text = "Activé"
|
|
Else
|
|
vmp = 0
|
|
GunaLabel1.Text = "Désactivé"
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub GunaGoogleSwitch2_CheckedChanged(sender As Object, e As EventArgs) Handles GunaGoogleSwitch2.CheckedChanged
|
|
If GunaGoogleSwitch2.Checked = True Then
|
|
plans = 1
|
|
GunaLabel3.Text = "Activé"
|
|
Else
|
|
plans = 0
|
|
GunaLabel3.Text = "Désactivé"
|
|
End If
|
|
End Sub
|
|
End Class |