VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form winLogFile 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Log File"
   ClientHeight    =   1905
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4770
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1905
   ScaleWidth      =   4770
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin MSComDlg.CommonDialog dlgLogFile 
      Left            =   4080
      Top             =   1320
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "Select Log File"
   End
   Begin VB.CommandButton btnCancel 
      Cancel          =   -1  'True
      Caption         =   "&Cancel"
      Height          =   435
      Left            =   2400
      TabIndex        =   2
      Top             =   1320
      Width           =   1380
   End
   Begin VB.CommandButton btnOk 
      Caption         =   "&OK"
      Default         =   -1  'True
      Height          =   435
      Left            =   840
      TabIndex        =   1
      Top             =   1320
      Width           =   1380
   End
   Begin VB.Frame Frame1 
      Caption         =   "OPOS Log File"
      Height          =   1080
      Left            =   120
      TabIndex        =   0
      Top             =   105
      Width           =   4530
      Begin VB.CommandButton btnBrowse 
         Caption         =   "&Browse"
         Height          =   330
         Left            =   3240
         TabIndex        =   4
         Top             =   480
         Width           =   1170
      End
      Begin VB.TextBox txtLogFile 
         Height          =   345
         Left            =   105
         TabIndex        =   3
         Top             =   480
         Width           =   3060
      End
   End
End
Attribute VB_Name = "winLogFile"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' File:  "LogFile.frm" - Visual Basic form definition file
'' Desc:  This file includes component definitions and event handlers for.
''        for the winLogFile form.
''
''        This form takes care of setting the global LogFile registry
''        setting used by all Weigh-Tronix objects.  Unlike the instance
''        specific properties which are stored under the OPOS key
''        ServiceOPOS, this value is stored under the vendor key under
''        the OPOS ServiceInfo key.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''



Option Explicit

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Control event handlers
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Private Sub btnBrowse_Click()
    '' Open up a common "SaveAs" dialog box
    On Error GoTo err_Cancel
    
    Dim sFileName As String
    
    dlgLogFile.ShowSave
    
    sFileName = dlgLogFile.FileName
    
    If Len(sFileName) > 0 Then
        txtLogFile.Text = sFileName
    End If
    
    Exit Sub
    
err_Cancel:
    '' Get here if we cancel browsing
    On Error GoTo 0
End Sub

Private Sub btnCancel_Click()
    '' Changed my mind, close up
    
    Unload Me
    winMain.Enabled = True
    
End Sub

Private Sub btnOk_Click()
    
    Dim w
    Dim ret
    Dim szProviderKey           As String
    Dim szVendor                As String
    Dim valName                 As String
    Dim szValue                 As String
    
    szProviderKey = REG_OPOSPROVIDER_KEY
    szVendor = "Weigh-Tronix"
    valName = "LogFile"
    szValue = txtLogFile.Text
    
    SetLogFilePath (szValue)
    
    Unload Me
End Sub

Private Sub Form_Load()
    '' Get the current setting
    txtLogFile.Text = winMain.lblLogFile.Caption
End Sub

Public Property Let SetDefaultLogFile(ByVal sFileName As String)
    txtLogFile.Text = sFileName
End Property
