Path fixes and PNG Unix icons

This commit is contained in:
Michael J. Seiferling
2016-03-03 16:42:49 -06:00
parent 0cafd00bf3
commit f050061b76
6 changed files with 52 additions and 31 deletions
-6
View File
@@ -99,7 +99,6 @@ Partial Class frmFilter
'
'optAll
'
Me.optAll.AutoSize = True
Me.optAll.Location = New System.Drawing.Point(77, 19)
Me.optAll.Name = "optAll"
Me.optAll.Size = New System.Drawing.Size(63, 17)
@@ -110,7 +109,6 @@ Partial Class frmFilter
'
'optAny
'
Me.optAny.AutoSize = True
Me.optAny.Checked = True
Me.optAny.Location = New System.Drawing.Point(6, 19)
Me.optAny.Name = "optAny"
@@ -213,7 +211,6 @@ Partial Class frmFilter
'
'optOr
'
Me.optOr.AutoSize = True
Me.optOr.Location = New System.Drawing.Point(56, 19)
Me.optOr.Name = "optOr"
Me.optOr.Size = New System.Drawing.Size(36, 17)
@@ -224,7 +221,6 @@ Partial Class frmFilter
'
'optAnd
'
Me.optAnd.AutoSize = True
Me.optAnd.Checked = True
Me.optAnd.Location = New System.Drawing.Point(6, 19)
Me.optAnd.Name = "optAnd"
@@ -302,11 +298,9 @@ Partial Class frmFilter
Me.grpTagFilter.ResumeLayout(False)
Me.grpTagFilter.PerformLayout()
Me.grpTagOptions.ResumeLayout(False)
Me.grpTagOptions.PerformLayout()
Me.grpGameFilter.ResumeLayout(False)
Me.grpGameFilter.PerformLayout()
Me.grpGameInfoOptions.ResumeLayout(False)
Me.grpGameInfoOptions.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
+8 -2
View File
@@ -336,8 +336,14 @@ Public Class frmGameManager
End If
End If
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
frmGameManager_Icon, sDefaultFolder, False)
'Unix Handler
If Not mgrCommon.IsUnix Then
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
frmGameManager_Icon, sDefaultFolder, False)
Else
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png", _
"PNG", sDefaultFolder, False)
End If
If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath
+10 -2
View File
@@ -333,8 +333,16 @@ Public Class frmMain
Dim fbBrowser As New OpenFileDialog
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
fbBrowser.DefaultExt = "ico"
fbBrowser.Filter = frmMain_IconFilter
'Unix Handler
If Not mgrCommon.IsUnix Then
fbBrowser.DefaultExt = "ico"
fbBrowser.Filter = frmMain_IconFilter
Else
fbBrowser.DefaultExt = "png"
fbBrowser.Filter = frmMain_PNGFilter
End If
Try
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
Catch ex As Exception
+22 -21
View File
@@ -201,6 +201,12 @@ Public Class mgrPath
Dim oCustomVariable As clsPathVariable
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.FormattedName) Then
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
End If
Next
If sValue.Contains("*appdatalocal*") Then
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
End If
@@ -209,12 +215,13 @@ Public Class mgrPath
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
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("*mydocs*") Then
Return sValue.Replace("*mydocs*", sMyDocs)
End If
If sValue.Contains("*publicdocs*") Then
Return sValue.Replace("*publicdocs*", sPublicDocs)
End If
@@ -224,12 +231,6 @@ Public Class mgrPath
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
Next
Return sValue
End Function
@@ -241,7 +242,12 @@ Public Class mgrPath
Dim sCurrentUser As String = "*currentuser*"
Dim oCustomVariable As clsPathVariable
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.Path) Then
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
End If
Next
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
End If
@@ -250,12 +256,13 @@ Public Class mgrPath
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
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.MyDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
End If
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
End If
@@ -265,12 +272,6 @@ Public Class mgrPath
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
Next
Return sValue
End Function
+9
View File
@@ -2868,6 +2868,15 @@ Namespace My.Resources
End Get
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>
''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB.
'''</summary>
+3
View File
@@ -1567,4 +1567,7 @@
<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>
</root>