VERSION 2.00
Begin Form Form3 
   BackColor       =   &H00C0C0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "INIBAK - Restore"
   ClientHeight    =   3165
   ClientLeft      =   525
   ClientTop       =   945
   ClientWidth     =   6150
   ControlBox      =   0   'False
   Height          =   3690
   HelpContextID   =   19
   Left            =   465
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3165
   ScaleWidth      =   6150
   Top             =   480
   Width           =   6270
   Begin FileListBox File1 
      BackColor       =   &H00C0C0C0&
      Height          =   1785
      HelpContextID   =   16
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   1695
   End
   Begin CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "&Cancel"
      Height          =   495
      HelpContextID   =   19
      Left            =   3120
      TabIndex        =   3
      Top             =   2520
      Width           =   2895
   End
   Begin CommandButton Command1 
      Caption         =   "&Restore Selected Backup"
      Default         =   -1  'True
      Height          =   495
      HelpContextID   =   18
      Left            =   120
      TabIndex        =   2
      Top             =   2520
      Width           =   2895
   End
   Begin Shape Shape1 
      BorderColor     =   &H00808080&
      Height          =   1785
      Index           =   0
      Left            =   1920
      Top             =   600
      Width           =   4095
   End
   Begin Shape Shape1 
      BorderColor     =   &H00FFFFFF&
      Height          =   1785
      Index           =   1
      Left            =   1935
      Top             =   615
      Width           =   4095
   End
   Begin Label NameLabel 
      BackColor       =   &H00C0C0C0&
      Caption         =   "NameLabel"
      Height          =   255
      Left            =   3480
      TabIndex        =   0
      Top             =   960
      Width           =   2175
   End
   Begin Label Label2 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00C0C0C0&
      Caption         =   "Date/Time:"
      Height          =   255
      Left            =   2040
      TabIndex        =   4
      Top             =   1320
      Width           =   1335
   End
   Begin Label Label3 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00C0C0C0&
      Caption         =   "Size:"
      Height          =   255
      Left            =   2040
      TabIndex        =   6
      Top             =   1680
      Width           =   1335
   End
   Begin Label DateLabel 
      BackColor       =   &H00C0C0C0&
      Caption         =   "12/01/80 12:00:00a"
      Height          =   255
      Left            =   3480
      TabIndex        =   7
      Top             =   1320
      Width           =   2175
   End
   Begin Label SizeLabel 
      BackColor       =   &H00C0C0C0&
      Caption         =   "0"
      Height          =   255
      Left            =   3480
      TabIndex        =   8
      Top             =   1680
      Width           =   1815
   End
   Begin Label Label4 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00C0C0C0&
      Caption         =   "Name:"
      Height          =   255
      Left            =   2040
      TabIndex        =   9
      Top             =   960
      Width           =   1335
   End
   Begin Label Label1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "Label1"
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   5895
   End
End
Option Explicit

Sub Command1_Click ()
  If File1.ListIndex >= 0 Then
    Form3.Tag = R_RESTORE
    Form3.Hide
  Else
    Msg = "Please select a backup file first."
    MsgType = MB_ICONSTOP
    MsgBox Msg, MsgType, MsgTitle
  End If
End Sub

Sub Command2_Click ()
  Form3.Tag = R_IGNORE
  Form3.Hide
End Sub

Sub File1_Click ()
  UpdateLabels
End Sub

Sub File1_GotFocus ()
  If (File1.ListCount > 0) And (File1.ListIndex < 0) Then File1.ListIndex = 0
  UpdateLabels
End Sub

Sub UpdateLabels ()
  ' Update the file name and the info panel for the current file
  Dim fName$
  fName$ = File1.FileName
  NameLabel.Caption = fName
  DateLabel.Caption = FileDateTime(IniBakDir + fName)
  Dim xSize&
  xSize = FileLen(IniBakDir + fName)
  SizeLabel.Caption = Format$(xSize, "###,###,##0") + " bytes"
End Sub

