Files
Lecteur-media/lecteur/lecteur média/Form25.vb
T
2026-06-18 14:15:48 +02:00

1934 lines
96 KiB
VB.net

Imports System.ComponentModel
Imports System.IO
Imports System.Net
Imports AxWMPLib
Public Class Form25
Public nomutilisateur As String = ""
Dim listb2ab As Integer = 0
Private Sub Form25_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ListBox9.Hide()
Dim lines1() As String = File.ReadAllLines(théme)
If lines1(0) = 2 Then
Me.BackColor = Color.FromArgb(64, 64, 64)
ContextMenuStrip1.BackColor = Color.FromArgb(64, 64, 64)
ContextMenuStrip2.BackColor = Color.FromArgb(64, 64, 64)
ComboBox1.BackColor = Color.FromArgb(64, 64, 64)
ContextMenuStrip1.ForeColor = Color.White
ContextMenuStrip2.ForeColor = Color.White
ComboBox1.ForeColor = Color.White
ListBox1.BackColor = Color.FromArgb(64, 64, 64)
ListBox2.BackColor = Color.FromArgb(64, 64, 64)
ListBox3.BackColor = Color.FromArgb(64, 64, 64)
ListBox4.BackColor = Color.FromArgb(64, 64, 64)
ListBox5.BackColor = Color.FromArgb(64, 64, 64)
ListBox6.BackColor = Color.FromArgb(64, 64, 64)
ListBox7.BackColor = Color.FromArgb(64, 64, 64)
ListBox8.BackColor = Color.FromArgb(64, 64, 64)
ListBox1.ForeColor = Color.White
ListBox2.ForeColor = Color.White
ListBox3.ForeColor = Color.White
ListBox4.ForeColor = Color.White
ListBox5.ForeColor = Color.White
ListBox6.ForeColor = Color.White
ListBox7.ForeColor = Color.White
ListBox8.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
Label9.ForeColor = Color.White
Label10.ForeColor = Color.White
Label11.ForeColor = Color.White
MenuStrip1.BackColor = Color.FromArgb(64, 64, 64)
OuvrirLesOptionToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
QuitterToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
QuitterMusiqueStreamingToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
ToutQuitterToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
FenêtreToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
MinimiserToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
TabPage1.BackColor = Color.FromArgb(64, 64, 64)
TabPage2.BackColor = Color.FromArgb(64, 64, 64)
TabPage3.BackColor = Color.FromArgb(64, 64, 64)
TabPage4.BackColor = Color.FromArgb(64, 64, 64)
TabPage5.BackColor = Color.FromArgb(64, 64, 64)
TabPage6.BackColor = Color.FromArgb(64, 64, 64)
TabPage7.BackColor = Color.FromArgb(64, 64, 64)
MenuStrip1.ForeColor = Color.White
OuvrirLesOptionToolStripMenuItem.ForeColor = Color.White
QuitterToolStripMenuItem.ForeColor = Color.White
QuitterMusiqueStreamingToolStripMenuItem.ForeColor = Color.White
ToutQuitterToolStripMenuItem.ForeColor = Color.White
MinimiserToolStripMenuItem.ForeColor = Color.White
MisEnLigneToolStripMenuItem.BackColor = Color.FromArgb(64, 64, 64)
MisEnLigneToolStripMenuItem.ForeColor = Color.White
Label4.BackColor = Color.FromArgb(64, 64, 64)
Label5.BackColor = Color.FromArgb(64, 64, 64)
Label6.BackColor = Color.FromArgb(64, 64, 64)
Label7.BackColor = Color.FromArgb(64, 64, 64)
Label8.BackColor = Color.FromArgb(64, 64, 64)
Label9.BackColor = Color.FromArgb(64, 64, 64)
Label10.BackColor = Color.FromArgb(64, 64, 64)
Label11.BackColor = Color.FromArgb(64, 64, 64)
ElseIf lines1(0) = 3 Then
PictureBox7.Image = Form1.PictureBox10.Image
PictureBox1.Image = Form1.PictureBox7.Image
PictureBox2.Image = Form1.PictureBox4.Image
PictureBox3.Image = Form1.PictureBox5.Image
GunaTrackBar1.TrackColor = Color.FromArgb(Form1.trackparproA, Form1.trackparproR, Form1.trackparproG, Form1.trackparproB)
GunaTrackBar1.TrackHoverColor = Color.FromArgb(Form1.trackparproA, Form1.trackparproR, Form1.trackparproG, Form1.trackparproB)
GunaTrackBar1.TrackPressedColor = Color.FromArgb(Form1.trackparproA, Form1.trackparproR, Form1.trackparproG, Form1.trackparproB)
GunaTrackBar1.TrackIdleColor = Color.FromArgb(Form1.trackparcolorA, Form1.trackparcolorR, Form1.trackparcolorG, Form1.trackparcolorB)
Me.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ComboBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ContextMenuStrip1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ContextMenuStrip2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ContextMenuStrip1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ContextMenuStrip2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox3.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox4.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox5.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox6.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox7.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox8.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ListBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox2.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox3.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox4.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox5.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox6.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox7.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ListBox8.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)
Label9.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
Label10.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
Label11.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ComboBox1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
MenuStrip1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
MenuStrip1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
OuvrirLesOptionToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
QuitterToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
QuitterMusiqueStreamingToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
ToutQuitterToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
FenêtreToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
MinimiserToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage1.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage2.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage3.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage4.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage5.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage6.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
TabPage7.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
MenuStrip1.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
OuvrirLesOptionToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
QuitterToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
QuitterMusiqueStreamingToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
ToutQuitterToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
MinimiserToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
MisEnLigneToolStripMenuItem.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
MisEnLigneToolStripMenuItem.ForeColor = Color.FromArgb(Form1.themeforecoloA, Form1.themeforecoloR, Form1.themeforecoloG, Form1.themeforecoloB)
Label4.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label5.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label6.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label7.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label8.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label9.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label10.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
Label11.BackColor = Color.FromArgb(Form1.colorbackA, Form1.colorbackR, Form1.colorbackG, Form1.colorbackB)
End If
Dim lines2() As String = File.ReadAllLines(musiquepar)
If lines2(0) = 1 Then
PictureBox5.Show()
Else
PictureBox5.Hide()
End If
Label3.Text = AxWindowsMediaPlayer1.settings.volume & "%"
Dim lines3() As String = File.ReadAllLines(comtpeco2)
If lines3(0) = 0 Then
MisEnLigneToolStripMenuItem.Visible = False
TabControl2.TabPages.Remove(TabPage9)
ftp()
Else
MisEnLigneToolStripMenuItem.Visible = True
Dim lines4() As String = File.ReadAllLines(compteco)
nomutilisateur = lines4(0)
vérifico()
End If
End Sub
Sub ftp2()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Rap/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox2.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox2.Items.Count = 0 Then
Label5.Show()
Else
Label5.Hide()
End If
ftp3()
End Sub
Sub ftp3()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Classique/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox3.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox3.Items.Count = 0 Then
Label6.Show()
Else
Label6.Hide()
End If
ftp4()
End Sub
Sub ftp4()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Pop/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox4.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox4.Items.Count = 0 Then
Label7.Show()
Else
Label7.Hide()
End If
ftp5()
End Sub
Sub ftp5()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Youtube/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox5.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox5.Items.Count = 0 Then
Label8.Show()
Else
Label8.Hide()
End If
ftp6()
End Sub
Sub ftp6()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Jazz/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox6.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox6.Items.Count = 0 Then
Label9.Show()
Else
Label9.Hide()
End If
ftp7()
End Sub
Sub ftp7()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Libre de droit/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox7.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox7.Items.Count = 0 Then
Label10.Show()
Else
Label10.Hide()
End If
ftp8()
End Sub
Private Sub Form25_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
Dim lines() As String = File.ReadAllLines(settings1)
If BCstart = 1 Then
e.Cancel = True
MsgBox("Une sauvegarde est en cours merci de patienter...", MsgBoxStyle.Critical)
Else
If misdlno = 1 Then
e.Cancel = True
MsgBox("Une mise à jour est en cours de téléchargement" & vbNewLine & "merci de patienter", MsgBoxStyle.Exclamation)
Else
If opentchat = 1 Then
MsgBox("Merci de fermer le tchat", MsgBoxStyle.Information)
e.Cancel = True
Dim msg2 = MsgBox("Voulez-vous fermer le tchat ?", MsgBoxStyle.YesNo)
If msg2 = MsgBoxResult.Yes Then
tchat.Close()
Close()
Else
tchat.WindowState = FormWindowState.Normal
tchat.TopMost = True
tchat.TopMost = False
End If
Else
Dim dw8 As New StreamWriter(lançer)
dw8.WriteLine(0)
dw8.Close()
Form1.NotifyIcon1.Visible = False
fermature.Show()
End If
End If
End If
End Sub
Private Sub QuitterMusiqueStreamingToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles QuitterMusiqueStreamingToolStripMenuItem.Click
AxWindowsMediaPlayer1.URL = ""
AxWindowsMediaPlayer1.Ctlcontrols.stop()
AxWindowsMediaPlayer1.currentPlaylist.clear()
PictureBox1.Show()
PictureBox2.Hide()
Form1.Show()
Me.Hide()
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Label3.Text = AxWindowsMediaPlayer1.settings.volume & "%"
If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsPlaying Or AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsPaused Then
GunaTrackBar1.Maximum = AxWindowsMediaPlayer1.currentMedia.duration + 1
GunaTrackBar1.Value = AxWindowsMediaPlayer1.Ctlcontrols.currentPosition
Label1.Text = AxWindowsMediaPlayer1.Ctlcontrols.currentPositionString
Label2.Text = AxWindowsMediaPlayer1.currentMedia.durationString
PictureBox4.Show()
Text = "Musique streaming: " & AxWindowsMediaPlayer1.currentMedia.name
Else
Label1.Text = "00:00"
Label2.Text = "00:00"
PictureBox4.Hide()
GunaTrackBar1.Value = 0
Text = "Musique streaming"
End If
End Sub
Private Sub ListBox1_DoubleClick(sender As Object, e As EventArgs) Handles ListBox1.DoubleClick
If ListBox1.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Autre/" & ListBox1.SelectedItem & "/" & ListBox1.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
AxWindowsMediaPlayer1.Ctlcontrols.play()
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
AxWindowsMediaPlayer1.Ctlcontrols.stop()
PictureBox1.Show()
PictureBox2.Hide()
End Sub
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
End Sub
Private Sub PictureBox7_Click(sender As Object, e As EventArgs) Handles PictureBox7.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
If FolderBrowserDialog1.ShowDialog = 1 Then
ComboBox1.Hide()
If AxWindowsMediaPlayer1.URL.Contains("Autre") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox1.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Rap") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox2.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Classique") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox3.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Pop") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox4.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Youtube") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox5.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Jazz") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox6.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
ElseIf AxWindowsMediaPlayer1.URL.Contains("Libre de droit") Then
Try
téléchargerfr = New WebClient
téléchargerfr.DownloadFileTaskAsync(New Uri(AxWindowsMediaPlayer1.URL), (FolderBrowserDialog1.SelectedPath & "/" & ListBox7.SelectedItem & ".mp3"))
Catch ex As Exception
End Try
End If
Else
End If
End If
End Sub
Private Sub téléchargerfr_DownloadProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs) Handles téléchargerfr.DownloadProgressChanged
ProgressBar1.Show()
ProgressBar1.Value = e.ProgressPercentage
End Sub
Private Sub téléchargerfr_DownloadFileCompleted(sender As Object, e As AsyncCompletedEventArgs) Handles téléchargerfr.DownloadFileCompleted
ComboBox1.Show()
ProgressBar1.Value = 0
ProgressBar1.Hide()
MsgBox("La musique a bien été télécharger", MsgBoxStyle.Information)
End Sub
Dim WithEvents téléchargerfr As WebClient
Private Sub GunaMetroTrackBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles GunaMetroTrackBar1.Scroll
AxWindowsMediaPlayer1.settings.volume = GunaMetroTrackBar1.Value
PictureBox9.Image = My.Resources.sound_157173_1280
End Sub
Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox9.Click
If AxWindowsMediaPlayer1.settings.mute = True Then
PictureBox9.Image = My.Resources.sound_157173_1280
AxWindowsMediaPlayer1.settings.mute = False
Else
AxWindowsMediaPlayer1.settings.mute = True
PictureBox9.Image = My.Resources.sound_157173_1280___Copie
End If
End Sub
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
If AxWindowsMediaPlayer1.URL.Contains("Autre") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox1.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox1.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox1.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Rap") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox2.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox2.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox2.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Classique") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox3.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox3.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox3.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Pop") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox4.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox4.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox4.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Youtube") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox5.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox5.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox5.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Jazz") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox6.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox6.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox6.SelectedItem
Form27.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Libre de droit") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox7.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox7.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\video.txt")
If vri1 = 0 Then
MsgBox("Aucun clip trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site.txt", repertoire & "site.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site.txt")
File.Delete(repertoire & "site.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form27.AxWindowsMediaPlayer1.URL = url3 & "/video.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form27.Text = "Clip de: " & ListBox7.SelectedItem
Form27.Show()
End If
End If
End If
End Sub
Private Sub PictureBox10_Click(sender As Object, e As EventArgs) Handles PictureBox10.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
If AxWindowsMediaPlayer1.URL.Contains("Autre") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox1.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox1.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Rap") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox2.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox2.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Classique") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox3.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox3.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Pop") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox4.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox4.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Youtube") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox5.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox5.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Jazz") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox6.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox6.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
ElseIf AxWindowsMediaPlayer1.URL.Contains("Libre de droit") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox7.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox7.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
File.Delete(repertoire & "publier.txt")
MsgBox("Nom: " & AxWindowsMediaPlayer1.currentMedia.name & vbNewLine & vbNewLine & "Durée: " & AxWindowsMediaPlayer1.currentMedia.durationString & vbNewLine & vbNewLine & "publier par: " & lines1(0), MsgBoxStyle.Information)
End If
End If
End Sub
Private Sub PictureBox8_Click(sender As Object, e As EventArgs) Handles PictureBox8.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
Form26.ShowDialog()
End If
End Sub
Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
If AxWindowsMediaPlayer1.URL.Contains("Autre") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox1.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox1.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox1.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Rap") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox2.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox2.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox2.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Classique") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox3.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox3.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox3.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Pop") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox4.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox4.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox4.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Youtube") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox5.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox5.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox5.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Jazz") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox6.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox6.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox6.SelectedItem
Form75.Show()
Form88.Show()
End If
ElseIf AxWindowsMediaPlayer1.URL.Contains("Libre de droit") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox7.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox7.SelectedItem
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(url3 & "\cara.txt")
If vri1 = 0 Then
MsgBox("Aucun karaoké trouvez", MsgBoxStyle.Information)
ElseIf vri1 = 1 Then
My.Computer.Network.DownloadFile(url3 & "\site2.txt", repertoire & "site2.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "site2.txt")
File.Delete(repertoire & "site2.txt")
Process.Start(lines1(0))
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
ElseIf vri1 = 2 Then
Form75.AxWindowsMediaPlayer1.URL = url3 & "/karaoke.mp4"
AxWindowsMediaPlayer1.Ctlcontrols.pause()
PictureBox1.Show()
PictureBox2.Hide()
Me.Enabled = False
Form75.Text = "karaoké de: " & ListBox7.SelectedItem
Form75.Show()
Form88.Show()
End If
End If
End If
End Sub
Private Sub ListBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedValueChanged
If ListBox1.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Autre/" & ListBox1.SelectedItem & "/" & ListBox1.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub GunaTrackBar1_Scroll(sender As Object, e As ScrollEventArgs) Handles GunaTrackBar1.Scroll
If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsPlaying Or AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsPaused Then
Timer1.Stop()
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition = GunaTrackBar1.Value
GunaTrackBar1.Maximum = AxWindowsMediaPlayer1.currentMedia.duration + 1
Timer1.Start()
Else
GunaTrackBar1.Value = 0
End If
End Sub
Private Sub AxWindowsMediaPlayer1_PlayStateChange(sender As Object, e As _WMPOCXEvents_PlayStateChangeEvent) Handles AxWindowsMediaPlayer1.PlayStateChange
If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsMediaEnded Then
PictureBox1.Show()
PictureBox2.Hide()
End If
End Sub
Private Sub ListBox2_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedValueChanged
If ListBox2.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Rap/" & ListBox2.SelectedItem & "/" & ListBox2.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub ListBox3_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox3.SelectedValueChanged
If ListBox3.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Classique/" & ListBox3.SelectedItem & "/" & ListBox3.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub ListBox4_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox4.SelectedValueChanged
If ListBox4.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Pop/" & ListBox4.SelectedItem & "/" & ListBox4.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub ListBox5_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox5.SelectedValueChanged
If ListBox5.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Youtube/" & ListBox5.SelectedItem & "/" & ListBox5.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub ListBox6_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox6.SelectedValueChanged
If ListBox6.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Jazz/" & ListBox6.SelectedItem & "/" & ListBox6.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub ListBox7_SelectedValueChanged(sender As Object, e As EventArgs) Handles ListBox7.SelectedValueChanged
If ListBox7.SelectedItem = "" Then
Else
AxWindowsMediaPlayer1.URL = ipsite & "/Musique/Libre de droit/" & ListBox7.SelectedItem & "/" & ListBox7.SelectedItem & ".mp3"
PictureBox2.Show()
PictureBox1.Hide()
End If
End Sub
Private Sub OuvrirLesOptionToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OuvrirLesOptionToolStripMenuItem.Click
Form76.ShowDialog()
End Sub
Private Sub ToutQuitterToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ToutQuitterToolStripMenuItem.Click
Close()
End Sub
Private Sub MinimiserToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MinimiserToolStripMenuItem.Click
Me.WindowState = FormWindowState.Minimized
End Sub
Private Sub MisEnLigneToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MisEnLigneToolStripMenuItem.Click
Form30.ShowDialog()
End Sub
Sub ftp()
ListBox1.Items.Clear()
ListBox2.Items.Clear()
ListBox3.Items.Clear()
ListBox4.Items.Clear()
ListBox5.Items.Clear()
ListBox6.Items.Clear()
ListBox7.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/Autre/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox1.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox1.Items.Count = 0 Then
Label4.Show()
Else
Label4.Hide()
End If
ftp2()
End Sub
Sub vérifico()
Try
Dim maj As New WebClient
Dim vri As String = maj.DownloadString(ipsite & "/utilisateur/" & nomutilisateur & "/modo.txt")
PictureBox11.Show()
Catch ex As Exception
End Try
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/utilisateur/" & nomutilisateur & "/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
Directory.CreateDirectory(musique & str)
str = sr.ReadLine()
End While
sr.Close()
If Directory.Exists(musique & "/musique/") = True Then
For Each fichier As String In IO.Directory.GetDirectories(musique)
Dim info As New IO.FileInfo(fichier)
Directory.Delete(musique & info.Name)
Next
ftpa()
Else
For Each fichier As String In IO.Directory.GetDirectories(musique)
Dim info As New IO.FileInfo(fichier)
Directory.Delete(musique & info.Name)
Next
creartdosmusique()
End If
End Sub
Sub ftpa()
ListBox8.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/utilisateur/" & nomutilisateur & "/musique/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox8.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
If ListBox8.Items.Count = 0 Then
Label11.Show()
Else
Label11.Hide()
End If
ftp()
End Sub
Sub creartdosmusique()
Try
Dim MaRequete As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create(ipserver & "/utilisateur/" & nomutilisateur & "/musique/"), System.Net.FtpWebRequest)
Dim ftpStream As Stream = Nothing
MaRequete.Credentials = New System.Net.NetworkCredential("yoannsafe", passftp)
MaRequete.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory
Dim response As FtpWebResponse = CType(MaRequete.GetResponse, FtpWebResponse)
ftpStream = response.GetResponseStream
ftpStream.Close()
response.Close()
ftpa()
Catch ex As Exception
End Try
End Sub
Private Sub ToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItem1.Click
ftp()
End Sub
Private Sub ActualiserToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ActualiserToolStripMenuItem.Click
ftpa()
End Sub
Private Sub SupprimerToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SupprimerToolStripMenuItem.Click
If ListBox8.SelectedItem = "" Then
MsgBox("Merci de sélectionnez une musique", MsgBoxStyle.Exclamation)
Else
Dim msg = MsgBox("Voulez-vous vraiment supprimer: " & ListBox8.SelectedItem & "?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
My.Computer.Network.DownloadFile(ipsite & "/utilisateur/" & nomutilisateur & "/musique/" & ListBox8.SelectedItem & "/url.txt", musique & "url.txt")
Dim lines1() As String = File.ReadAllLines(musique & "url.txt")
Dim upurl = lines1(0)
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl)
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl)
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & nomutilisateur & "/musique/" & ListBox8.SelectedItem & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & nomutilisateur & "/musique/" & ListBox8.SelectedItem & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
Dim azaezae As String = ""
If ListBox8.SelectedItem.ToString.Contains("Autre") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Autre", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Rap") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Rap", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Classique") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Classique", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Pop") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Pop", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Youtube") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Youtube", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Jazz") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Jazz", "")
ElseIf ListBox8.SelectedItem.ToString.Contains("Libre de droit") Then
azaezae = ListBox8.SelectedItem.ToString.Replace(" - Libre de droit", "")
End If
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & azaezae & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
File.Delete(musique & "url.txt")
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox8.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
ftpa()
Else
MsgBox("Action annulez", MsgBoxStyle.Information)
End If
End If
End Sub
Private Sub ComboBox1_TextUpdate(sender As Object, e As EventArgs) Handles ComboBox1.TextUpdate
If ComboBox1.Text = "" Then
ComboBox1.Size = New Size(731, 22)
ComboBox1.Size = New Size(731, 22)
Else
ComboBox1.Items.Remove("Taper ici pour rechercher")
ComboBox1.Size = New Size(731, 92)
End If
End Sub
Sub ftp8()
ComboBox1.Items.Clear()
ComboBox1.Items.Add("Taper ici pour rechercher")
ComboBox1.Text = "Taper ici pour rechercher"
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(ipserver & "/Musique/find/")
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
Dim str2 = str.Replace(".txt", "")
ComboBox1.Items.Add(str2)
str = sr.ReadLine()
End While
sr.Close()
End Sub
Private Sub ComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedValueChanged
If ComboBox1.SelectedItem = "" Then
ComboBox1.Items.Add("Taper ici pour rechercher")
ComboBox1.Text = "Taper ici pour rechercher"
ComboBox1.Size = New Size(731, 22)
TabControl1.Focus()
ElseIf ComboBox1.SelectedItem = "Taper ici pour rechercher" Then
TabControl1.Focus()
Else
Dim maj1 As New WebClient
Dim vri1 As String = maj1.DownloadString(ipsite & "/Musique/find/" & ComboBox1.SelectedItem & ".txt")
If vri1 = 1 Then
TabControl1.SelectTab(TabPage1)
ListBox1.SelectedItem = ComboBox1.SelectedItem
ListBox1.Focus()
ElseIf vri1 = 2 Then
ListBox2.SelectedItem = ComboBox1.SelectedItem
ListBox2.Focus()
ElseIf vri1 = 3 Then
TabControl1.SelectTab(TabPage3)
ListBox3.SelectedItem = ComboBox1.SelectedItem
ListBox3.Focus()
ElseIf vri1 = 4 Then
TabControl1.SelectTab(TabPage4)
ListBox4.SelectedItem = ComboBox1.SelectedItem
ListBox4.Focus()
ElseIf vri1 = 5 Then
TabControl1.SelectTab(TabPage5)
ListBox5.SelectedItem = ComboBox1.SelectedItem
ListBox5.Focus()
ElseIf vri1 = 6 Then
TabControl1.SelectTab(TabPage6)
ListBox6.SelectedItem = ComboBox1.SelectedItem
ListBox6.Focus()
ElseIf vri1 = 7 Then
TabControl1.SelectTab(TabPage7)
ListBox7.SelectedItem = ComboBox1.SelectedItem
ListBox7.Focus()
End If
ComboBox1.Items.Add("Taper ici pour rechercher")
ComboBox1.Text = "Taper ici pour rechercher"
ComboBox1.Size = New Size(731, 22)
End If
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
Private Sub ComboBox1_Click(sender As Object, e As EventArgs) Handles ComboBox1.Click
If ComboBox1.SelectedItem = "Taper ici pour rechercher" Then
ComboBox1.SelectedText = ""
End If
End Sub
Private Sub PictureBox11_Click(sender As Object, e As EventArgs) Handles PictureBox11.Click
If AxWindowsMediaPlayer1.URL = "" Then
Else
Dim msg = MsgBox("Voulez-vous vraiment supprimer: " & AxWindowsMediaPlayer1.currentMedia.name & " ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
srupperadmin()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
End If
End Sub
Sub srupperadmin()
If AxWindowsMediaPlayer1.URL = "" Then
Else
If AxWindowsMediaPlayer1.URL.Contains("Autre") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox1.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox1.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox1.SelectedItem & " - " & "Autre" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox1.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox1.SelectedItem & " - " & "Autre" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox1.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox1.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Rap") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox2.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox2.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox2.SelectedItem & " - " & "Rap" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox2.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox2.SelectedItem & " - " & "Rap" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox2.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox2.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Classique") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox3.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox3.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox3.SelectedItem & " - " & "Classique" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox3.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox3.SelectedItem & " - " & "Classique" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox3.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox3.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Pop") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox4.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox4.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox4.SelectedItem & " - " & "Pop" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox4.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox4.SelectedItem & " - " & "Pop" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox4.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox4.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Youtube") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox5.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox5.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox5.SelectedItem & " - " & "Youtube" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox5.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox5.SelectedItem & " - " & "Youtube" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox5.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox5.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Jazz") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox6.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox6.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox6.SelectedItem & " - " & "Jazz" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox6.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox6.SelectedItem & " - " & "Jazz" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox6.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox6.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
ElseIf AxWindowsMediaPlayer1.URL.Contains("Libre de droit") Then
Dim url = AxWindowsMediaPlayer1.URL.Replace(ListBox7.SelectedItem, "")
Dim url2 = url.ToString.Replace(".mp3", "")
Dim url3 = url2 & ListBox1.SelectedItem
Dim maj1 As New WebClient
My.Computer.Network.DownloadFile(url3 & "\publier.txt", repertoire & "publier.txt")
My.Computer.Network.DownloadFile(url3 & "\url.txt", repertoire & "url.txt")
Dim lines1() As String = File.ReadAllLines(repertoire & "publier.txt")
Dim upurl() As String = File.ReadAllLines(repertoire & "url.txt")
File.Delete(repertoire & "publier.txt")
File.Delete(repertoire & "url.txt")
ListBox9.Items.Clear()
Dim fwr As FtpWebRequest
fwr = FtpWebRequest.Create(upurl(0))
fwr.Credentials = New NetworkCredential("yoannsafe", passftp)
fwr.Method = WebRequestMethods.Ftp.ListDirectory
Dim sr As New StreamReader(fwr.GetResponse().GetResponseStream())
Dim str As String = sr.ReadLine()
While Not str Is Nothing
ListBox9.Items.Add(str)
str = sr.ReadLine()
End While
sr.Close()
listb2ab = ListBox9.Items.Count
ListBox9.SetSelected(0, True)
For x = 1 To ListBox9.Items.Count
Dim ftreq2 As FtpWebRequest = FtpWebRequest.Create(upurl(0) & ListBox9.SelectedItem)
ftreq2.Method = WebRequestMethods.Ftp.DeleteFile
ftreq2.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp2 As FtpWebResponse = ftreq2.GetResponse
listb2ab = listb2ab - 1
ListBox9.SetSelected(listb2ab, True)
Next
Dim ftreq3 As FtpWebRequest = FtpWebRequest.Create(upurl(0))
ftreq3.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq3.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp3 As FtpWebResponse = ftreq3.GetResponse
Dim ftreq4 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox7.SelectedItem & " - " & "Libre de droit" & "/url.txt")
ftreq4.Method = WebRequestMethods.Ftp.DeleteFile
ftreq4.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp4 As FtpWebResponse = ftreq4.GetResponse
Dim ftreq6 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/Musique/find/" & ListBox7.SelectedItem & ".txt")
ftreq6.Method = WebRequestMethods.Ftp.DeleteFile
ftreq6.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp6 As FtpWebResponse = ftreq6.GetResponse
Dim ftreq5 As FtpWebRequest = FtpWebRequest.Create(ipserver & "/utilisateur/" & lines1(0) & "/musique/" & ListBox7.SelectedItem & " - " & "Libre de droit" & "/")
ftreq5.Method = WebRequestMethods.Ftp.RemoveDirectory
ftreq5.Credentials = New NetworkCredential("yoannsafe", passftp)
Dim ftpresp5 As FtpWebResponse = ftreq5.GetResponse
ListBox9.Items.Clear()
listb2ab = 0
MsgBox("La musique: " & ListBox7.SelectedItem & " a bien été supprimer", MsgBoxStyle.Information)
Dim msg = MsgBox("Voulez-vous vraiment prévenir le personne que sa musique a êtê supprimer ?", MsgBoxStyle.YesNo)
If msg = MsgBoxResult.Yes Then
mailsuppr.nomfile = ListBox7.SelectedItem
mailsuppr.typfile = "Musique"
mailsuppr.userdladmin = nomutilisateur
mailsuppr.publier = lines1(0)
mailsuppr.ShowDialog()
Else
MsgBox("action annuler", MsgBoxStyle.Information)
End If
ftpa()
End If
End If
End Sub
End Class