Prevent file locking of custom icons

This commit is contained in:
Michael J. Seiferling
2018-08-22 10:26:19 -06:00
parent 794b0f9908
commit f5972da9eb
3 changed files with 18 additions and 6 deletions
+4 -4
View File
@@ -382,7 +382,7 @@ Public Class frmGameManager
If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath
If IO.File.Exists(sNewPath) Then
pbIcon.Image = Image.FromFile(sNewPath)
pbIcon.Image = mgrCommon.SafeIconFromFile(sNewPath)
End If
End If
End Sub
@@ -794,7 +794,7 @@ Public Class frmGameManager
For Each oBackup In oBackupData
'Delete the specific remote manifest entry
mgrManifest.DoManifestDeletebyManifestID(oBackup, mgrSQLite.Database.Remote)
mgrManifest.DoManifestDeleteByManifestID(oBackup, mgrSQLite.Database.Remote)
'Delete referenced backup file from the backup folder
mgrCommon.DeleteFile(BackupFolder & oBackup.FileName)
'Check for sub-directory and delete if empty (we need to do this every pass just in case the user had a mix of settings at one point)
@@ -802,7 +802,7 @@ Public Class frmGameManager
Next
'Delete local manifest entry
mgrManifest.DoManifestDeletebyMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
mgrManifest.DoManifestDeleteByMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
LoadBackupData()
FillData()
@@ -868,7 +868,7 @@ Public Class frmGameManager
'Icon
If IO.File.Exists(oApp.Icon) Then
pbIcon.Image = Image.FromFile(oApp.Icon)
pbIcon.Image = mgrCommon.SafeIconFromFile(oApp.Icon)
Else
pbIcon.Image = Icon_Unknown
End If
+2 -2
View File
@@ -526,7 +526,7 @@ Public Class frmMain
sIcon = fbBrowser.FileName
If File.Exists(sIcon) Then
oProcess.GameInfo.Icon = sIcon
pbIcon.Image = Image.FromFile(sIcon)
pbIcon.Image = mgrCommon.SafeIconFromFile(sIcon)
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
End If
End If
@@ -645,7 +645,7 @@ Public Class frmMain
'Check for a custom icon & details
If File.Exists(oProcess.GameInfo.Icon) Then
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
pbIcon.Image = mgrCommon.SafeIconFromFile(oProcess.GameInfo.Icon)
End If
If sFileName = String.Empty Then
If oProcess.GameInfo.ProcessPath <> String.Empty Then