If chkLatest.Value = vbChecked Then ' To restore latest file, set date to 9999/12/31
xFileSelection.MaxDate = DateSerial(9999, 12, 31)
Else ' Otherwise, set the date to the listbox's selected date
xFileSelection.MaxDate = CDate(lstFiles.Text)
End If
End If
Set m_xMain = Nothing
ShowModal = m_nModalResult
End Function
Public Sub UpdateRestoreState()
cmdRestore.Enabled = (chkLatest.Value = vbChecked) Or (lstFiles.ListIndex >= 0)
End Sub
Private Sub chkLatest_Click()
' Update the Restore button's enabled state
Call UpdateRestoreState
End Sub
Private Sub cmdCancel_Click()
m_nModalResult = vbCancel
Call Me.Hide
End Sub
Private Sub cmdRestore_Click()
m_nModalResult = vbOK
Call Me.Hide
End Sub
Private Sub lstFiles_Click()
' Update the Restore button's enabled state
Call UpdateRestoreState
End Sub
Private Sub lstFiles_DblClick()
' Update the Restore button's enabled state
Call UpdateRestoreState
If cmdRestore.Enabled Then
m_nModalResult = vbOK
Call Me.Hide
End If
End Sub
Private Sub m_xMain_BrowsingCatalogEntry(ByVal sFilename As String, ByVal lSize As Long, ByVal xAttributes As XceedBackupLibCtl.bkpFileAttributes, ByVal dtLastModified As Date, ByVal dtLastAccessed As Date, ByVal dtCreated As Date, ByVal lDiskNumber As Long, ByVal sMediaLabel As String)
' Add the browsed file to the list of available file version(s)