Initial commit
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
Public Class clsBackup
|
||||
Private sBackupID As String = Guid.NewGuid.ToString
|
||||
Private sName As String = String.Empty
|
||||
Private sFileName As String = String.Empty
|
||||
Private sRestorePath As String = String.Empty
|
||||
Private bAbsolutePath As Boolean = False
|
||||
Private sRelativeRestorePath As String = String.Empty
|
||||
Private dDateUpdated As DateTime = Date.Now
|
||||
Private sUpdatedBy As String = String.Empty
|
||||
Private dLastDateUpdated As DateTime = Date.Now
|
||||
Private sLastUpdatedBy As String = String.Empty
|
||||
Private sCheckSum As String = String.Empty
|
||||
|
||||
Property ID As String
|
||||
Get
|
||||
Return sBackupID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sBackupID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Name As String
|
||||
Get
|
||||
Return sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property CroppedName As String
|
||||
Get
|
||||
If Name.Length > 40 Then
|
||||
Return sName.Substring(0, 41) & "..."
|
||||
Else
|
||||
Return sName
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileName As String
|
||||
Get
|
||||
Return sFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sFileName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TruePath As String
|
||||
Get
|
||||
Return sRestorePath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property RestorePath As String
|
||||
Get
|
||||
Return mgrPath.ReplaceSpecialPaths(sRestorePath)
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRestorePath = mgrPath.ReverseSpecialPaths(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AbsolutePath As Boolean
|
||||
Get
|
||||
Return bAbsolutePath
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAbsolutePath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RelativeRestorePath As String
|
||||
Get
|
||||
Return sRelativeRestorePath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRelativeRestorePath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DateUpdated As DateTime
|
||||
Get
|
||||
Return dDateUpdated
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dDateUpdated = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property DateUpdatedUnix As Int64
|
||||
Get
|
||||
Return mgrCommon.DateToUnix(DateUpdated)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property UpdatedBy As String
|
||||
Get
|
||||
Return sUpdatedBy
|
||||
End Get
|
||||
Set(value As String)
|
||||
sUpdatedBy = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastDateUpdated As DateTime
|
||||
Get
|
||||
Return dLastDateUpdated
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dLastDateUpdated = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastUpdatedBy As String
|
||||
Get
|
||||
Return sLastUpdatedBy
|
||||
End Get
|
||||
Set(value As String)
|
||||
sLastUpdatedBy = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CheckSum As String
|
||||
Get
|
||||
Return sCheckSum
|
||||
End Get
|
||||
Set(value As String)
|
||||
sCheckSum = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,291 @@
|
||||
Public Class clsGame
|
||||
Private sGameID As String = Guid.NewGuid.ToString
|
||||
Private sGameName As String = String.Empty
|
||||
Private sProcessName As String = String.Empty
|
||||
Private sPath As String = String.Empty
|
||||
Private bAbsolutePath As Boolean = False
|
||||
Private bFolderSave As Boolean = False
|
||||
Private sFileType As String = String.Empty
|
||||
Private bAppendTimeStamp As Boolean = False
|
||||
Private sExcludeList As String = String.Empty
|
||||
Private sProcessPath As String = String.Empty
|
||||
Private sIcon As String = String.Empty
|
||||
Private dHours As Double = 0
|
||||
Private sVersion As String = String.Empty
|
||||
Private sCompany As String = String.Empty
|
||||
Private bEnabled As Boolean = True
|
||||
Private bMonitorOnly As Boolean = False
|
||||
Private bDuplicate As Boolean = False
|
||||
Private sDOSBoxProcess As String = String.Empty
|
||||
Private bTempGame As Boolean = False
|
||||
|
||||
Property ID As String
|
||||
Set(value As String)
|
||||
sGameID = value
|
||||
End Set
|
||||
Get
|
||||
Return sGameID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CroppedName As String
|
||||
Get
|
||||
If Name.Length > 40 Then
|
||||
Return sGameName.Substring(0, 41) & "..."
|
||||
Else
|
||||
Return sGameName
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Property Name As String
|
||||
Set(value As String)
|
||||
sGameName = value
|
||||
End Set
|
||||
Get
|
||||
Return sGameName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property ProcessName As String
|
||||
Set(value As String)
|
||||
sProcessName = value
|
||||
End Set
|
||||
Get
|
||||
Return sProcessName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Path As String
|
||||
Set(value As String)
|
||||
sPath = mgrPath.ReverseSpecialPaths(value)
|
||||
End Set
|
||||
Get
|
||||
Return mgrPath.ReplaceSpecialPaths(sPath)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property AbsolutePath As Boolean
|
||||
Set(value As Boolean)
|
||||
bAbsolutePath = value
|
||||
End Set
|
||||
Get
|
||||
Return bAbsolutePath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FolderSave As Boolean
|
||||
Set(value As Boolean)
|
||||
bFolderSave = value
|
||||
End Set
|
||||
Get
|
||||
Return bFolderSave
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileType As String
|
||||
Set(value As String)
|
||||
sFileType = value
|
||||
End Set
|
||||
Get
|
||||
Return sFileType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property AppendTimeStamp As Boolean
|
||||
Get
|
||||
Return bAppendTimeStamp
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAppendTimeStamp = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ExcludeList As String
|
||||
Set(value As String)
|
||||
sExcludeList = value
|
||||
End Set
|
||||
Get
|
||||
Return sExcludeList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property ProcessPath As String
|
||||
Set(value As String)
|
||||
sProcessPath = value
|
||||
End Set
|
||||
Get
|
||||
Return sProcessPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Icon As String
|
||||
Get
|
||||
Return sIcon
|
||||
End Get
|
||||
Set(value As String)
|
||||
sIcon = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Hours As Double
|
||||
Get
|
||||
Return dHours
|
||||
End Get
|
||||
Set(value As Double)
|
||||
dHours = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Version As String
|
||||
Get
|
||||
Return sVersion
|
||||
End Get
|
||||
Set(value As String)
|
||||
sVersion = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Company As String
|
||||
Get
|
||||
Return sCompany
|
||||
End Get
|
||||
Set(value As String)
|
||||
sCompany = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Enabled As Boolean
|
||||
Set(value As Boolean)
|
||||
bEnabled = value
|
||||
End Set
|
||||
Get
|
||||
Return bEnabled
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property MonitorOnly As Boolean
|
||||
Set(value As Boolean)
|
||||
bMonitorOnly = value
|
||||
End Set
|
||||
Get
|
||||
Return bMonitorOnly
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Duplicate As Boolean
|
||||
Set(value As Boolean)
|
||||
bDuplicate = value
|
||||
End Set
|
||||
Get
|
||||
Return bDuplicate
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property DOSBoxProcess As String
|
||||
Set(value As String)
|
||||
sDOSBoxProcess = value
|
||||
End Set
|
||||
Get
|
||||
Return sDOSBoxProcess
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property TruePath As String
|
||||
Get
|
||||
Return sPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property TrueProcess As String
|
||||
Get
|
||||
Return HandleProcessDuplicates()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Temporary As Boolean
|
||||
Get
|
||||
Return bTempGame
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bTempGame = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Function SyncEquals(obj As Object) As Boolean
|
||||
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||
If oGame Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
If Name <> oGame.Name Then
|
||||
Return False
|
||||
End If
|
||||
If ProcessName <> oGame.ProcessName Then
|
||||
Return False
|
||||
End If
|
||||
If Path <> oGame.Path Then
|
||||
Return False
|
||||
End If
|
||||
If FileType <> oGame.FileType Then
|
||||
Return False
|
||||
End If
|
||||
If ExcludeList <> oGame.ExcludeList Then
|
||||
Return False
|
||||
End If
|
||||
If AbsolutePath <> oGame.AbsolutePath Then
|
||||
Return False
|
||||
End If
|
||||
If FolderSave <> oGame.FolderSave Then
|
||||
Return False
|
||||
End If
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If Hours <> oGame.Hours Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function CoreEquals(obj As Object) As Boolean
|
||||
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||
If oGame Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
If Name <> oGame.Name Then
|
||||
Return False
|
||||
End If
|
||||
If ProcessName <> oGame.ProcessName Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Function ShallowCopy() As clsGame
|
||||
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
||||
End Function
|
||||
|
||||
Private Function HandleProcessDuplicates() As String
|
||||
Dim sProcessName As String
|
||||
|
||||
'Handle Duplicates
|
||||
sProcessName = Me.ProcessName
|
||||
If Me.Duplicate Then
|
||||
If Me.ProcessName.Contains("dosbox") Then
|
||||
If Me.ProcessName.Split(":").Length = 3 Then
|
||||
sProcessName = Me.ProcessName.Remove(Me.ProcessName.LastIndexOf(":"))
|
||||
Else
|
||||
sProcessName = Me.ProcessName
|
||||
End If
|
||||
Else
|
||||
sProcessName = Me.ProcessName.Split(":")(0)
|
||||
End If
|
||||
End If
|
||||
|
||||
Return sProcessName
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,40 @@
|
||||
Public Class clsPathVariable
|
||||
Private sVariableID As String = Guid.NewGuid.ToString
|
||||
Private sVariableName As String = String.Empty
|
||||
Private sVariableDescription As String = String.Empty
|
||||
Private sPath As String = String.Empty
|
||||
|
||||
Property ID As String
|
||||
Get
|
||||
Return sVariableID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sVariableID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Name As String
|
||||
Get
|
||||
Return sVariableName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sVariableName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property FormattedName As String
|
||||
Get
|
||||
Return "*" & sVariableName & "*"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Path As String
|
||||
Get
|
||||
Return sPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,23 @@
|
||||
Public Class clsRestoreCache
|
||||
Private sName As String
|
||||
Private sPath As String
|
||||
|
||||
Property Name As String
|
||||
Get
|
||||
Return sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Path As String
|
||||
Get
|
||||
Return sPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user