VERSION 5.00 Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx" Begin VB.Form OptionsForm BorderStyle = 3 'Fixed Dialog Caption = "P4OFC Options" ClientHeight = 6840 ClientLeft = 2760 ClientTop = 3750 ClientWidth = 6750 ControlBox = 0 'False LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 6840 ScaleWidth = 6750 ShowInTaskbar = 0 'False StartUpPosition = 1 'CenterOwner Begin TabDlg.SSTab SSTab1 Height = 5895 Left = 360 TabIndex = 0 Top = 120 Width = 6045 _ExtentX = 10663 _ExtentY = 10398 _Version = 393216 Tabs = 2 TabsPerRow = 2 TabHeight = 520 TabCaption(0) = "Check &In/Check Out" TabPicture(0) = "Options.frx":0000 Tab(0).ControlEnabled= -1 'True Tab(0).Control(0)= "Label2" Tab(0).Control(0).Enabled= 0 'False Tab(0).Control(1)= "Label1" Tab(0).Control(1).Enabled= 0 'False Tab(0).Control(2)= "Label3" Tab(0).Control(2).Enabled= 0 'False Tab(0).Control(3)= "Label4" Tab(0).Control(3).Enabled= 0 'False Tab(0).Control(4)= "ViewOtherFilesOnSubmit" Tab(0).Control(4).Enabled= 0 'False Tab(0).Control(5)= "DisplayConfirmations" Tab(0).Control(5).Enabled= 0 'False Tab(0).Control(6)= "DisplayDiff" Tab(0).Control(6).Enabled= 0 'False Tab(0).Control(7)= "Frame1" Tab(0).Control(7).Enabled= 0 'False Tab(0).Control(8)= "Frame2" Tab(0).Control(8).Enabled= 0 'False Tab(0).ControlCount= 9 TabCaption(1) = "O&pen/Close" TabPicture(1) = "Options.frx":001C Tab(1).ControlEnabled= 0 'False Tab(1).Control(0)= "Frame5" Tab(1).Control(0).Enabled= 0 'False Tab(1).Control(1)= "Frame4" Tab(1).Control(1).Enabled= 0 'False Tab(1).Control(2)= "Frame3" Tab(1).Control(2).Enabled= 0 'False Tab(1).Control(3)= "Label7" Tab(1).Control(3).Enabled= 0 'False Tab(1).Control(4)= "Label6" Tab(1).Control(4).Enabled= 0 'False Tab(1).Control(5)= "Label5" Tab(1).Control(5).Enabled= 0 'False Tab(1).ControlCount= 6 Begin VB.Frame Frame5 BorderStyle = 0 'None Caption = "Frame1" Height = 1095 Left = -74280 TabIndex = 27 Top = 3960 Width = 1815 Begin VB.OptionButton CheckInOnClose Caption = "Always" Height = 255 Index = 2 Left = 0 TabIndex = 28 Top = 0 Width = 1095 End Begin VB.OptionButton CheckInOnClose Caption = "Never" Height = 255 Index = 0 Left = 0 TabIndex = 29 Top = 360 Width = 1095 End Begin VB.OptionButton CheckInOnClose Caption = "Prompt" Height = 255 Index = 1 Left = 0 TabIndex = 30 Top = 720 Width = 1095 End End Begin VB.Frame Frame4 BorderStyle = 0 'None Caption = "Frame1" Height = 1095 Left = -74280 TabIndex = 22 Top = 2400 Width = 1815 Begin VB.OptionButton CheckOutOnReopen Caption = "Always" Height = 255 Index = 2 Left = 0 TabIndex = 23 Top = 0 Width = 1095 End Begin VB.OptionButton CheckOutOnReopen Caption = "Never" Height = 255 Index = 0 Left = 0 TabIndex = 24 Top = 360 Width = 1095 End Begin VB.OptionButton CheckOutOnReopen Caption = "Prompt" Height = 255 Index = 1 Left = 0 TabIndex = 25 Top = 720 Width = 1095 End End Begin VB.Frame Frame3 BorderStyle = 0 'None Caption = "Frame1" Height = 1095 Left = -74280 TabIndex = 17 Top = 840 Width = 1815 Begin VB.OptionButton CheckOutOnOpen Caption = "Always" Height = 255 Index = 2 Left = 0 TabIndex = 18 Top = 0 Width = 1095 End Begin VB.OptionButton CheckOutOnOpen Caption = "Never" Height = 255 Index = 0 Left = 0 TabIndex = 19 Top = 360 Width = 1095 End Begin VB.OptionButton CheckOutOnOpen Caption = "Prompt" Height = 255 Index = 1 Left = 0 TabIndex = 20 Top = 720 Width = 1095 End End Begin VB.Frame Frame2 BorderStyle = 0 'None Caption = "Frame1" Height = 1095 Left = 720 TabIndex = 7 Top = 2520 Width = 1815 Begin VB.OptionButton AutoLock Caption = "Always" Height = 255 Index = 2 Left = 0 TabIndex = 8 Top = 0 Width = 1095 End Begin VB.OptionButton AutoLock Caption = "Never" Height = 255 Index = 0 Left = 0 TabIndex = 9 Top = 360 Width = 1095 End Begin VB.OptionButton AutoLock Caption = "Prompt" Height = 255 Index = 1 Left = 0 TabIndex = 10 Top = 720 Width = 1095 End End Begin VB.Frame Frame1 BorderStyle = 0 'None Caption = "Frame1" Height = 1095 Left = 720 TabIndex = 2 Top = 840 Width = 1815 Begin VB.OptionButton CheckInAfterAdd Caption = "Always" Height = 255 Index = 2 Left = 0 TabIndex = 3 Top = 0 Width = 1095 End Begin VB.OptionButton CheckInAfterAdd Caption = "Never" Height = 255 Index = 0 Left = 0 TabIndex = 4 Top = 360 Width = 1095 End Begin VB.OptionButton CheckInAfterAdd Caption = "Prompt" Height = 255 Index = 1 Left = 0 TabIndex = 5 Top = 720 Width = 1095 End End Begin VB.CheckBox DisplayDiff Caption = "Display &diff (compare versions) question dialog" Height = 375 Left = 720 TabIndex = 15 Top = 5160 Width = 4695 End Begin VB.CheckBox DisplayConfirmations Caption = "Display &confirmation dialogs (on add/check out)" Height = 375 Left = 720 TabIndex = 14 Top = 4800 Width = 4695 End Begin VB.CheckBox ViewOtherFilesOnSubmit Caption = "&View other documents in changelist" Height = 375 Left = 720 TabIndex = 12 Top = 3960 Width = 4695 End Begin VB.Label Label7 Caption = "When closing a document, chec&k in to Perforce:" Height = 375 Left = -74760 TabIndex = 26 Top = 3720 Width = 5655 End Begin VB.Label Label6 Caption = "When &reopening document after undo (revert), check out from Perforce:" Height = 375 Left = -74760 TabIndex = 21 Top = 2160 Width = 5655 End Begin VB.Label Label5 Caption = "When &opening a document, check out from Perforce:" Height = 375 Left = -74760 TabIndex = 16 Top = 600 Width = 4815 End Begin VB.Label Label4 Caption = "Informational prompts:" Height = 375 Left = 240 TabIndex = 13 Top = 4560 Width = 5415 End Begin VB.Label Label3 Caption = "When checking in a document:" Height = 375 Left = 240 TabIndex = 11 Top = 3720 Width = 5415 End Begin VB.Label Label1 Caption = "When &adding a document to Perforce, check in immediately:" Height = 375 Left = 240 TabIndex = 1 Top = 600 Width = 5415 End Begin VB.Label Label2 Caption = "When checking out a document, automatically &lock it (prevent others from checking it in while you have it checked out):" Height = 495 Left = 240 TabIndex = 6 Top = 2040 Width = 5415 End End Begin VB.CommandButton CancelButton Cancel = -1 'True Caption = "Cancel" Height = 375 Left = 3360 TabIndex = 32 Top = 6240 Width = 1215 End Begin VB.CommandButton OKButton Caption = "OK" Default = -1 'True Height = 375 Left = 1560 TabIndex = 31 Top = 6240 Width = 1215 End End Attribute VB_Name = "OptionsForm" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Private Sub CancelButton_Click() On Error GoTo Error_Block Dim T As Tracker: Set T = GStackTrace.Enter(TypeName(Me), "CancelButton_Click") Unload Me Exit Sub Error_Block: T.Report End Sub Private Sub Form_Load() On Error GoTo Error_Block Dim T As Tracker: Set T = GStackTrace.Enter(TypeName(Me), "Form_Load") ' Initialise the options DisplayDiff.Value = 0 DisplayConfirmations.Value = 0 ViewOtherFilesOnSubmit.Value = 0 SetOption "AutoLock", RegOptions.AutoLock SetOption "CheckInAfterAdd", RegOptions.CheckinAfterAddReminder SetOption "CheckOutOnOpen", RegOptions.CheckOutOnOpen SetOption "CheckOutOnReopen", RegOptions.CheckOutOnReopen SetOption "CheckInOnClose", RegOptions.CheckInOnClose If Not RegOptions.HideDiffDialog Then DisplayDiff.Value = 1 If RegOptions.DisplayConfirmations Then DisplayConfirmations.Value = 1 If Not RegOptions.SubmitCurrentDocOnly Then ViewOtherFilesOnSubmit.Value = 1 Screen.MousePointer = vbDefault Exit Sub Error_Block: T.Report End Sub Private Sub SetOption(Name As String, v As OptionsValue) Dim T As Tracker: Set T = GStackTrace.Enter(TypeName(Me), "SetOption") Dim opt As OptionButton For Each opt In Controls(Name) opt.Value = (opt.Index = v) Next End Sub Private Function GetOption(Name As String) As OptionsValue Dim T As Tracker: Set T = GStackTrace.Enter(TypeName(Me), "GetOption") Dim opt As OptionButton For Each opt In Controls(Name) If opt.Value Then GetOption = opt.Index Exit Function End If Next End Function Private Sub OKButton_Click() On Error GoTo Error_Block Dim T As Tracker: Set T = GStackTrace.Enter(TypeName(Me), "OKButton_Click") RegOptions.HideDiffDialog = (DisplayDiff.Value = 0) RegOptions.DisplayConfirmations = (DisplayConfirmations.Value = 1) RegOptions.SubmitCurrentDocOnly = (ViewOtherFilesOnSubmit.Value = 0) RegOptions.AutoLock = GetOption("AutoLock") RegOptions.CheckinAfterAddReminder = GetOption("CheckInAfterAdd") RegOptions.CheckOutOnOpen = GetOption("CheckOutOnOpen") RegOptions.CheckOutOnReopen = GetOption("CheckOutOnReopen") RegOptions.CheckInOnClose = GetOption("CheckInOnClose") Unload Me Exit Sub Error_Block: T.Report End Sub
# | 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/Options.frm | |||||
#1 | 10843 | Robert Cowham |
Initial version of P4OFC source code. See README.txt (and LICENSE.txt and doc\P4OFC-Design.docx) |