first commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports System.Reflection.Emit
|
||||
|
||||
Public Class Form9
|
||||
Dim index = 0
|
||||
Dim index2 = 1
|
||||
Private Sub Form9_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
index = 0
|
||||
index2 = 1
|
||||
Form7.ListBox1.SelectedIndex = index
|
||||
PictureBox4.Image = Image.FromFile(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Text = "image " & index2 & "/" & Form7.ListBox1.Items.Count
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
|
||||
PictureBox4.Image.Dispose()
|
||||
If index = Form7.ListBox1.Items.Count - 1 Then
|
||||
index = 0
|
||||
index2 = index + 1
|
||||
Form7.ListBox1.SelectedIndex = index
|
||||
PictureBox4.Image = Image.FromFile(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Text = "image " & index2 & "/" & Form7.ListBox1.Items.Count
|
||||
Else
|
||||
index = index + 1
|
||||
index2 = index + 1
|
||||
Form7.ListBox1.SelectedIndex = index
|
||||
PictureBox4.Image = Image.FromFile(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Text = "image " & index2 & "/" & Form7.ListBox1.Items.Count
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
|
||||
PictureBox4.Image.Dispose()
|
||||
If index = 0 Then
|
||||
Form7.ListBox1.SelectedIndex = Form7.ListBox1.Items.Count - 1
|
||||
index = Form7.ListBox1.Items.Count
|
||||
index2 = index
|
||||
PictureBox4.Image = Image.FromFile(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Text = "image " & index2 & "/" & Form7.ListBox1.Items.Count
|
||||
Else
|
||||
index = index - 1
|
||||
index2 = index + 1
|
||||
Form7.ListBox1.SelectedIndex = index
|
||||
PictureBox4.Image = Image.FromFile(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Text = "image " & index2 & "/" & Form7.ListBox1.Items.Count
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
|
||||
Dim msg = MsgBox("voulez vous vraiment supprimer l'image:" & Form7.ListBox1.SelectedItem & " ?", MsgBoxStyle.YesNo)
|
||||
If msg = MsgBoxResult.Yes Then
|
||||
PictureBox4.Image.Dispose()
|
||||
File.Delete(dostemps & "\imges\" & Form7.ListBox1.SelectedItem)
|
||||
Form7.ListBox1.Items.Clear()
|
||||
For Each fichier As String In IO.Directory.GetFiles(dostemps & "\imges\")
|
||||
Dim info As New IO.FileInfo(fichier)
|
||||
Form7.ListBox1.Items.Add(info.Name)
|
||||
Next
|
||||
Form7.Label8.Text = Form7.ListBox1.Items.Count
|
||||
MsgBox("L'image a bien êtê suppimer", MsgBoxStyle.Information)
|
||||
Close()
|
||||
Else
|
||||
MsgBox("action annuler", MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form9_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing
|
||||
PictureBox4.Image.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user