More compatability updates
This commit is contained in:
@@ -83,7 +83,7 @@ Public Class frmAddWizard
|
||||
Dim sName As String = txtName.Text
|
||||
Dim sProcessFullPath As String = txtProcessPath.Text
|
||||
Dim sProcessPath As String = Path.GetDirectoryName(sProcessFullPath)
|
||||
Dim sProcess As String = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
Dim sProcess As String
|
||||
Dim sProcessSummaryText As String = Path.GetFileName(sProcessFullPath) & " (" & sProcessPath & ")"
|
||||
Dim sSavePath As String = txtSavePath.Text
|
||||
Dim bIsAbsolute As Boolean = mgrPath.IsAbsolute(sSavePath)
|
||||
@@ -100,6 +100,13 @@ Public Class frmAddWizard
|
||||
sSavePath = mgrPath.DetermineRelativePath(sProcessPath, sSavePath)
|
||||
End If
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
sProcess = Path.GetFileName(sProcessFullPath)
|
||||
Else
|
||||
sProcess = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
End If
|
||||
|
||||
'Build Summary Listview
|
||||
lstSummary.Clear()
|
||||
lstSummary.Columns.Add("Item")
|
||||
@@ -178,11 +185,11 @@ Public Class frmAddWizard
|
||||
Return False
|
||||
End If
|
||||
|
||||
'If Path.GetExtension(strPath.ToLower) <> ".exe" Then
|
||||
' sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||
' txtProcessPath.Focus()
|
||||
' Return False
|
||||
'End If
|
||||
If Path.GetExtension(strPath.ToLower) <> ".exe" And Not mgrCommon.IsUnix Then
|
||||
sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||
txtProcessPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Path.IsPathRooted(strPath) Then
|
||||
sErrorMessage = frmAddWizard_ErrorBadProcessPath
|
||||
|
||||
@@ -597,7 +597,7 @@ Public Class frmGameManager
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
|
||||
'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)
|
||||
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & "\") Then
|
||||
@@ -610,11 +610,11 @@ Public Class frmGameManager
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'Confirm
|
||||
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
|
||||
Else
|
||||
'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
|
||||
@@ -942,7 +942,7 @@ Public Class frmGameManager
|
||||
oApp.ID = txtID.Text
|
||||
End If
|
||||
oApp.Name = mgrPath.ValidateForFileSystem(txtName.Text)
|
||||
If Path.HasExtension(txtProcess.Text) Then
|
||||
If Path.HasExtension(txtProcess.Text) And Not mgrCommon.IsUnix Then
|
||||
If txtProcess.Text.ToLower.EndsWith(".exe") Then
|
||||
oApp.ProcessName = Path.GetFileNameWithoutExtension(txtProcess.Text)
|
||||
Else
|
||||
@@ -1219,13 +1219,17 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
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 mgrMonitorList.DoImport(App_URLImport) Then
|
||||
LoadData()
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
|
||||
Generated
-3
@@ -170,7 +170,6 @@ Partial Class frmIncludeExclude
|
||||
'
|
||||
'optFileTypes
|
||||
'
|
||||
Me.optFileTypes.AutoSize = True
|
||||
Me.optFileTypes.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optFileTypes.Name = "optFileTypes"
|
||||
Me.optFileTypes.Size = New System.Drawing.Size(73, 17)
|
||||
@@ -181,7 +180,6 @@ Partial Class frmIncludeExclude
|
||||
'
|
||||
'optIndividualFiles
|
||||
'
|
||||
Me.optIndividualFiles.AutoSize = True
|
||||
Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19)
|
||||
Me.optIndividualFiles.Name = "optIndividualFiles"
|
||||
Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17)
|
||||
@@ -250,7 +248,6 @@ Partial Class frmIncludeExclude
|
||||
Me.Text = "Include / Exclude Builder"
|
||||
Me.cmsItems.ResumeLayout(False)
|
||||
Me.grpFileOptions.ResumeLayout(False)
|
||||
Me.grpFileOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
||||
+36
-1
@@ -37,6 +37,9 @@ Public Class frmMain
|
||||
Private sPriorCompany As String
|
||||
Private sPriorVersion As String
|
||||
|
||||
'Developer Debug Flags
|
||||
Private bProcessDebugMode As Boolean = False
|
||||
|
||||
WithEvents oFileWatcher As New System.IO.FileSystemWatcher
|
||||
WithEvents tmScanTimer As New Timer
|
||||
|
||||
@@ -562,6 +565,9 @@ Public Class frmMain
|
||||
'Parse Command
|
||||
Select Case sMainCommand
|
||||
Case "SQL"
|
||||
'Run a SQL command directly on any database
|
||||
'Usage: SQL {Local or Remote} SQL Command
|
||||
|
||||
Dim oDatabase As mgrSQLite
|
||||
Dim bSuccess As Boolean
|
||||
|
||||
@@ -590,6 +596,34 @@ Public Class frmMain
|
||||
mgrCommon.ShowMessage(frmMain_CommandFail, MsgBoxStyle.Exclamation)
|
||||
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) = "Enable" Then
|
||||
bDebugEnable = True
|
||||
ElseIf sCommand(2) = "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)
|
||||
Case "Process"
|
||||
bProcessDebugMode = bDebugEnable
|
||||
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
|
||||
End Select
|
||||
Case Else
|
||||
mgrCommon.ShowMessage(frmMain_ErrorCommandInvalid, sMainCommand, MsgBoxStyle.Exclamation)
|
||||
End Select
|
||||
@@ -1434,6 +1468,7 @@ Public Class frmMain
|
||||
If bShutdown = False Then
|
||||
e.Cancel = True
|
||||
If Not mgrCommon.IsUnix Then
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
@@ -1447,7 +1482,7 @@ Public Class frmMain
|
||||
Dim iErrorCode As Integer = 0
|
||||
Dim sErrorMessage As String = String.Empty
|
||||
|
||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode) Then
|
||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
|
||||
PauseScan()
|
||||
|
||||
If bNeedsPath Then
|
||||
|
||||
Generated
+1
-2
@@ -96,11 +96,10 @@ Partial Class frmStartUpWizard
|
||||
'
|
||||
'llbManual
|
||||
'
|
||||
Me.llbManual.AutoSize = True
|
||||
Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
|
||||
Me.llbManual.Location = New System.Drawing.Point(14, 158)
|
||||
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.TabStop = True
|
||||
Me.llbManual.Text = "Game Backup Monitor Manual"
|
||||
|
||||
@@ -98,6 +98,12 @@ Public Class frmStartUpWizard
|
||||
End Sub
|
||||
|
||||
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 mgrMonitorList.DoImport(App_URLImport) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
|
||||
Reference in New Issue
Block a user