29 lines
1.2 KiB
VB.net
29 lines
1.2 KiB
VB.net
Imports System.IO
|
|
|
|
Public Class Form12
|
|
Private Sub Form12_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
ListBox1.Items.Clear()
|
|
For Each fichier As String In IO.Directory.GetFiles(dostemps & "\addon\")
|
|
Dim info As New IO.FileInfo(fichier)
|
|
ListBox1.Items.Add(info.Name)
|
|
Next
|
|
ListBox1.SelectedIndex = 0
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
|
Dim msg = MsgBox("voulez vous vraiment supprimer l'addon: " & ListBox1.SelectedItem & " ?", MsgBoxStyle.YesNo)
|
|
If msg = MsgBoxResult.Yes Then
|
|
Form7.ListBox2.Items.Clear()
|
|
File.Delete(dostemps & "\addon\" & ListBox1.SelectedItem)
|
|
For Each fichier As String In IO.Directory.GetFiles(dostemps & "\addon\")
|
|
Dim info As New IO.FileInfo(fichier)
|
|
Form7.ListBox2.Items.Add(info.Name)
|
|
Next
|
|
Form7.Label9.Text = Form7.ListBox2.Items.Count
|
|
MsgBox("L'addon: " & ListBox1.SelectedItem & " a bien êtê suppimer", MsgBoxStyle.Information)
|
|
Close()
|
|
Else
|
|
MsgBox("action annuler", MsgBoxStyle.Information)
|
|
End If
|
|
End Sub
|
|
End Class |