Tweaks to icon extraction and error handling
This commit is contained in:
@@ -588,22 +588,26 @@ Public Class frmMain
|
||||
lblStatus1.Text = String.Empty
|
||||
lblStatus2.Text = String.Empty
|
||||
lblStatus3.Text = String.Empty
|
||||
pbIcon.Image = Icon_Unknown
|
||||
|
||||
'Get Process Information
|
||||
Try
|
||||
If Not mgrCommon.IsUnix Then
|
||||
'Grab icon from the executable and save a copy
|
||||
ic = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
||||
sIconFile = mgrPath.SettingsRoot & Path.DirectorySeparatorChar & oProcess.GameInfo.ID & ".bmp"
|
||||
ic.ToBitmap.Save(sIconFile)
|
||||
ic.Dispose()
|
||||
pbIcon.Image = Image.FromFile(sIconFile)
|
||||
End If
|
||||
|
||||
'Set Game Details
|
||||
pbIcon.Image = Image.FromFile(sIconFile)
|
||||
sFileName = oProcess.FoundProcess.MainModule.FileName
|
||||
sFileVersion = oProcess.FoundProcess.MainModule.FileVersionInfo.FileVersion
|
||||
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
|
||||
Catch ex As Exception
|
||||
pbIcon.Image = Icon_Unknown
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameDetails), False, ToolTipIcon.Error)
|
||||
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
|
||||
End Try
|
||||
|
||||
'Get Game Details
|
||||
|
||||
Generated
+9
-9
@@ -2877,15 +2877,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ConfirmManifestClean() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_ConfirmManifestClean", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Do you wish to cancel the monitoring of [PARAM]?[BR][BR]Warning: When monitoring is cancelled, session time is NOT saved..
|
||||
'''</summary>
|
||||
@@ -3084,6 +3075,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to An error occured while obtaining the details of the detected game..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorGameDetails() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_ErrorGameDetails", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 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>
|
||||
|
||||
@@ -133,9 +133,6 @@
|
||||
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
|
||||
<value>[PARAM] entries were removed from the local manifest.</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmManifestClean" xml:space="preserve">
|
||||
<value>This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmRebuild" xml:space="preserve">
|
||||
<value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value>
|
||||
</data>
|
||||
@@ -2194,4 +2191,7 @@
|
||||
<data name="mgrPath_SpecialPathError" xml:space="preserve">
|
||||
<value>An error occured while determining a required system path. [BR][BR]The environment value for [PARAM] is empty.[BR][BR]The application will now exit.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorGameDetails" xml:space="preserve">
|
||||
<value>An error occured while obtaining the details of the detected game.</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user