-
Notifications
You must be signed in to change notification settings - Fork 0
/
PasswordDlg.cls
119 lines (78 loc) · 2.47 KB
/
PasswordDlg.cls
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "PasswordDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private strPassword As String
Private booCancel As Boolean
Private strLabelPassword As String
Private strLabelConfirmPassword As String
Private strErrorConfirmMessage As String
Private strErrorConfirmCaption As String
Public Sub ShowDialog(Caption As String, Optional WithConfirm As Boolean = False)
Dim frmForm As Object
If WithConfirm Then
Set frmForm = frmPasswordWConfirm
Else
Set frmForm = frmPasswordWOConfirm
End If
With frmForm
.Caption = Caption
.lblPassword(0).Caption = strLabelPassword
If WithConfirm Then
.lblPassword(1).Caption = strLabelConfirmPassword
.strErrorConfirmMessage = strErrorConfirmMessage
.strErrorConfirmCaption = strErrorConfirmCaption
End If
.Show vbModal
strPassword = .strPassword
booCancel = .booCancel
End With
Unload frmForm
Set frmForm = Nothing
End Sub
Public Property Get Password() As String
Password = strPassword
End Property
Public Property Get Cancel() As Boolean
Cancel = booCancel
End Property
Public Property Get LabelPassword() As String
LabelPassword = strLabelPassword
End Property
Public Property Let LabelPassword(ByVal NewValue As String)
strLabelPassword = NewValue
End Property
Public Property Get LabelConfirmPassword() As String
LabelConfirmPassword = strLabelConfirmPassword
End Property
Public Property Let LabelConfirmPassword(ByVal NewValue As String)
strLabelConfirmPassword = NewValue
End Property
Private Sub Class_Initialize()
strLabelPassword = "Enter password :"
strLabelConfirmPassword = "Confirm password :"
strErrorConfirmMessage = "Password do not match !"
strErrorConfirmCaption = "Error"
End Sub
Public Property Get ErrorConfirmMessage() As String
ErrorConfirmMessage = strErrorConfirmMessage
End Property
Public Property Let ErrorConfirmMessage(ByVal NewValue As String)
strErrorConfirmMessage = NewValue
End Property
Public Property Get ErrorConfirmCaption() As String
ErrorConfirmCaption = strErrorConfirmCaption
End Property
Public Property Let ErrorConfirmCaption(ByVal NewValue As String)
strErrorConfirmCaption = NewValue
End Property