VERSION 5.00 Begin VB.Form SyncCheckoutForm BorderStyle = 3 'Fixed Dialog Caption = "P4OFC - Get Latest Revision/Check Out" ClientHeight = 3975 ClientLeft = 45 ClientTop = 330 ClientWidth = 5205 ControlBox = 0 'False LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3975 ScaleWidth = 5205 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin VB.TextBox txtMsg BackColor = &H8000000F& BorderStyle = 0 'None Height = 3255 Left = 120 Locked = -1 'True MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 3 Text = "SyncCheckoutForm.frx":0000 Top = 120 Width = 4935 End Begin VB.CommandButton CheckoutButton Caption = "Chec&k Out" Height = 375 Left = 2160 TabIndex = 1 Top = 3480 Width = 1215 End Begin VB.CommandButton CancelButton Cancel = -1 'True Caption = "Cancel" Height = 375 Left = 3600 TabIndex = 2 Top = 3480 Width = 1215 End Begin VB.CommandButton SyncButton Caption = "&Get Latest Revision" Default = -1 'True Height = 375 Left = 360 TabIndex = 0 Top = 3480 Width = 1575 End End Attribute VB_Name = "SyncCheckoutForm" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Public Enum SyncCheckoutAction Cancel = 0 Sync = 1 CheckOut = 2 End Enum Private m_Action As SyncCheckoutAction Private m_OfficeApp As OfficeApp Private m_App As Object Public Function Action(app As Object, OApp As OfficeApp, Msg As String, DisableCheckout As Boolean) As SyncCheckoutAction Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "Action") Set m_App = app Set m_OfficeApp = OApp If DisableCheckout Then CheckoutButton.Enabled = False txtMsg.Text = Msg & vbCrLf & vbCrLf & _ "Click Get Latest Revision to copy the latest version from the depot to your computer which you can then check out." & vbCrLf & vbCrLf & _ "Click Check Out to check your current version out - you will be required to resolve your changes with the newest version in Perforce when you check in." Screen.MousePointer = vbDefault ShowForm Me, Modal:=True Action = m_Action Unload Me End Function Private Sub CancelButton_Click() On Error GoTo Error_Block Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "CancelButton_Click") Me.Hide m_Action = Cancel Exit Sub Error_Block: t.Report End Sub Private Sub CheckoutButton_Click() On Error GoTo Error_Block Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "CheckoutButton_Click") Dim i As Integer Me.Hide m_Action = CheckOut Exit Sub Error_Block: t.Report End Sub Private Sub SyncButton_Click() On Error GoTo Error_Block Dim t As Tracker: Set t = GStackTrace.Enter(TypeName(Me), "SyncButton_Click") Me.Hide m_OfficeApp.SyncFile m_Action = Sync Exit Sub Error_Block: t.Report End Sub