VERSION 5.00 Begin VB.Form ChangePasswordForm BorderStyle = 3 'Fixed Dialog Caption = "P4OFC - Set Password" ClientHeight = 2370 ClientLeft = 45 ClientTop = 330 ClientWidth = 4980 ControlBox = 0 'False LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2370 ScaleWidth = 4980 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.TextBox txtConfirmPassword Height = 375 IMEMode = 3 'DISABLE Left = 2160 PasswordChar = "*" TabIndex = 4 Top = 1200 Width = 2655 End Begin VB.TextBox txtNewPassword Height = 375 IMEMode = 3 'DISABLE Left = 2160 PasswordChar = "*" TabIndex = 2 Top = 720 Width = 2655 End Begin VB.CommandButton cmdCancel Cancel = -1 'True Caption = "Cancel" Height = 375 Left = 2400 TabIndex = 6 Top = 1800 Width = 1215 End Begin VB.CommandButton cmdOK Caption = "OK" Default = -1 'True Height = 375 Left = 960 TabIndex = 5 Top = 1800 Width = 1215 End Begin VB.Label Label3 Caption = "&Confirm new Password:" Height = 255 Left = 120 TabIndex = 3 Top = 1320 Width = 1695 End Begin VB.Label Label2 Caption = "Enter &new Password:" Height = 255 Left = 120 TabIndex = 1 Top = 840 Width = 1695 End Begin VB.Label Label1 Caption = "Your Perforce server requires you to have a password." Height = 255 Left = 120 TabIndex = 0 Top = 240 Width = 4695 End End Attribute VB_Name = "ChangePasswordForm" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private m_Action As VbMsgBoxResult Private m_p4 As P4COM.p4 Private Sub DoClick(Action As VbMsgBoxResult) Me.Hide m_Action = Action End Sub Private Sub cmdCancel_Click() Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "cmdCancel_Click") On Error GoTo Error_Block DoClick vbCancel Exit Sub Error_Block: t.Report End Sub Private Sub cmdOK_Click() Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "cmdOK_Click") On Error GoTo Error_Block If txtNewPassword.Text <> txtConfirmPassword.Text Then MsgBox "New password does not match confirmation password. Please try again.", vbExclamation + vbOKOnly Exit Sub End If m_p4.password = "" ' Assume blank password m_p4.Input = txtNewPassword.Text If CommandSuccessful("passwd", m_p4, "Password updated.") Then ' Login immediately having changed password If CommandSuccessful("login", m_p4, " logged in.") Then DoClick vbOK End If Else MsgBox "Failed to change password. Please try again.", vbExclamation + vbOKOnly txtNewPassword.Text = "" txtConfirmPassword.Text = "" End If Exit Sub Error_Block: t.Report End Sub Public Function Answer(p4 As P4COM.p4) As VbMsgBoxResult Answer = vbCancel m_Action = vbCancel Set m_p4 = p4 Screen.MousePointer = vbDefault ShowForm Me, True Answer = m_Action Unload Me End Function
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11893 | Robert Cowham |
Populate -o //guest/robert_cowham/perforce/P4OFC/main/... //guest/robert_cowham/perforce/P4OFC/icm/.... |
||
//guest/robert_cowham/perforce/P4OFC/main/p4comaddin/ChangePasswordForm.frm | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |