216 lines
10 KiB
VB.net
216 lines
10 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.IO
|
|
|
|
Public Class Form35
|
|
Private Sub PictureBox13_Click(sender As Object, e As EventArgs) Handles PictureBox13.Click
|
|
If ColorDialog1.ShowDialog = 1 Then
|
|
PictureBox13.BackColor = ColorDialog1.Color
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox11_Click(sender As Object, e As EventArgs) Handles PictureBox11.Click
|
|
If ComboBox2.SelectedItem = "Clair" Then
|
|
|
|
ElseIf ComboBox2.SelectedItem = "Sombre" Then
|
|
|
|
Else
|
|
If ColorDialog1.ShowDialog = 1 Then
|
|
PictureBox11.BackColor = ColorDialog1.Color
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form35_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
ComboBox1.SelectedIndex = 1
|
|
ComboBox2.SelectedIndex = 2
|
|
Dim lines102() As String = File.ReadAllLines(couleur)
|
|
If lines102(0) = 0 Then
|
|
ChromeTabcontrol2.SquareColor = Color.FromArgb(255, 128, 0)
|
|
ElseIf lines102(0) = 1 Then
|
|
ChromeTabcontrol2.SquareColor = Color.Green
|
|
ElseIf lines102(0) = 2 Then
|
|
ChromeTabcontrol2.SquareColor = Color.Blue
|
|
ElseIf lines102(0) = 3 Then
|
|
ChromeTabcontrol2.SquareColor = Color.Red
|
|
End If
|
|
Dim lines1a() As String = File.ReadAllLines(théme)
|
|
|
|
If lines1a(0) = 2 Then
|
|
Me.BackColor = Color.FromArgb(64, 64, 64)
|
|
TextBox1.BackColor = Color.FromArgb(64, 64, 64)
|
|
ComboBox1.BackColor = Color.FromArgb(64, 64, 64)
|
|
ComboBox2.BackColor = Color.FromArgb(64, 64, 64)
|
|
ForeColor = Color.White
|
|
TextBox1.ForeColor = Color.White
|
|
ComboBox1.ForeColor = Color.White
|
|
ComboBox2.ForeColor = Color.White
|
|
Label1.ForeColor = Color.White
|
|
ElseIf lines1a(0) = 3 Then
|
|
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
TextBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
ComboBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
ComboBox2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
|
ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
TextBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
ComboBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
ComboBox2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
Label1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox2.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox3.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox4.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox5.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox6.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox7.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox7.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox8_Click(sender As Object, e As EventArgs) Handles PictureBox8.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox8.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox9.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox9.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox10_Click(sender As Object, e As EventArgs) Handles PictureBox10.Click
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox10.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox12_Click(sender As Object, e As EventArgs) Handles PictureBox12.Click
|
|
If ComboBox1.SelectedItem = "Oui" Then
|
|
If OpenFileDialog1.ShowDialog = 1 Then
|
|
PictureBox12.Image = Image.FromFile(OpenFileDialog1.FileName)
|
|
End If
|
|
Else
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form35_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
|
If TextBox1.Text = "" Then
|
|
|
|
Else
|
|
Dim msg = MsgBox("Voulez-vous créer le thème: " & TextBox1.Text, MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Try
|
|
Directory.CreateDirectory(dostheme & "\" & TextBox1.Text & "\")
|
|
PictureBox1.Image.Save(dostheme & "\" & TextBox1.Text & "\btplay.png")
|
|
PictureBox2.Image.Save(dostheme & "\" & TextBox1.Text & "\btpause.png")
|
|
PictureBox3.Image.Save(dostheme & "\" & TextBox1.Text & "\btstop.png")
|
|
PictureBox4.Image.Save(dostheme & "\" & TextBox1.Text & "\btpleinécran.png")
|
|
PictureBox5.Image.Save(dostheme & "\" & TextBox1.Text & "\btlike.png")
|
|
PictureBox6.Image.Save(dostheme & "\" & TextBox1.Text & "\btdislike.png")
|
|
PictureBox7.Image.Save(dostheme & "\" & TextBox1.Text & "\bttéléchargement.png")
|
|
PictureBox8.Image.Save(dostheme & "\" & TextBox1.Text & "\btsuivant.png")
|
|
PictureBox9.Image.Save(dostheme & "\" & TextBox1.Text & "\btprésédent.png")
|
|
PictureBox10.Image.Save(dostheme & "\" & TextBox1.Text & "\btvolumemute.png")
|
|
Dim sw1 As New StreamWriter(dostheme & "\" & TextBox1.Text & "\colorpolice.txt")
|
|
sw1.WriteLine(PictureBox13.BackColor.A)
|
|
sw1.WriteLine(PictureBox13.BackColor.R)
|
|
sw1.WriteLine(PictureBox13.BackColor.G)
|
|
sw1.WriteLine(PictureBox13.BackColor.B)
|
|
sw1.Close()
|
|
|
|
Dim sw2 As New StreamWriter(dostheme & "\" & TextBox1.Text & "\colorplans.txt")
|
|
sw2.WriteLine(PictureBox11.BackColor.A)
|
|
sw2.WriteLine(PictureBox11.BackColor.R)
|
|
sw2.WriteLine(PictureBox11.BackColor.G)
|
|
sw2.WriteLine(PictureBox11.BackColor.B)
|
|
sw2.Close()
|
|
|
|
Dim sw3 As New StreamWriter(dostheme & "\" & TextBox1.Text & "\colorprograbar.txt")
|
|
sw3.WriteLine(PictureBox14.BackColor.A)
|
|
sw3.WriteLine(PictureBox14.BackColor.R)
|
|
sw3.WriteLine(PictureBox14.BackColor.G)
|
|
sw3.WriteLine(PictureBox14.BackColor.B)
|
|
sw3.WriteLine(" ")
|
|
sw3.WriteLine(PictureBox15.BackColor.A)
|
|
sw3.WriteLine(PictureBox15.BackColor.R)
|
|
sw3.WriteLine(PictureBox15.BackColor.G)
|
|
sw3.WriteLine(PictureBox15.BackColor.B)
|
|
sw3.Close()
|
|
|
|
If ComboBox1.SelectedIndex = 0 Then
|
|
PictureBox12.Image.Save(dostheme & "\" & TextBox1.Text & "\backgroud.png")
|
|
End If
|
|
|
|
Form3.ComboBox3.Items.Add(TextBox1.Text)
|
|
|
|
MsgBox("Le thème: " & TextBox1.Text & " a bien été créer", MsgBoxStyle.Information)
|
|
Catch ex As Exception
|
|
MsgBox("Une erreur est survenue soit le nom du thème contient de caractère interdit ou le thème existe déjà", MsgBoxStyle.Exclamation)
|
|
End Try
|
|
Else
|
|
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox14_Click(sender As Object, e As EventArgs) Handles PictureBox14.Click
|
|
If ColorDialog1.ShowDialog = 1 Then
|
|
PictureBox14.BackColor = ColorDialog1.Color
|
|
GunaMetroTrackBar1.TrackIdleColor = ColorDialog1.Color
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub PictureBox15_Click(sender As Object, e As EventArgs) Handles PictureBox15.Click
|
|
If ColorDialog1.ShowDialog = 1 Then
|
|
PictureBox15.BackColor = ColorDialog1.Color
|
|
GunaMetroTrackBar1.TrackColor = ColorDialog1.Color
|
|
GunaMetroTrackBar1.TrackHoverColor = ColorDialog1.Color
|
|
GunaMetroTrackBar1.TrackPressedColor = ColorDialog1.Color
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub ComboBox2_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedValueChanged
|
|
If ComboBox2.SelectedItem = "Clair" Then
|
|
PictureBox11.BackColor = System.Drawing.SystemColors.Control
|
|
ElseIf ComboBox2.SelectedItem = "Sombre" Then
|
|
PictureBox11.BackColor = Color.FromArgb(64, 64, 64)
|
|
Else
|
|
PictureBox11.BackColor = System.Drawing.SystemColors.Control
|
|
End If
|
|
End Sub
|
|
End Class |