first commit
This commit is contained in:
@@ -0,0 +1,351 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
|
||||
Public Class informationplaylist
|
||||
Private Sub informationplaylist_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)
|
||||
Label1.BackColor = Color.FromArgb(64, 64, 64)
|
||||
Label2.BackColor = Color.FromArgb(64, 64, 64)
|
||||
Label3.BackColor = Color.FromArgb(64, 64, 64)
|
||||
Label4.BackColor = Color.FromArgb(64, 64, 64)
|
||||
Label5.BackColor = Color.FromArgb(64, 64, 64)
|
||||
ListBox1.BackColor = Color.FromArgb(64, 64, 64)
|
||||
Label1.ForeColor = Color.White
|
||||
Label2.ForeColor = Color.White
|
||||
Label3.ForeColor = Color.White
|
||||
Label4.ForeColor = Color.White
|
||||
Label5.ForeColor = Color.White
|
||||
ListBox1.ForeColor = Color.White
|
||||
ElseIf lines1a(0) = 3 Then
|
||||
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
Label1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
Label2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
Label3.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
Label4.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
Label5.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
ListBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
|
||||
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)
|
||||
ListBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If payliststorelit = 0 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox1.SelectedItem
|
||||
Dim maj As New WebClient
|
||||
Dim vri As String = maj.DownloadString(ipserver & "/playlist/autre/" & playliststore.ListBox1.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox1.SelectedItem
|
||||
If vri = "" Then
|
||||
Timer2.Start()
|
||||
Else
|
||||
Label5.Text = vri
|
||||
dlmusique()
|
||||
End If
|
||||
ElseIf payliststorelit = 1 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox2.SelectedItem
|
||||
Dim maj2 As New WebClient
|
||||
Dim vri2 As String = maj2.DownloadString(ipserver & "/playlist/classique/" & playliststore.ListBox2.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox2.SelectedItem
|
||||
If vri2 = "" Then
|
||||
Timer3.Start()
|
||||
Else
|
||||
Label5.Text = vri2
|
||||
dlmusique()
|
||||
End If
|
||||
ElseIf payliststorelit = 2 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox3.SelectedItem
|
||||
Dim maj3 As New WebClient
|
||||
Dim vri3 As String = maj3.DownloadString(ipserver & "/playlist/jazz/" & playliststore.ListBox3.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox3.SelectedItem
|
||||
If vri3 = "" Then
|
||||
Timer4.Start()
|
||||
Else
|
||||
Label5.Text = vri3
|
||||
dlmusique()
|
||||
End If
|
||||
ElseIf payliststorelit = 3 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox4.SelectedItem
|
||||
Dim maj4 As New WebClient
|
||||
Dim vri4 As String = maj4.DownloadString(ipserver & "/playlist/rap/" & playliststore.ListBox4.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox4.SelectedItem
|
||||
If vri4 = "" Then
|
||||
Timer5.Start()
|
||||
Else
|
||||
Label5.Text = vri4
|
||||
dlmusique()
|
||||
End If
|
||||
ElseIf payliststorelit = 4 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox5.SelectedItem
|
||||
Dim maj5 As New WebClient
|
||||
Dim vri5 As String = maj5.DownloadString(ipserver & "/playlist/youtube/" & playliststore.ListBox5.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox5.SelectedItem
|
||||
If vri5 = "" Then
|
||||
Timer6.Start()
|
||||
Else
|
||||
Label5.Text = vri5
|
||||
dlmusique()
|
||||
End If
|
||||
ElseIf payliststorelit = 5 Then
|
||||
Me.Text = "Information de " & playliststore.ListBox6.SelectedItem
|
||||
Dim maj6 As New WebClient
|
||||
Dim vri6 As String = maj6.DownloadString(ipserver & "/playlist/libre de droit/" & playliststore.ListBox6.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox6.SelectedItem
|
||||
If vri6 = "" Then
|
||||
Timer7.Start()
|
||||
Else
|
||||
Label5.Text = vri6
|
||||
dlmusique()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Sub dlmusique()
|
||||
If payliststorelit = 0 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/autre/" & playliststore.ListBox1.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 1 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/classique/" & playliststore.ListBox2.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 2 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/jazz/" & playliststore.ListBox3.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 3 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/rap/" & playliststore.ListBox4.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 4 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/youtube/" & playliststore.ListBox5.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 5 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/libre de droit/" & playliststore.ListBox6.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
|
||||
Timer1.Stop()
|
||||
If payliststorelit = 0 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/autre/" & playliststore.ListBox1.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 1 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/classique/" & playliststore.ListBox2.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 2 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/jazz/" & playliststore.ListBox3.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 3 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/rap/" & playliststore.ListBox4.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 4 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/youtube/" & playliststore.ListBox5.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
ElseIf payliststorelit = 5 Then
|
||||
Try
|
||||
My.Computer.Network.DownloadFile(ipsite & "/playlist/libre de droit/" & playliststore.ListBox6.SelectedItem & "/musique.txt", dosplaylist & "musique.txt")
|
||||
Dim sr As New StreamReader(dosplaylist & "musique.txt")
|
||||
While (sr.Peek >= 0)
|
||||
ListBox1.Items.Add(sr.ReadLine)
|
||||
End While
|
||||
sr.Close()
|
||||
File.Delete(dosplaylist & "musique.txt")
|
||||
Catch ex As Exception
|
||||
Timer1.Start()
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub informationplaylist_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
ListBox1.Items.Clear()
|
||||
payliststorelit = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
|
||||
Timer2.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox1.SelectedItem
|
||||
Dim maj As New WebClient
|
||||
Dim vri As String = maj.DownloadString(ipserver & "/playlist/autre/" & playliststore.ListBox1.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox1.SelectedItem
|
||||
If vri = "" Then
|
||||
Timer2.Start()
|
||||
Else
|
||||
Label5.Text = vri
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
|
||||
Timer3.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox2.SelectedItem
|
||||
Dim maj2 As New WebClient
|
||||
Dim vri2 As String = maj2.DownloadString(ipserver & "/playlist/classique/" & playliststore.ListBox2.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox2.SelectedItem
|
||||
If vri2 = "" Then
|
||||
Timer3.Start()
|
||||
Else
|
||||
Label5.Text = vri2
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
|
||||
Timer4.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox3.SelectedItem
|
||||
Dim maj3 As New WebClient
|
||||
Dim vri3 As String = maj3.DownloadString(ipserver & "/playlist/jazz/" & playliststore.ListBox3.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox3.SelectedItem
|
||||
If vri3 = "" Then
|
||||
Timer4.Start()
|
||||
Else
|
||||
Label5.Text = vri3
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer5_Tick(sender As Object, e As EventArgs) Handles Timer5.Tick
|
||||
Timer5.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox4.SelectedItem
|
||||
Dim maj4 As New WebClient
|
||||
Dim vri4 As String = maj4.DownloadString(ipserver & "/playlist/rap/" & playliststore.ListBox4.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox4.SelectedItem
|
||||
If vri4 = "" Then
|
||||
Timer5.Start()
|
||||
Else
|
||||
Label5.Text = vri4
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer6_Tick(sender As Object, e As EventArgs) Handles Timer6.Tick
|
||||
Timer6.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox5.SelectedItem
|
||||
Dim maj5 As New WebClient
|
||||
Dim vri5 As String = maj5.DownloadString(ipserver & "/playlist/youtube/" & playliststore.ListBox5.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox5.SelectedItem
|
||||
If vri5 = "" Then
|
||||
Timer6.Start()
|
||||
Else
|
||||
Label5.Text = vri5
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Timer7_Tick(sender As Object, e As EventArgs) Handles Timer7.Tick
|
||||
Timer7.Stop()
|
||||
Me.Text = "Information de " & playliststore.ListBox6.SelectedItem
|
||||
Dim maj6 As New WebClient
|
||||
Dim vri6 As String = maj6.DownloadString(ipserver & "/playlist/libre de droit/" & playliststore.ListBox6.SelectedItem & "/info.txt")
|
||||
Label2.Text = playliststore.ListBox6.SelectedItem
|
||||
If vri6 = "" Then
|
||||
Timer7.Start()
|
||||
Else
|
||||
Label5.Text = vri6
|
||||
dlmusique()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user