Merge pull request #40 from MikeMaximus/mono-test

Merge multi-platform test branch into master
This commit is contained in:
Michael J. Seiferling
2016-03-06 15:15:53 -06:00
31 changed files with 553 additions and 244 deletions
+5 -1
View File
@@ -41,7 +41,11 @@
Property FileName As String Property FileName As String
Get Get
Return sFileName If mgrCommon.IsUnix Then
Return sFileName.Replace("\", "/")
Else
Return sFileName.Replace("/", "\")
End If
End Get End Get
Set(value As String) Set(value As String)
sFileName = value sFileName = value
+1 -1
View File
@@ -178,7 +178,7 @@ Public Class frmAddWizard
Return False Return False
End If End If
If Path.GetExtension(strPath.ToLower) <> ".exe" Then If Path.GetExtension(strPath.ToLower) <> ".exe" And Not mgrCommon.IsUnix Then
sErrorMessage = frmAddWizard_ErrorNotAProcess sErrorMessage = frmAddWizard_ErrorNotAProcess
txtProcessPath.Focus() txtProcessPath.Focus()
Return False Return False
+3 -14
View File
@@ -22,23 +22,14 @@ Partial Class frmFileFolderSearch
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.pgbProgress = New System.Windows.Forms.ProgressBar()
Me.txtCurrentLocation = New System.Windows.Forms.TextBox() Me.txtCurrentLocation = New System.Windows.Forms.TextBox()
Me.btnCancel = New System.Windows.Forms.Button() Me.btnCancel = New System.Windows.Forms.Button()
Me.bwSearch = New System.ComponentModel.BackgroundWorker() Me.bwSearch = New System.ComponentModel.BackgroundWorker()
Me.SuspendLayout() Me.SuspendLayout()
' '
'pgbProgress
'
Me.pgbProgress.Location = New System.Drawing.Point(12, 12)
Me.pgbProgress.MarqueeAnimationSpeed = 0
Me.pgbProgress.Name = "pgbProgress"
Me.pgbProgress.Size = New System.Drawing.Size(460, 23)
Me.pgbProgress.TabIndex = 0
'
'txtCurrentLocation 'txtCurrentLocation
' '
Me.txtCurrentLocation.Location = New System.Drawing.Point(12, 43) Me.txtCurrentLocation.Location = New System.Drawing.Point(12, 12)
Me.txtCurrentLocation.Name = "txtCurrentLocation" Me.txtCurrentLocation.Name = "txtCurrentLocation"
Me.txtCurrentLocation.ReadOnly = True Me.txtCurrentLocation.ReadOnly = True
Me.txtCurrentLocation.Size = New System.Drawing.Size(379, 20) Me.txtCurrentLocation.Size = New System.Drawing.Size(379, 20)
@@ -47,7 +38,7 @@ Partial Class frmFileFolderSearch
' '
'btnCancel 'btnCancel
' '
Me.btnCancel.Location = New System.Drawing.Point(397, 41) Me.btnCancel.Location = New System.Drawing.Point(397, 10)
Me.btnCancel.Name = "btnCancel" Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 0 Me.btnCancel.TabIndex = 0
@@ -62,10 +53,9 @@ Partial Class frmFileFolderSearch
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(484, 77) Me.ClientSize = New System.Drawing.Size(484, 46)
Me.Controls.Add(Me.btnCancel) Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.txtCurrentLocation) Me.Controls.Add(Me.txtCurrentLocation)
Me.Controls.Add(Me.pgbProgress)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MinimizeBox = False Me.MinimizeBox = False
@@ -77,7 +67,6 @@ Partial Class frmFileFolderSearch
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents pgbProgress As System.Windows.Forms.ProgressBar
Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox
Friend WithEvents btnCancel As System.Windows.Forms.Button Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker
+35 -5
View File
@@ -3,6 +3,7 @@ Imports System.IO
Public Class frmFileFolderSearch Public Class frmFileFolderSearch
Private sSearchItem As String Private sSearchItem As String
Private sGameName As String = String.Empty
Private bIsFolder As Boolean Private bIsFolder As Boolean
Private sFoundItem As String Private sFoundItem As String
Private oDrives As List(Of DriveInfo) Private oDrives As List(Of DriveInfo)
@@ -12,6 +13,15 @@ Public Class frmFileFolderSearch
Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String) Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String)
Public Property GameName As String
Get
Return sGameName
End Get
Set(value As String)
sGameName = value
End Set
End Property
Public Property SearchItem As String Public Property SearchItem As String
Get Get
Return sSearchItem Return sSearchItem
@@ -50,17 +60,28 @@ Public Class frmFileFolderSearch
Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String
Dim sSubSearch As String = String.Empty Dim sSubSearch As String = String.Empty
Dim sFoundItem As String = String.Empty
If bwSearch.CancellationPending Then If bwSearch.CancellationPending Then
Return "Cancel" Return "Cancel"
End If End If
'Ignore Symlinks
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
Return String.Empty
End If
UpdateInfo(dir.FullName) UpdateInfo(dir.FullName)
Try Try
'Search Current Directory 'Search Current Directory
If dir.GetDirectories(sDirectoryName).Length > 0 Then If dir.GetDirectories(sDirectoryName).Length > 0 Then
Return dir.FullName & "\" & sDirectoryName sFoundItem = dir.FullName & Path.DirectorySeparatorChar & sDirectoryName
If mgrCommon.ShowMessage(mgrPath_ConfirmPathCorrect, New String() {GameName, sFoundItem}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Return sFoundItem
Else
Return String.Empty
End If
End If End If
'Search Sub Directory 'Search Sub Directory
@@ -82,23 +103,35 @@ Public Class frmFileFolderSearch
Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String
Dim sSubSearch As String = String.Empty Dim sSubSearch As String = String.Empty
Dim sFoundItem As String = String.Empty
If bwSearch.CancellationPending Then If bwSearch.CancellationPending Then
Return "Cancel" Return "Cancel"
End If End If
'Ignore Symlinks
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
Return String.Empty
End If
UpdateInfo(dir.FullName) UpdateInfo(dir.FullName)
Try Try
'Search Current Directory 'Search Current Directory
If dir.GetFiles(sFileName).Length > 0 Then If dir.GetFiles(sFileName).Length > 0 Then
Return dir.FullName & "\" & sFileName sFoundItem = Path.GetDirectoryName(dir.FullName & Path.DirectorySeparatorChar & sFileName)
If mgrCommon.ShowMessage(mgrPath_ConfirmPathCorrect, New String() {GameName, sFoundItem}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Return sFoundItem
Else
Return String.Empty
End If
End If End If
'Search Sub Directory 'Search Sub Directory
Dim subdirs() As DirectoryInfo = dir.GetDirectories("*") Dim subdirs() As DirectoryInfo = dir.GetDirectories("*")
For Each newDir As DirectoryInfo In subdirs For Each newDir As DirectoryInfo In subdirs
sSubSearch = SearchFile(newDir, sFileName) sSubSearch = SearchFile(newDir, sFileName)
If sSubSearch <> String.Empty Then If sSubSearch <> String.Empty Then
Return sSubSearch Return sSubSearch
End If End If
@@ -122,8 +155,6 @@ Public Class frmFileFolderSearch
End Sub End Sub
Private Sub Search(ByVal oDrive As DriveInfo) Private Sub Search(ByVal oDrive As DriveInfo)
pgbProgress.Style = ProgressBarStyle.Marquee
pgbProgress.MarqueeAnimationSpeed = 5
oSearchDrive = oDrive.RootDirectory oSearchDrive = oDrive.RootDirectory
bwSearch.RunWorkerAsync() bwSearch.RunWorkerAsync()
iCurrentDrive += 1 iCurrentDrive += 1
@@ -131,7 +162,6 @@ Public Class frmFileFolderSearch
Private Sub EndSearch() Private Sub EndSearch()
Dim oResult As MsgBoxResult Dim oResult As MsgBoxResult
pgbProgress.MarqueeAnimationSpeed = 0
If FoundItem = "Cancel" Then FoundItem = String.Empty If FoundItem = "Cancel" Then FoundItem = String.Empty
-6
View File
@@ -99,7 +99,6 @@ Partial Class frmFilter
' '
'optAll 'optAll
' '
Me.optAll.AutoSize = True
Me.optAll.Location = New System.Drawing.Point(77, 19) Me.optAll.Location = New System.Drawing.Point(77, 19)
Me.optAll.Name = "optAll" Me.optAll.Name = "optAll"
Me.optAll.Size = New System.Drawing.Size(63, 17) Me.optAll.Size = New System.Drawing.Size(63, 17)
@@ -110,7 +109,6 @@ Partial Class frmFilter
' '
'optAny 'optAny
' '
Me.optAny.AutoSize = True
Me.optAny.Checked = True Me.optAny.Checked = True
Me.optAny.Location = New System.Drawing.Point(6, 19) Me.optAny.Location = New System.Drawing.Point(6, 19)
Me.optAny.Name = "optAny" Me.optAny.Name = "optAny"
@@ -213,7 +211,6 @@ Partial Class frmFilter
' '
'optOr 'optOr
' '
Me.optOr.AutoSize = True
Me.optOr.Location = New System.Drawing.Point(56, 19) Me.optOr.Location = New System.Drawing.Point(56, 19)
Me.optOr.Name = "optOr" Me.optOr.Name = "optOr"
Me.optOr.Size = New System.Drawing.Size(36, 17) Me.optOr.Size = New System.Drawing.Size(36, 17)
@@ -224,7 +221,6 @@ Partial Class frmFilter
' '
'optAnd 'optAnd
' '
Me.optAnd.AutoSize = True
Me.optAnd.Checked = True Me.optAnd.Checked = True
Me.optAnd.Location = New System.Drawing.Point(6, 19) Me.optAnd.Location = New System.Drawing.Point(6, 19)
Me.optAnd.Name = "optAnd" Me.optAnd.Name = "optAnd"
@@ -302,11 +298,9 @@ Partial Class frmFilter
Me.grpTagFilter.ResumeLayout(False) Me.grpTagFilter.ResumeLayout(False)
Me.grpTagFilter.PerformLayout() Me.grpTagFilter.PerformLayout()
Me.grpTagOptions.ResumeLayout(False) Me.grpTagOptions.ResumeLayout(False)
Me.grpTagOptions.PerformLayout()
Me.grpGameFilter.ResumeLayout(False) Me.grpGameFilter.ResumeLayout(False)
Me.grpGameFilter.PerformLayout() Me.grpGameFilter.PerformLayout()
Me.grpGameInfoOptions.ResumeLayout(False) Me.grpGameInfoOptions.ResumeLayout(False)
Me.grpGameInfoOptions.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
-1
View File
@@ -630,7 +630,6 @@ Partial Class frmGameManager
Me.lstGames.Name = "lstGames" Me.lstGames.Name = "lstGames"
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstGames.Size = New System.Drawing.Size(228, 381) Me.lstGames.Size = New System.Drawing.Size(228, 381)
Me.lstGames.Sorted = True
Me.lstGames.TabIndex = 1 Me.lstGames.TabIndex = 1
' '
'btnCancel 'btnCancel
+55 -25
View File
@@ -34,7 +34,7 @@ Public Class frmGameManager
Property BackupFolder As String Property BackupFolder As String
Get Get
Return sBackupFolder & "\" Return sBackupFolder & Path.DirectorySeparatorChar
End Get End Get
Set(value As String) Set(value As String)
sBackupFolder = value sBackupFolder = value
@@ -175,7 +175,7 @@ Public Class frmGameManager
sFileName = BackupFolder & oBackupItem.FileName sFileName = BackupFolder & oBackupItem.FileName
'Rename Backup File 'Rename Backup File
sNewFileName = Path.GetDirectoryName(sFileName) & "\" & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name) sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name)
If File.Exists(sFileName) Then If File.Exists(sFileName) Then
FileSystem.Rename(sFileName, sNewFileName) FileSystem.Rename(sFileName, sNewFileName)
End If End If
@@ -265,7 +265,7 @@ Public Class frmGameManager
Next Next
End If End If
lstGames.Items.Clear() lstGames.DataSource = Nothing
FormatAndFillList() FormatAndFillList()
End Sub End Sub
@@ -336,8 +336,14 @@ Public Class frmGameManager
End If End If
End If End If
'Unix Handler
If Not mgrCommon.IsUnix Then
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _ sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
frmGameManager_Icon, sDefaultFolder, False) frmGameManager_Icon, sDefaultFolder, False)
Else
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png", _
"PNG", sDefaultFolder, False)
End If
If sNewPath <> String.Empty Then If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath txtIcon.Text = sNewPath
@@ -365,38 +371,50 @@ Public Class frmGameManager
End Function End Function
Public Shared Function CompareByName(sItem1 As KeyValuePair(Of String, String), sItem2 As KeyValuePair(Of String, String)) As Integer
Return String.Compare(sItem1.Value, sItem2.value)
End Function
Private Sub FormatAndFillList() Private Sub FormatAndFillList()
IsLoading = True IsLoading = True
Dim oApp As clsGame Dim oApp As clsGame
Dim oData As KeyValuePair(Of String, String) Dim oData As KeyValuePair(Of String, String)
Dim oList As New List(Of KeyValuePair(Of String, String))
lstGames.ValueMember = "Key" lstGames.ValueMember = "Key"
lstGames.DisplayMember = "Value" lstGames.DisplayMember = "Value"
lstGames.BeginUpdate()
For Each de As DictionaryEntry In AppData For Each de As DictionaryEntry In AppData
oApp = DirectCast(de.Value, clsGame) oApp = DirectCast(de.Value, clsGame)
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name) oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
lstGames.Items.Add(oData) oList.Add(oData)
Next Next
lstGames.EndUpdate() oList.Sort(AddressOf CompareByName)
lstGames.BeginUpdate()
lstGames.DataSource = oList
lstGames.EndUpdate()
lstGames.ClearSelected()
IsLoading = False IsLoading = False
End Sub End Sub
Private Sub OpenBackupFile() Private Sub OpenBackupFile()
Dim sFileName As String Dim sFileName As String
Dim oProcessStartInfo As ProcessStartInfo
sFileName = BackupFolder & CurrentBackupItem.FileName sFileName = BackupFolder & CurrentBackupItem.FileName
If File.Exists(sFileName) Then If File.Exists(sFileName) Then
Process.Start("explorer.exe", "/select," & sFileName) oProcessStartInfo = New ProcessStartInfo
oProcessStartInfo.FileName = sFileName
oProcessStartInfo.UseShellExecute = True
oProcessStartInfo.Verb = "open"
Process.Start(oProcessStartInfo)
Else Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
End If End If
End Sub End Sub
Private Sub UpdateBuilderButtonLabel(ByVal sBuilderString As String, ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean) Private Sub UpdateBuilderButtonLabel(ByVal sBuilderString As String, ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean)
@@ -424,8 +442,8 @@ Public Class frmGameManager
End If End If
Else Else
If txtAppPath.Text <> String.Empty Then If txtAppPath.Text <> String.Empty Then
If Directory.Exists(txtAppPath.Text & "\" & txtSavePath.Text) Then If Directory.Exists(txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text) Then
sRoot = txtAppPath.Text & "\" & txtSavePath.Text sRoot = txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text
End If End If
End If End If
End If End If
@@ -451,14 +469,14 @@ Public Class frmGameManager
If Not CurrentBackupItem.AbsolutePath Then If Not CurrentBackupItem.AbsolutePath Then
If CurrentGame.ProcessPath <> String.Empty Then If CurrentGame.ProcessPath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & "\" & CurrentBackupItem.RestorePath CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
Else Else
sProcess = CurrentGame.TrueProcess sProcess = CurrentGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto) sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
If sRestorePath <> String.Empty Then If sRestorePath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath CurrentBackupItem.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
txtAppPath.Text = sRestorePath txtAppPath.Text = sRestorePath
Else Else
Return False Return False
@@ -471,6 +489,7 @@ Public Class frmGameManager
Private Sub OpenRestorePath() Private Sub OpenRestorePath()
Dim sPath As String = String.Empty Dim sPath As String = String.Empty
Dim oProcessStartInfo As ProcessStartInfo
If CurrentBackupItem.AbsolutePath Then If CurrentBackupItem.AbsolutePath Then
sPath = CurrentBackupItem.RestorePath sPath = CurrentBackupItem.RestorePath
@@ -481,11 +500,14 @@ Public Class frmGameManager
End If End If
If Directory.Exists(sPath) Then If Directory.Exists(sPath) Then
Process.Start("explorer.exe", sPath) oProcessStartInfo = New ProcessStartInfo
oProcessStartInfo.FileName = sPath
oProcessStartInfo.UseShellExecute = True
oProcessStartInfo.Verb = "open"
Process.Start(oProcessStartInfo)
Else Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
End If End If
End Sub End Sub
Private Sub OpenTags() Private Sub OpenTags()
@@ -519,7 +541,6 @@ Public Class frmGameManager
Dim oBackupInfo As clsBackup Dim oBackupInfo As clsBackup
Dim sFileName As String Dim sFileName As String
If oRemoteBackupData.Contains(oApp.Name) Then If oRemoteBackupData.Contains(oApp.Name) Then
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup) CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy}) txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
@@ -535,6 +556,8 @@ Public Class frmGameManager
Else Else
txtFileSize.Text = frmGameManager_ErrorNoBackupExists txtFileSize.Text = frmGameManager_ErrorNoBackupExists
End If End If
mgrRestore.DoPathOverride(CurrentBackupItem, oApp)
txtRestorePath.Text = CurrentBackupItem.RestorePath txtRestorePath.Text = CurrentBackupItem.RestorePath
Else Else
txtCurrentBackup.Text = frmGameManager_Never txtCurrentBackup.Text = frmGameManager_Never
@@ -582,10 +605,10 @@ Public Class frmGameManager
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote) mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
'Delete referenced backup file from the backup folder 'Delete referenced backup file from the backup folder
If File.Exists(BackupFolder & CurrentBackupItem.FileName) Then My.Computer.FileSystem.DeleteFile(BackupFolder & CurrentBackupItem.FileName, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin) mgrCommon.DeleteFile(BackupFolder & CurrentBackupItem.FileName)
'Check if using backup sub-directories (Probably not the best way to check for this) 'Check if using backup sub-directories (Probably not the best way to check for this)
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & "\") Then If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & Path.DirectorySeparatorChar) Then
'Build sub-dir backup path 'Build sub-dir backup path
sSubDir = BackupFolder & CurrentBackupItem.Name sSubDir = BackupFolder & CurrentBackupItem.Name
@@ -595,11 +618,11 @@ Public Class frmGameManager
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
'Confirm 'Confirm
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If Directory.Exists(sSubDir) Then My.Computer.FileSystem.DeleteDirectory(sSubDir, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin) If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir, True)
End If End If
Else Else
'Folder is empty, delete the empty sub-folder 'Folder is empty, delete the empty sub-folder
If Directory.Exists(sSubDir) Then My.Computer.FileSystem.DeleteDirectory(sSubDir, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin) If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir)
End If End If
End If End If
End If End If
@@ -812,6 +835,7 @@ Public Class frmGameManager
btnAdd.Enabled = True btnAdd.Enabled = True
btnDelete.Enabled = False btnDelete.Enabled = False
btnBackup.Enabled = False btnBackup.Enabled = False
btnOpenRestorePath.Enabled = False
btnTags.Enabled = False btnTags.Enabled = False
lblTags.Visible = False lblTags.Visible = False
btnInclude.Text = frmGameManager_btnInclude btnInclude.Text = frmGameManager_btnInclude
@@ -979,13 +1003,10 @@ Public Class frmGameManager
End Select End Select
If bSuccess Then If bSuccess Then
Dim iSelected As Integer
IsDirty = False IsDirty = False
LoadData() LoadData()
iSelected = lstGames.Items.IndexOf(New KeyValuePair(Of String, String)(oApp.ID, oApp.Name))
If iSelected = -1 Then eCurrentMode = eModes.Disabled
ModeChange() ModeChange()
If eCurrentMode = eModes.View Then lstGames.SelectedIndex = iSelected If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
End If End If
End Sub End Sub
@@ -1021,6 +1042,7 @@ Public Class frmGameManager
End Sub End Sub
Private Sub SwitchApp() Private Sub SwitchApp()
If Not bIsLoading Then
If lstGames.SelectedItems.Count = 1 Then If lstGames.SelectedItems.Count = 1 Then
eCurrentMode = eModes.View eCurrentMode = eModes.View
FillData() FillData()
@@ -1029,6 +1051,7 @@ Public Class frmGameManager
eCurrentMode = eModes.MultiSelect eCurrentMode = eModes.MultiSelect
ModeChange() ModeChange()
End If End If
End If
End Sub End Sub
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
@@ -1206,13 +1229,17 @@ Public Class frmGameManager
End Sub End Sub
Private Sub ImportOfficialGameList() Private Sub ImportOfficialGameList()
If mgrCommon.IsUnix Then
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Exit Sub
End If
End If
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then If mgrMonitorList.DoImport(App_URLImport) Then
LoadData() LoadData()
End If End If
End If End If
End Sub End Sub
Private Sub SetForm() Private Sub SetForm()
@@ -1293,6 +1320,9 @@ Public Class frmGameManager
AssignDirtyHandlers(grpExtra.Controls) AssignDirtyHandlers(grpExtra.Controls)
AssignDirtyHandlers(grpStats.Controls) AssignDirtyHandlers(grpStats.Controls)
AssignDirtyHandlersMisc() AssignDirtyHandlersMisc()
LoadData(False)
ModeChange()
End Sub End Sub
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
-3
View File
@@ -170,7 +170,6 @@ Partial Class frmIncludeExclude
' '
'optFileTypes 'optFileTypes
' '
Me.optFileTypes.AutoSize = True
Me.optFileTypes.Location = New System.Drawing.Point(6, 19) Me.optFileTypes.Location = New System.Drawing.Point(6, 19)
Me.optFileTypes.Name = "optFileTypes" Me.optFileTypes.Name = "optFileTypes"
Me.optFileTypes.Size = New System.Drawing.Size(73, 17) Me.optFileTypes.Size = New System.Drawing.Size(73, 17)
@@ -181,7 +180,6 @@ Partial Class frmIncludeExclude
' '
'optIndividualFiles 'optIndividualFiles
' '
Me.optIndividualFiles.AutoSize = True
Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19) Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19)
Me.optIndividualFiles.Name = "optIndividualFiles" Me.optIndividualFiles.Name = "optIndividualFiles"
Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17) Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17)
@@ -250,7 +248,6 @@ Partial Class frmIncludeExclude
Me.Text = "Include / Exclude Builder" Me.Text = "Include / Exclude Builder"
Me.cmsItems.ResumeLayout(False) Me.cmsItems.ResumeLayout(False)
Me.grpFileOptions.ResumeLayout(False) Me.grpFileOptions.ResumeLayout(False)
Me.grpFileOptions.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
+1 -1
View File
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
CQAAAk1TRnQBSQFMAgEBAwEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+4 -4
View File
@@ -30,7 +30,7 @@ Public Class frmIncludeExclude
Return sRootFolder Return sRootFolder
End Get End Get
Set(value As String) Set(value As String)
sRootFolder = value.TrimEnd("\") sRootFolder = value.TrimEnd(Path.DirectorySeparatorChar)
End Set End Set
End Property End Property
@@ -52,7 +52,7 @@ Public Class frmIncludeExclude
If sFolders.Length <> 0 Then If sFolders.Length <> 0 Then
For Each sFolder As String In sFolders For Each sFolder As String In sFolders
oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart("\"), 0, 0) oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 0, 0)
oChild.Name = sFolder oChild.Name = sFolder
oChild.Tag = 0 oChild.Tag = 0
oNode.Nodes.Add(oChild) oNode.Nodes.Add(oChild)
@@ -64,7 +64,7 @@ Public Class frmIncludeExclude
If sFiles.Length <> 0 Then If sFiles.Length <> 0 Then
For Each sFile As String In sFiles For Each sFile As String In sFiles
oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart("\"), 1, 1) oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 1, 1)
oChild.Tag = 1 oChild.Tag = 1
oNode.Nodes.Add(oChild) oNode.Nodes.Add(oChild)
Next Next
@@ -195,7 +195,7 @@ Public Class frmIncludeExclude
If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then
sFolderCheck = txtRootFolder.Text sFolderCheck = txtRootFolder.Text
Else Else
sFolderCheck = txtRootFolder.Text & "\" & sNewLabel sFolderCheck = txtRootFolder.Text & Path.DirectorySeparatorChar & sNewLabel
End If End If
If Directory.Exists(sFolderCheck) Then If Directory.Exists(sFolderCheck) Then
iType = 0 iType = 0
+11 -19
View File
@@ -47,9 +47,9 @@ Partial Class frmMain
Me.bwMonitor = New System.ComponentModel.BackgroundWorker() Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
Me.txtLog = New System.Windows.Forms.TextBox() Me.txtLog = New System.Windows.Forms.TextBox()
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip() Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripSplitButton() Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel() Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton() Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip() Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem() Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem() Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
@@ -99,7 +99,6 @@ Partial Class frmMain
Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu
Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon) Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
Me.gMonTray.Text = "GBM" Me.gMonTray.Text = "GBM"
Me.gMonTray.Visible = True
' '
'gMonTrayMenu 'gMonTrayMenu
' '
@@ -238,7 +237,7 @@ Partial Class frmMain
' '
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton}) Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 364) Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
Me.gMonStatusStrip.Name = "gMonStatusStrip" Me.gMonStatusStrip.Name = "gMonStatusStrip"
Me.gMonStatusStrip.ShowItemToolTips = True Me.gMonStatusStrip.ShowItemToolTips = True
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22) Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
@@ -248,33 +247,26 @@ Partial Class frmMain
'gMonStripAdminButton 'gMonStripAdminButton
' '
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.gMonStripAdminButton.DropDownButtonWidth = 0
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
Me.gMonStripAdminButton.Name = "gMonStripAdminButton" Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20) Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
Me.gMonStripAdminButton.Text = "Elevation" Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
Me.gMonStripAdminButton.ToolTipText = "Elevation"
' '
'gMonStripTxtStatus 'gMonStripTxtStatus
' '
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus" Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(395, 17) Me.gMonStripTxtStatus.Size = New System.Drawing.Size(400, 22)
Me.gMonStripTxtStatus.Spring = True Me.gMonStripTxtStatus.Spring = True
Me.gMonStripTxtStatus.Text = "Monitor Status" Me.gMonStripTxtStatus.Text = "Monitor Status"
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
' '
'gMonStripStatusButton 'gMonStripStatusButton
' '
Me.gMonStripStatusButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.gMonStripStatusButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.gMonStripStatusButton.DropDownButtonWidth = 0
Me.gMonStripStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta
Me.gMonStripStatusButton.Name = "gMonStripStatusButton" Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
Me.gMonStripStatusButton.Size = New System.Drawing.Size(93, 20) Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
Me.gMonStripStatusButton.Text = "Monitor Status:" Me.gMonStripStatusButton.Text = "Monitor Status:"
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
' '
'gMonMainMenu 'gMonMainMenu
' '
@@ -531,7 +523,7 @@ Partial Class frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(524, 386) Me.ClientSize = New System.Drawing.Size(524, 401)
Me.Controls.Add(Me.pbTime) Me.Controls.Add(Me.pbTime)
Me.Controls.Add(Me.lblStatus3) Me.Controls.Add(Me.lblStatus3)
Me.Controls.Add(Me.lblStatus2) Me.Controls.Add(Me.lblStatus2)
@@ -593,7 +585,6 @@ Partial Class frmMain
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripSplitButton
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
Friend WithEvents btnLogToggle As System.Windows.Forms.Button Friend WithEvents btnLogToggle As System.Windows.Forms.Button
Friend WithEvents lblGameTitle As System.Windows.Forms.Label Friend WithEvents lblGameTitle As System.Windows.Forms.Label
@@ -611,7 +602,6 @@ Partial Class frmMain
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents lblStatus1 As Label Friend WithEvents lblStatus1 As Label
@@ -629,4 +619,6 @@ Partial Class frmMain
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
Friend WithEvents gMonTrayLogClear As ToolStripMenuItem Friend WithEvents gMonTrayLogClear As ToolStripMenuItem
Friend WithEvents gMonTrayLogSave As ToolStripMenuItem Friend WithEvents gMonTrayLogSave As ToolStripMenuItem
Friend WithEvents gMonStripAdminButton As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripStatusLabel
End Class End Class
+94 -23
View File
@@ -29,6 +29,7 @@ Public Class frmMain
Private bFirstRun As Boolean = False Private bFirstRun As Boolean = False
Private bProcessIsAdmin As Boolean = False Private bProcessIsAdmin As Boolean = False
Private bLogToggle As Boolean = False Private bLogToggle As Boolean = False
Private bShowToggle As Boolean = True
Private bAllowIcon As Boolean = False Private bAllowIcon As Boolean = False
Private bAllowDetails As Boolean = False Private bAllowDetails As Boolean = False
Private oPriorImage As Image Private oPriorImage As Image
@@ -36,6 +37,9 @@ Public Class frmMain
Private sPriorCompany As String Private sPriorCompany As String
Private sPriorVersion As String Private sPriorVersion As String
'Developer Debug Flags
Private bProcessDebugMode As Boolean = False
WithEvents oFileWatcher As New System.IO.FileSystemWatcher WithEvents oFileWatcher As New System.IO.FileSystemWatcher
WithEvents tmScanTimer As New Timer WithEvents tmScanTimer As New Timer
@@ -93,7 +97,7 @@ Public Class frmMain
If oGame.AbsolutePath Then If oGame.AbsolutePath Then
sStatus2 = oGame.Path sStatus2 = oGame.Path
Else Else
sStatus2 = oGame.ProcessPath & "\" & oGame.Path sStatus2 = oGame.ProcessPath & System.IO.Path.DirectorySeparatorChar & oGame.Path
End If End If
sStatus3 = String.Empty sStatus3 = String.Empty
@@ -329,8 +333,16 @@ Public Class frmMain
Dim fbBrowser As New OpenFileDialog Dim fbBrowser As New OpenFileDialog
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName) fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
'Unix Handler
If Not mgrCommon.IsUnix Then
fbBrowser.DefaultExt = "ico" fbBrowser.DefaultExt = "ico"
fbBrowser.Filter = frmMain_IconFilter fbBrowser.Filter = frmMain_IconFilter
Else
fbBrowser.DefaultExt = "png"
fbBrowser.Filter = frmMain_PNGFilter
End If
Try Try
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName) fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
Catch ex As Exception Catch ex As Exception
@@ -559,8 +571,11 @@ Public Class frmMain
sMainCommand = sFullCommand.Split(cDelimters, 2)(0) sMainCommand = sFullCommand.Split(cDelimters, 2)(0)
'Parse Command 'Parse Command
Select Case sMainCommand Select Case sMainCommand.ToLower
Case "SQL" Case "sql"
'Run a SQL command directly on any database
'Usage: SQL {Local or Remote} SQL Command
Dim oDatabase As mgrSQLite Dim oDatabase As mgrSQLite
Dim bSuccess As Boolean Dim bSuccess As Boolean
@@ -572,9 +587,9 @@ Public Class frmMain
Exit Select Exit Select
End If End If
If sCommand(1) = "Local" Then If sCommand(1).ToLower = "local" Then
oDatabase = New mgrSQLite(mgrSQLite.Database.Local) oDatabase = New mgrSQLite(mgrSQLite.Database.Local)
ElseIf sCommand(1) = "Remote" Then ElseIf sCommand(1).ToLower = "remote" Then
oDatabase = New mgrSQLite(mgrSQLite.Database.Remote) oDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
Else Else
mgrCommon.ShowMessage(frmMain_ErrorCommandBadParam, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmMain_ErrorCommandBadParam, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation)
@@ -589,6 +604,34 @@ Public Class frmMain
mgrCommon.ShowMessage(frmMain_CommandFail, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmMain_CommandFail, MsgBoxStyle.Exclamation)
End If End If
Case "debug"
'Enable or disable various debug modes
'Usage: DEBUG Mode {Enable or Disable}
sCommand = sFullCommand.Split(cDelimters, 3)
Dim bDebugEnable As Boolean = False
'Check Paramters
If sCommand.Length < 3 Then
mgrCommon.ShowMessage(frmMain_ErrorMissingParams, sCommand(0), MsgBoxStyle.Exclamation)
Exit Select
End If
If sCommand(2).ToLower = "enable" Then
bDebugEnable = True
ElseIf sCommand(2).ToLower = "disable" Then
bDebugEnable = False
Else
mgrCommon.ShowMessage(frmMain_ErrorCommandBadParam, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation)
Exit Select
End If
Select Case sCommand(1).ToLower
Case "process"
bProcessDebugMode = bDebugEnable
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
End Select
Case Else Case Else
mgrCommon.ShowMessage(frmMain_ErrorCommandInvalid, sMainCommand, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmMain_ErrorCommandInvalid, sMainCommand, MsgBoxStyle.Exclamation)
End Select End Select
@@ -798,14 +841,21 @@ Public Class frmMain
Private Sub ToggleLog() Private Sub ToggleLog()
If bLogToggle = False Then If bLogToggle = False Then
txtLog.Visible = True txtLog.Visible = True
Me.Size = New System.Drawing.Size(540, 425)
'Unix Handler
If mgrCommon.IsUnix Then
Me.Size = New System.Drawing.Size(Me.Size.Width, 440)
Else
Me.Size = New System.Drawing.Size(Me.Size.Width, 425)
End If
bLogToggle = True bLogToggle = True
btnLogToggle.Text = frmMain_btnToggleLog_Hide btnLogToggle.Text = frmMain_btnToggleLog_Hide
txtLog.Select(txtLog.TextLength, 0) txtLog.Select(txtLog.TextLength, 0)
txtLog.ScrollToCaret() txtLog.ScrollToCaret()
Else Else
txtLog.Visible = False txtLog.Visible = False
Me.Size = New System.Drawing.Size(540, 245) Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
bLogToggle = False bLogToggle = False
btnLogToggle.Text = frmMain_btnToggleLog_Show btnLogToggle.Text = frmMain_btnToggleLog_Show
End If End If
@@ -813,11 +863,13 @@ Public Class frmMain
Private Sub ToggleState() Private Sub ToggleState()
'Toggle State with Tray Clicks 'Toggle State with Tray Clicks
If Me.Visible = False Then If Not bShowToggle Then
bShowToggle = True
Me.Visible = True Me.Visible = True
Me.ShowInTaskbar = True Me.ShowInTaskbar = True
Me.Focus() Me.Focus()
Else Else
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
End If End If
@@ -1080,7 +1132,7 @@ Public Class frmMain
lblLastAction.Text = String.Empty lblLastAction.Text = String.Empty
pbTime.SizeMode = PictureBoxSizeMode.AutoSize pbTime.SizeMode = PictureBoxSizeMode.AutoSize
pbTime.Image = Icon_Clock pbTime.Image = Icon_Clock
Me.Size = New System.Drawing.Size(540, 245) Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
ResetGameInfo() ResetGameInfo()
End Sub End Sub
@@ -1245,6 +1297,8 @@ Public Class frmMain
'Functions to handle other features 'Functions to handle other features
Private Sub RestartAsAdmin() Private Sub RestartAsAdmin()
'Unix Hanlder
If Not mgrCommon.IsUnix Then
If mgrCommon.IsElevated Then If mgrCommon.IsElevated Then
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information) mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
Else Else
@@ -1254,6 +1308,9 @@ Public Class frmMain
ShutdownApp(False) ShutdownApp(False)
End If End If
End If End If
Else
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
End If
End Sub End Sub
Private Sub CleanLocalManifest() Private Sub CleanLocalManifest()
@@ -1386,7 +1443,7 @@ Public Class frmMain
ToggleLog() ToggleLog()
End Sub End Sub
Private Sub gMonStripSplitButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.ButtonClick Private Sub gMonStripSplitStatusButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.Click
ScanToggle() ScanToggle()
End Sub End Sub
@@ -1397,6 +1454,7 @@ Public Class frmMain
End Sub End Sub
Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked
bShowToggle = True
Me.Visible = True Me.Visible = True
Me.ShowInTaskbar = True Me.ShowInTaskbar = True
Me.Focus() Me.Focus()
@@ -1406,7 +1464,7 @@ Public Class frmMain
OperationCancel() OperationCancel()
End Sub End Sub
Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.ButtonClick Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.Click
RestartAsAdmin() RestartAsAdmin()
End Sub End Sub
@@ -1416,12 +1474,20 @@ Public Class frmMain
End Sub End Sub
Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
'Intercept Exit & Minimize 'Unix Handler
If mgrCommon.IsUnix And Not bShutdown Then
ShutdownApp()
End If
'Intercept Exit
If bShutdown = False Then If bShutdown = False Then
e.Cancel = True e.Cancel = True
If Not mgrCommon.IsUnix Then
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
End If End If
End If
End Sub End Sub
Private Sub ScanTimerEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmScanTimer.Tick Private Sub ScanTimerEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmScanTimer.Tick
@@ -1431,7 +1497,7 @@ Public Class frmMain
Dim iErrorCode As Integer = 0 Dim iErrorCode As Integer = 0
Dim sErrorMessage As String = String.Empty Dim sErrorMessage As String = String.Empty
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode) Then If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
PauseScan() PauseScan()
If bNeedsPath Then If bNeedsPath Then
@@ -1534,7 +1600,6 @@ Public Class frmMain
End Sub End Sub
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Init 'Init
Try Try
SetForm() SetForm()
@@ -1542,7 +1607,8 @@ Public Class frmMain
LoadAndVerify() LoadAndVerify()
VerifyCustomPathVariables() VerifyCustomPathVariables()
If oSettings.StartToTray Then If oSettings.StartToTray And Not mgrCommon.IsUnix Then
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
End If End If
@@ -1555,25 +1621,30 @@ Public Class frmMain
HandleScan() HandleScan()
CheckForNewBackups() CheckForNewBackups()
Catch niex As NotImplementedException
'Ignore for Mono runtime tests
Catch ex As Exception Catch ex As Exception
mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.Critical) If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
bInitFail = True bInitFail = True
End If
End Try End Try
'Unix Handler
If mgrCommon.IsUnix Then
Me.MinimizeBox = True
Else
Me.gMonTray.Visible = True
End If
End Sub End Sub
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
If bFirstRun And Not bInitFail Then
OpenStartupWizard()
End If
If bInitFail Then If bInitFail Then
bShutdown = True bShutdown = True
Me.Close() Me.Close()
End If End If
If bFirstRun And Not bShutdown Then
OpenStartupWizard()
End If
End Sub End Sub
Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs) Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs)
+12
View File
@@ -113,6 +113,12 @@ Public Class frmSettings
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
cboCompression.SelectedValue = oSettings.CompressionLevel cboCompression.SelectedValue = oSettings.CompressionLevel
'Unix Handler
If mgrCommon.IsUnix Then
chkStartToTray.Checked = False
chkStartWindows.Checked = False
End If
End Sub End Sub
Private Sub LoadCombos() Private Sub LoadCombos()
@@ -159,6 +165,12 @@ Public Class frmSettings
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
grp7z.Text = frmSettings_grp7z grp7z.Text = frmSettings_grp7z
lblCompression.Text = frmSettings_lblCompression lblCompression.Text = frmSettings_lblCompression
'Unix Handler
If mgrCommon.IsUnix Then
chkStartToTray.Enabled = False
chkStartWindows.Enabled = False
End If
End Sub End Sub
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
+1 -2
View File
@@ -96,11 +96,10 @@ Partial Class frmStartUpWizard
' '
'llbManual 'llbManual
' '
Me.llbManual.AutoSize = True
Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.llbManual.Location = New System.Drawing.Point(14, 158) Me.llbManual.Location = New System.Drawing.Point(14, 158)
Me.llbManual.Name = "llbManual" Me.llbManual.Name = "llbManual"
Me.llbManual.Size = New System.Drawing.Size(151, 13) Me.llbManual.Size = New System.Drawing.Size(303, 13)
Me.llbManual.TabIndex = 3 Me.llbManual.TabIndex = 3
Me.llbManual.TabStop = True Me.llbManual.TabStop = True
Me.llbManual.Text = "Game Backup Monitor Manual" Me.llbManual.Text = "Game Backup Monitor Manual"
+6
View File
@@ -98,6 +98,12 @@ Public Class frmStartUpWizard
End Sub End Sub
Private Sub DownloadSettings() Private Sub DownloadSettings()
If mgrCommon.IsUnix Then
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Exit Sub
End If
End If
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then If mgrMonitorList.DoImport(App_URLImport) Then
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList) oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
+18 -12
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -90,13 +90,21 @@
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<PostBuildEvent Condition="$(Platform)==x64">echo Running x64 Post Build Event...
COPY /Y "$(SolutionDir)\GBM\x64\sqlite3.dll" .
RMDIR /S /Q Utilities\x86</PostBuildEvent>
<PostBuildEvent Condition="$(Platform)==x86">echo Running x86 Post Build Event...
COPY /Y "$(SolutionDir)\GBM\x86\sqlite3.dll" .
RMDIR /S /Q Utilities\x64</PostBuildEvent>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
@@ -320,7 +328,8 @@
<Content Include="License\credits.txt"> <Content Include="License\credits.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="References\System.Data.SQLite.dll" /> <Content Include="References\Mono.Data.Sqlite.dll" />
<Content Include="x86\sqlite3.dll" />
<None Include="Resources\gbm.ico" /> <None Include="Resources\gbm.ico" />
<Content Include="Resources\Admin.png" /> <Content Include="Resources\Admin.png" />
<Content Include="Resources\Clock.png" /> <Content Include="Resources\Clock.png" />
@@ -332,6 +341,7 @@
<Content Include="Resources\Inbox.png" /> <Content Include="Resources\Inbox.png" />
<Content Include="Resources\type.ico" /> <Content Include="Resources\type.ico" />
<Content Include="Resources\User.png" /> <Content Include="Resources\User.png" />
<Content Include="x64\sqlite3.dll" />
<Content Include="Utilities\x64\7za.dll"> <Content Include="Utilities\x64\7za.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@@ -350,12 +360,6 @@
<Content Include="Utilities\x86\7zxa.dll"> <Content Include="Utilities\x86\7zxa.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Resources\Stopped.png" /> <None Include="Resources\Stopped.png" />
<None Include="Resources\Detected.png" /> <None Include="Resources\Detected.png" />
<None Include="Resources\Ready.png" /> <None Include="Resources\Ready.png" />
@@ -387,6 +391,7 @@
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@@ -394,5 +399,6 @@
</Target> </Target>
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+6 -1
View File
@@ -117,7 +117,7 @@ Public Class mgrBackup
End If End If
If oSettings.CreateSubFolder Then If oSettings.CreateSubFolder Then
sBackupFile = sBackupFile & "\" & oGame.Name sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
Try Try
If Not Directory.Exists(sBackupFile) Then If Not Directory.Exists(sBackupFile) Then
Directory.CreateDirectory(sBackupFile) Directory.CreateDirectory(sBackupFile)
@@ -168,7 +168,12 @@ Public Class mgrBackup
End If End If
If Directory.Exists(sSavePath) Then If Directory.Exists(sSavePath) Then
'The Linux version of 7za doesn't support the new verbose parameters and fails out. Just split this up for now until we have a better solution.
If mgrCommon.IsUnix Then
prs7z.StartInfo.Arguments = "a -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
Else
prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r" prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
End If
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
+43 -5
View File
@@ -1,6 +1,7 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.Net Imports System.Net
Imports System.IO Imports System.IO
Imports System.Security.Principal
Public Class mgrCommon Public Class mgrCommon
@@ -97,6 +98,11 @@ Public Class mgrCommon
Dim sExemptList As String() = {"dosbox", "scummvm"} Dim sExemptList As String() = {"dosbox", "scummvm"}
Dim bFound As Boolean = False Dim bFound As Boolean = False
'We can't search if we don't have a configuration
If oGame.Temporary Then
Return True
End If
For Each s As String In sExemptList For Each s As String In sExemptList
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
Next Next
@@ -108,12 +114,18 @@ Public Class mgrCommon
End If End If
End Function End Function
Public Shared Function IsElevated() As Boolean Public Shared Function IsUnix() As Boolean
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then If Path.DirectorySeparatorChar = "/" Then
Return True Return True
Else
Return False
End If End If
Return False
End Function
Public Shared Function IsElevated() As Boolean
Dim oID As WindowsIdentity = WindowsIdentity.GetCurrent
Dim oPrincipal As New WindowsPrincipal(oID)
Return oPrincipal.IsInRole(WindowsBuiltInRole.Administrator)
End Function End Function
Public Shared Sub RestartAsAdmin() Public Shared Sub RestartAsAdmin()
@@ -127,12 +139,38 @@ Public Class mgrCommon
oProcess.Start() oProcess.Start()
End Sub End Sub
'Delete file based on OS type
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
If File.Exists(sPath) Then
If IsUnix() Then
File.Delete(sPath)
Else
If bRecycle Then
My.Computer.FileSystem.DeleteFile(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
Else
File.Delete(sPath)
End If
End If
End If
End Sub
'Delete directory based on OS type
Public Shared Sub DeleteDirectory(ByVal sPath As String, Optional ByVal bRecursive As Boolean = False)
If Directory.Exists(sPath) Then
If IsUnix() Then
Directory.Delete(sPath, bRecursive)
Else
My.Computer.FileSystem.DeleteDirectory(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
End If
End If
End Sub
'Save string as text file 'Save string as text file
Public Shared Sub SaveText(ByVal sText As String, ByVal sPath As String) Public Shared Sub SaveText(ByVal sText As String, ByVal sPath As String)
Dim oStream As StreamWriter Dim oStream As StreamWriter
Try Try
If File.Exists(sPath) Then My.Computer.FileSystem.DeleteFile(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin) If File.Exists(sPath) Then DeleteFile(sPath, False)
oStream = New StreamWriter(sPath) oStream = New StreamWriter(sPath)
oStream.Write(sText) oStream.Write(sText)
oStream.Flush() oStream.Flush()
+53 -33
View File
@@ -39,6 +39,10 @@ Public Class mgrPath
Shared ReadOnly Property Utility7zLocation As String Shared ReadOnly Property Utility7zLocation As String
Get Get
If mgrCommon.IsUnix Then
Return "/usr/bin/7za"
End If
Select Case oReleaseType Select Case oReleaseType
Case ProcessorArchitecture.Amd64 Case ProcessorArchitecture.Amd64
Return Application.StartupPath & "/Utilities/x64/7za.exe" Return Application.StartupPath & "/Utilities/x64/7za.exe"
@@ -91,7 +95,7 @@ Public Class mgrPath
Return sRemoteDatabaseLocation Return sRemoteDatabaseLocation
End Get End Get
Set(value As String) Set(value As String)
sRemoteDatabaseLocation = value & "\gbm.s3db" sRemoteDatabaseLocation = value & "/gbm.s3db"
End Set End Set
End Property End Property
@@ -121,10 +125,14 @@ Public Class mgrPath
Dim bDeep As Boolean Dim bDeep As Boolean
Dim cDS As Char = Path.DirectorySeparatorChar 'Set the directory seperator based on the OS Dim cDS As Char = Path.DirectorySeparatorChar 'Set the directory seperator based on the OS
'If we are working with a case insenstive file system, use a uniform case. **Look into removing this completely** If Not mgrCommon.IsUnix Then
If cDS <> "/" Then 'Checking the seperator to determine OS is better than messing with enumerations that weren't always supported 'If we are working with a case insenstive file system, use a uniform case to reduce possible issues
sProcessPath = sProcessPath.ToLower sProcessPath = sProcessPath.ToLower
sSavePath = sSavePath.ToLower sSavePath = sSavePath.ToLower
Else
'If we are on Unix trim the root off
sProcessPath = sProcessPath.TrimStart(cDS)
sSavePath = sSavePath.TrimStart(cDS)
End If End If
'We need to ensure we have a single trailing slash on the parameters 'We need to ensure we have a single trailing slash on the parameters
@@ -133,6 +141,7 @@ Public Class mgrPath
sProcessPath &= cDS sProcessPath &= cDS
sSavePath &= cDS sSavePath &= cDS
'Determines the direction we need to go, we always want to be relative to the process location 'Determines the direction we need to go, we always want to be relative to the process location
If sSavePath.Split(cDS).Length > sProcessPath.Split(cDS).Length Then If sSavePath.Split(cDS).Length > sProcessPath.Split(cDS).Length Then
sPath1 = sProcessPath sPath1 = sProcessPath
@@ -191,13 +200,12 @@ Public Class mgrPath
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
If sValue.Contains("*mydocs*") Then
Return sValue.Replace("*mydocs*", sMyDocs)
End If
If sValue.Contains("*publicdocs*") Then For Each oCustomVariable In hshCustomVariables.Values
Return sValue.Replace("*publicdocs*", sPublicDocs) If sValue.Contains(oCustomVariable.FormattedName) Then
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
End If End If
Next
If sValue.Contains("*appdatalocal*") Then If sValue.Contains("*appdatalocal*") Then
Return sValue.Replace("*appdatalocal*", sAppDataLocal) Return sValue.Replace("*appdatalocal*", sAppDataLocal)
@@ -207,15 +215,21 @@ Public Class mgrPath
Return sValue.Replace("*appdataroaming*", sAppDataRoaming) Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
End If End If
'This needs to be tested last for Unix compatability
If sValue.Contains("*mydocs*") Then
Return sValue.Replace("*mydocs*", sMyDocs)
End If
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
If sValue.Contains("*publicdocs*") Then
Return sValue.Replace("*publicdocs*", sPublicDocs)
End If
If sValue.Contains("*currentuser*") Then If sValue.Contains("*currentuser*") Then
Return sValue.Replace("*currentuser*", sCurrentUser) Return sValue.Replace("*currentuser*", sCurrentUser)
End If End If
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.FormattedName) Then
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
End If End If
Next
Return sValue Return sValue
End Function End Function
@@ -228,13 +242,11 @@ Public Class mgrPath
Dim sCurrentUser As String = "*currentuser*" Dim sCurrentUser As String = "*currentuser*"
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then For Each oCustomVariable In hshCustomVariables.Values
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs) If sValue.Contains(oCustomVariable.Path) Then
End If Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
End If End If
Next
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
@@ -244,15 +256,21 @@ Public Class mgrPath
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
End If End If
'This needs to be tested last for Unix compatability
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
End If
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
End If
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
End If End If
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.Path) Then
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
End If End If
Next
Return sValue Return sValue
End Function End Function
@@ -262,11 +280,16 @@ Public Class mgrPath
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)) hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
End If
'Load Custom Variables 'Load Custom Variables
For Each oCustomVariable In hshCustomVariables.Values For Each oCustomVariable In hshCustomVariables.Values
@@ -323,6 +346,7 @@ Public Class mgrPath
Dim sFolder As String = String.Empty Dim sFolder As String = String.Empty
Dim bSearchFailed As Boolean = False Dim bSearchFailed As Boolean = False
frmFind.GameName = sGameName
frmFind.SearchItem = sProcess & ".*" frmFind.SearchItem = sProcess & ".*"
frmFind.FolderSearch = False frmFind.FolderSearch = False
@@ -343,13 +367,7 @@ Public Class mgrPath
frmFind.ShowDialog() frmFind.ShowDialog()
If frmFind.FoundItem <> String.Empty Then If frmFind.FoundItem <> String.Empty Then
sFolder = IO.Path.GetDirectoryName(frmFind.FoundItem) Return frmFind.FoundItem
sMessage = mgrCommon.FormatString(mgrPath_ConfirmPathCorrect, New String() {sGameName, sFolder})
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Return sFolder
Else
sFolder = String.Empty
End If
Else Else
bSearchFailed = True bSearchFailed = True
End If End If
@@ -363,6 +381,8 @@ Public Class mgrPath
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualgamePath() sFolder = SetManualgamePath()
End If End If
frmFind.Dispose()
End If End If
Return sFolder Return sFolder
+66 -1
View File
@@ -85,13 +85,70 @@ Public Class mgrProcesses
Next Next
End Sub End Sub
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer) As Boolean 'This function will only work correctly on Unix
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
Dim sArguments As String
Try
sArguments = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline")
Return sArguments.Split(vbNullChar)
Catch ex As Exception
Return New String() {String.Empty}
End Try
End Function
'This function will only work correctly on Unix
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
Dim prsls As Process
Dim slsinfo As String()
'This is the best way I can think of to determine the end point of a symlink without doing even more crazy shit
Try
prsls = New Process
prsls.StartInfo.FileName = "/bin/bash"
prsls.StartInfo.Arguments = "-c ""ls -l /proc/" & prs.Id.ToString & " | grep cwd"""
prsls.StartInfo.UseShellExecute = False
prsls.StartInfo.RedirectStandardOutput = True
prsls.StartInfo.CreateNoWindow = True
prsls.Start()
slsinfo = prsls.StandardOutput.ReadToEnd().Split(">")
Return slsinfo(slsinfo.Length - 1).Trim
Catch ex As Exception
Return String.Empty
End Try
End Function
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
Dim prsList() As Process = Process.GetProcesses Dim prsList() As Process = Process.GetProcesses
Dim sProcessCheck As String = String.Empty Dim sProcessCheck As String = String.Empty
Dim sProcessList As String = String.Empty
Dim bWineProcess As Boolean = False
For Each prsCurrent As Process In prsList For Each prsCurrent As Process In prsList
'This needs to be wrapped due to issues with Mono.
Try
sProcessCheck = prsCurrent.ProcessName sProcessCheck = prsCurrent.ProcessName
'Unix Handler
'We need some special handling for Wine processes
If mgrCommon.IsUnix And sProcessCheck.ToLower = "wine-preloader" Then
Dim sWinePath As String()
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and the Unix version of the function expects a different one.
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
bWineProcess = True
Else
bWineProcess = False
End If
If bDebugMode And mgrCommon.IsUnix Then
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetUnixProcessArguments(prsCurrent)(0) & vbCrLf
ElseIf bDebugMode Then
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & vbCrLf
End If
Catch ex As Exception
'Do Nothing
End Try
If hshScanList.ContainsKey(sProcessCheck) Then If hshScanList.ContainsKey(sProcessCheck) Then
prsFoundProcess = prsCurrent prsFoundProcess = prsCurrent
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
@@ -105,7 +162,11 @@ Public Class mgrProcesses
If Not oGame.AbsolutePath Or oGame.Duplicate Then If Not oGame.AbsolutePath Or oGame.Duplicate Then
Try Try
If Not bWineProcess Then
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName) oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
Else
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
End If
Catch exWin32 As System.ComponentModel.Win32Exception Catch exWin32 As System.ComponentModel.Win32Exception
'If an exception occurs the process is: 'If an exception occurs the process is:
'Running as administrator and the app isn't. 'Running as administrator and the app isn't.
@@ -117,10 +178,12 @@ Public Class mgrProcesses
bNeedsPath = True bNeedsPath = True
iErrorCode = 299 iErrorCode = 299
Else Else
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
'A different failure occured, drop out and continue to scan. 'A different failure occured, drop out and continue to scan.
Return False Return False
End If End If
Catch exAll As Exception Catch exAll As Exception
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
'A different failure occured, drop out and continue to scan. 'A different failure occured, drop out and continue to scan.
Return False Return False
End Try End Try
@@ -137,6 +200,8 @@ Public Class mgrProcesses
End If End If
Next Next
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
Return False Return False
End Function End Function
+12 -19
View File
@@ -28,35 +28,24 @@ Public Class mgrRestore
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup) Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
Public Event SetLastAction(sMessage As String) Public Event SetLastAction(sMessage As String)
Private Shared Function CheckForPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame) As Boolean Public Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
Dim oResult As MsgBoxResult 'Always override the manifest restore path with the current configuration path if possible
If Not oCheckGame.Temporary Then
If oCheckBackup.RestorePath <> oCheckGame.Path Then
oResult = mgrCommon.ShowMessage(mgrRestore_ConfirmPathMismatch, oCheckBackup.CroppedName, MsgBoxStyle.YesNoCancel)
If oResult = MsgBoxResult.Yes Then
If Path.IsPathRooted(oCheckGame.Path) Then If Path.IsPathRooted(oCheckGame.Path) Then
oCheckBackup.AbsolutePath = True oCheckBackup.AbsolutePath = True
oCheckBackup.RestorePath = oCheckGame.Path
Else Else
oCheckBackup.AbsolutePath = False
End If
oCheckBackup.RestorePath = oCheckGame.Path oCheckBackup.RestorePath = oCheckGame.Path
End If End If
ElseIf oResult = MsgBoxResult.Cancel Then End Sub
Return False
End If
End If
Return True
End Function
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
Dim sProcess As String Dim sProcess As String
Dim sRestorePath As String Dim sRestorePath As String
Dim bNoAuto As Boolean Dim bNoAuto As Boolean
'Before we do anything check if we need to override the current path DoPathOverride(oRestoreInfo, oGame)
If Not CheckForPathOverride(oRestoreInfo, oGame) Then
Return False
End If
If Not oRestoreInfo.AbsolutePath Then If Not oRestoreInfo.AbsolutePath Then
If oGame.ProcessPath <> String.Empty Then If oGame.ProcessPath <> String.Empty Then
@@ -232,7 +221,11 @@ Public Class mgrRestore
If bDoRestore Then If bDoRestore Then
Try Try
If File.Exists(sBackupFile) Then If File.Exists(sBackupFile) Then
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & "\"" -aoa -r" If mgrCommon.IsUnix Then
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
Else
prs7z.StartInfo.Arguments = "x -bb1 -bt """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
End If
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
+3 -2
View File
@@ -1,6 +1,6 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.IO Imports System.IO
Imports System.Data.SQLite Imports Mono.Data.Sqlite
Public Class mgrSQLite Public Class mgrSQLite
@@ -232,7 +232,8 @@ Public Class mgrSQLite
BuildParams(command, hshParams) BuildParams(command, hshParams)
Try Try
adapter = New SQLiteDataAdapter(command) adapter = New SqliteDataAdapter()
adapter.SelectCommand = command
adapter.Fill(oData) adapter.Fill(oData)
Catch ex As Exception Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
+30 -3
View File
@@ -78,6 +78,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to This function is currently not available on a Unix based operating system..
'''</summary>
Friend ReadOnly Property App_ErrorUnixNotAvailable() As String
Get
Return ResourceManager.GetString("App_ErrorUnixNotAvailable", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] KB. ''' Looks up a localized string similar to [PARAM] KB.
'''</summary> '''</summary>
@@ -1374,6 +1383,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to You appear to be using a Unix based operating system. The official list currently contains only Microsoft Windows game configurations.[BR][BR]Do you wish to continue?.
'''</summary>
Friend ReadOnly Property frmGameManager_ConfirmUnixImportWarning() As String
Get
Return ResourceManager.GetString("frmGameManager_ConfirmUnixImportWarning", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Game Backup Monitor Export. ''' Looks up a localized string similar to Game Backup Monitor Export.
'''</summary> '''</summary>
@@ -2212,7 +2230,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to 7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.. ''' Looks up a localized string similar to 7-Zip was not found. The application cannot continue..
'''</summary> '''</summary>
Friend ReadOnly Property frmMain_Error7zip() As String Friend ReadOnly Property frmMain_Error7zip() As String
Get Get
@@ -2329,7 +2347,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]The application will now exit.. ''' Looks up a localized string similar to An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended).
'''</summary> '''</summary>
Friend ReadOnly Property frmMain_ErrorInitFailure() As String Friend ReadOnly Property frmMain_ErrorInitFailure() As String
Get Get
@@ -2850,6 +2868,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to PNG files (*.png)|*.png.
'''</summary>
Friend ReadOnly Property frmMain_PNGFilter() As String
Get
Return ResourceManager.GetString("frmMain_PNGFilter", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB. ''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB.
'''</summary> '''</summary>
@@ -4016,7 +4043,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] files (*.[PARAM])|*.[PARAM]. ''' Looks up a localized string similar to [PARAM] files (*.[PARAM])|*.[PARAM]|All files (*.*)|*.*.
'''</summary> '''</summary>
Friend ReadOnly Property mgrCommon_FilesFilter() As String Friend ReadOnly Property mgrCommon_FilesFilter() As String
Get Get
+12 -3
View File
@@ -194,7 +194,7 @@
<value>[PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup.</value> <value>[PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup.</value>
</data> </data>
<data name="frmMain_Error7zip" xml:space="preserve"> <data name="frmMain_Error7zip" xml:space="preserve">
<value>7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.</value> <value>7-Zip was not found. The application cannot continue.</value>
</data> </data>
<data name="frmMain_ErrorAdminBackup" xml:space="preserve"> <data name="frmMain_ErrorAdminBackup" xml:space="preserve">
<value>[PARAM] is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup.</value> <value>[PARAM] is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup.</value>
@@ -1355,7 +1355,7 @@
<value>Generating SHA-256 hash for [PARAM] backup file.</value> <value>Generating SHA-256 hash for [PARAM] backup file.</value>
</data> </data>
<data name="mgrCommon_FilesFilter" xml:space="preserve"> <data name="mgrCommon_FilesFilter" xml:space="preserve">
<value>[PARAM] files (*.[PARAM])|*.[PARAM]</value> <value>[PARAM] files (*.[PARAM])|*.[PARAM]|All files (*.*)|*.*</value>
</data> </data>
<data name="mgrCommon_No" xml:space="preserve"> <data name="mgrCommon_No" xml:space="preserve">
<value>No</value> <value>No</value>
@@ -1559,6 +1559,15 @@
<value>The command [PARAM] requires more parameters.</value> <value>The command [PARAM] requires more parameters.</value>
</data> </data>
<data name="frmMain_ErrorInitFailure" xml:space="preserve"> <data name="frmMain_ErrorInitFailure" xml:space="preserve">
<value>An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]The application will now exit.</value> <value>An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended)</value>
</data>
<data name="App_ErrorUnixNotAvailable" xml:space="preserve">
<value>This function is currently not available on a Unix based operating system.</value>
</data>
<data name="frmGameManager_ConfirmUnixImportWarning" xml:space="preserve">
<value>You appear to be using a Unix based operating system. The official list currently contains only Microsoft Windows game configurations.[BR][BR]Do you wish to continue?</value>
</data>
<data name="frmMain_PNGFilter" xml:space="preserve">
<value>PNG files (*.png)|*.png</value>
</data> </data>
</root> </root>
Binary file not shown.
Binary file not shown.
+28 -6
View File
@@ -2,7 +2,7 @@ Game Backup Monitor v0.96 Preview Readme
http://mikemaximus.github.io/gbm-web/ http://mikemaximus.github.io/gbm-web/
gamebackupmonitor@gmail.com gamebackupmonitor@gmail.com
February 19, 2016 March 4, 2016
Disclaimer: Disclaimer:
@@ -10,10 +10,32 @@ This is beta release software. You may still encounter some bugs.
New in 0.96 New in 0.96
- Fixes for multi-select edits and various minor bugs. For more information regarding Linux support read the FAQ at http://mikemaximus.github.io/gbm-web/linux.html
- GBM now deletes all user files to the Windows recycle bin by default.
- Added the ability to clear and save the session log from the Tools menu. - (Linux) Added Linux support via Mono!
- GBM now auto-saves and clears the session log to %localappdata%\gbm if it reaches it's limit (2 MB). - (All) Replaced System.Data.SQLite with the Mono.Data.Sqlite for cross-platform support.
- The file size will be displayed in the session log after each backup. - (Windows) Updated GBM's version of 7-Zip to 15.14 (2015-12-31)
- (All) Added the ability to set the 7-Zip compression level on the Settings screen.
- (Windows) GBM now deletes all user files to the Windows recycle bin by default.
- (All) Added the ability to clear and save the session log from the Tools menu.
- (All) GBM now auto-saves and clears the session log to %localappdata%\gbm if it reaches it's limit (2 MB).
- (All) The file size will be displayed in the session log after each backup.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
Important Upgrade Information:
A very small percentage of users may experience the following error message after upgrading to this version:
Column 'CompressionLevel' does not belong to table Table.
If you get this error follow these steps:
1. Start GBM and click "Yes" to continue past the error.
2. Press CTRL and ~ (Tilde) to open the Developer Console.
3. Enter the command exactly as follows (or copy & paste it) then click OK.
SQL Local PRAGMA user_version=95
4. You'll receive confirmation that the command was executed. Click OK and immediately close GBM via the File menu.
5. Restart GBM and the error will no longer appear!
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.