-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmMain.vb
67 lines (50 loc) · 2.14 KB
/
frmMain.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Imports System.IO
Public Class frmMain
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Call Fin()
End Sub
Private Sub btnChMdp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChMdp.Click
Me.Hide()
frmPassW.Show()
End Sub
Private Sub btnCrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCrypt.Click
End Sub
Private Sub btnDecrypt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDecrypt.Click
End Sub
Private Sub btnFilmList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lstFilm.Items.Clear()
For i As Integer = 0 To UBound(Films)
If Films(i).estCrypte Then
lstFilm.Items.Add("[Cx] " & Films(i).nomFilm)
Else
lstFilm.Items.Add("[--] " & Films(i).nomFilm)
End If
Next i
End Sub
Private Sub btnAj_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAj.Click
opFile.ShowDialog()
ReDim Preserve Films(UBound(Films) + 1)
Films(UBound(Films)).estCrypte = False
Films(UBound(Films)).nomFilm = Path.GetFileName(opFile.FileName)
Films(UBound(Films)).path = Path.GetDirectoryName(opFile.FileName)
Info.nbFilm += 1
Info.indDernier += 1
Call frmMain_Load(sender, e)
End Sub
Private Sub btnSup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSup.Click
If lstFilm.SelectedIndex < 0 Then Exit Sub
Dim nomFilm As String = Mid(lstFilm.Items.Item(lstFilm.SelectedIndex), 6)
Dim i As Integer = Find_Film(nomFilm)
If Films(i).estCrypte Then
Call DeCrypt(Films(i))
Call Organize_Films(i)
Else
Call Organize_Films(i)
End If
Info.nbFilm -= 1
Info.indDernier -= 1
Call frmMain_Load(sender, e)
End Sub
End Class