Moved strings to resource (frmAdvancedImport, frmChooseGame, frmFileFolderSearch, frmFilter)

This commit is contained in:
Michael J. Seiferling
2015-12-22 19:50:40 -06:00
parent 96ca94a3ac
commit 0e93d284ea
6 changed files with 394 additions and 15 deletions
+12 -8
View File
@@ -1,4 +1,6 @@
Public Class frmAdvancedImport
Imports GBM.My.Resources
Public Class frmAdvancedImport
Private hshImportData As Hashtable
Private bSelectAll As Boolean = False
@@ -36,8 +38,15 @@
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmAdvancedImport_FormName
'Set Form Text
btnCancel.Text = frmAdvancedImport_btnCancel
btnImport.Text = frmAdvancedImport_btnImport
chkSelectAll.Checked = True
lblGames.Text = ImportData.Count & " new configurations available."
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_NewConfigs, ImportData.Count)
End Sub
Private Sub BuildList()
@@ -52,7 +61,7 @@
End Sub
Private Sub UpdateSelected()
lblSelected.Text = lstGames.CheckedItems.Count & " Selected"
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, lstGames.CheckedItems.Count)
End Sub
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -61,11 +70,6 @@
LoadData()
SelectToggle()
bIsLoading = False
Dim sResource As String = String.Empty
Dim sCode As String = String.Empty
mgrCommon.GetAllStrings(Me, sResource, sCode, "frmAdvancedImport")
Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
End Sub
Private Sub chkSelectAll_CheckedChanged(sender As Object, e As EventArgs) Handles chkSelectAll.CheckedChanged
+19 -1
View File
@@ -1,4 +1,6 @@
Public Class frmChooseGame
Imports GBM.My.Resources
Public Class frmChooseGame
Private oProcess As mgrProcesses
Private oGame As clsGame
@@ -49,9 +51,25 @@
Me.Close()
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmChooseGame_FormName
'Set Form Text
btnCancel.Text = frmChooseGame_btnCancel
btnChoose.Text = frmChooseGame_btnChoose
lblChoose.Text = frmChooseGame_lblChoose
End Sub
Private Sub frmChooseGame_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SetForm()
FillComboBox()
Me.Focus()
Dim sResource As String = String.Empty
Dim sCode As String = String.Empty
mgrCommon.GetAllStrings(Me, sResource, sCode, "frmChooseGame")
Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
End Sub
Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click
+12 -4
View File
@@ -1,4 +1,5 @@
Imports System.IO
Imports GBM.My.Resources
Imports System.IO
Public Class frmFileFolderSearch
Private sSearchItem As String
@@ -135,9 +136,7 @@ Public Class frmFileFolderSearch
If FoundItem = "Cancel" Then FoundItem = String.Empty
If oDrives.Count > iCurrentDrive And FoundItem = String.Empty Then
oResult = mgrCommon.ShowMessage("The location was not found on the " & oSearchDrive.Root.ToString & _
" drive. Do you wish to search the " & oDrives(iCurrentDrive).RootDirectory.ToString & _
" drive?", MsgBoxStyle.YesNo)
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oSearchDrive.Root.ToString, oDrives(iCurrentDrive).RootDirectory.ToString}, MsgBoxStyle.YesNo)
If oResult = MsgBoxResult.Yes Then
Search(oDrives(iCurrentDrive))
Else
@@ -150,7 +149,16 @@ Public Class frmFileFolderSearch
End If
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmFileFolderSearch_FormName
'Set Form Text
btnCancel.Text = frmFileFolderSearch_btnCancel
End Sub
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
GetDrives()
Search(oDrives(iCurrentDrive))
End Sub
+27 -2
View File
@@ -1,4 +1,6 @@
Public Class frmFilter
Imports GBM.My.Resources
Public Class frmFilter
Public Enum eFilterType As Integer
NoFilter = 1
@@ -111,10 +113,11 @@
If optGameInfo.Checked Then
'Set Filter Type
If optAnd.Checked Then
eCurrentFilterType = eFilterType.FieldAnd
eCurrentFilterType = eFilterType.FieldAnd
Else
eCurrentFilterType = eFilterType.FieldOr
End If
'Set String Filter
If txtName.Text <> String.Empty Then
hshStringFilters.Add("Name", txtName.Text)
@@ -144,7 +147,29 @@
End Sub
Private Sub SetForm()
'Set Form Name
Me.Text = frmFilter_FormName
'Set Form Text
optOr.Text = frmFilter_optOr
optAnd.Text = frmFilter_optAnd
lblCompany.Text = frmFilter_lblCompany
lblProcess.Text = frmFilter_lblProcess
lblName.Text = frmFilter_lblName
optAll.Text = frmFilter_optAll
optAny.Text = frmFilter_optAny
lblGameTags.Text = frmFilter_lblGameTags
lblTags.Text = frmFilter_lblTags
btnRemove.Text = frmFilter_btnRemove
btnAdd.Text = frmFilter_btnAdd
btnOK.Text = frmFilter_btnOK
optTag.Text = frmFilter_optTag
optGameInfo.Text = frmFilter_optGameInfo
End Sub
Private Sub frmGameTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SetForm()
optGameInfo.Checked = True
LoadData()
End Sub
+243
View File
@@ -663,6 +663,249 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;Cancel.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_btnCancel() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_btnCancel", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;Import.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_btnImport() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_btnImport", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Import Game Configurations.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_FormName() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_FormName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] new configurations available..
'''</summary>
Friend ReadOnly Property frmAdvancedImport_NewConfigs() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_NewConfigs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] Selected.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_Selected() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_Selected", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;Cancel.
'''</summary>
Friend ReadOnly Property frmChooseGame_btnCancel() As String
Get
Return ResourceManager.GetString("frmChooseGame_btnCancel", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to C&amp;hoose Game.
'''</summary>
Friend ReadOnly Property frmChooseGame_btnChoose() As String
Get
Return ResourceManager.GetString("frmChooseGame_btnChoose", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Choose Game.
'''</summary>
Friend ReadOnly Property frmChooseGame_FormName() As String
Get
Return ResourceManager.GetString("frmChooseGame_FormName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Please choose the game you were playing:.
'''</summary>
Friend ReadOnly Property frmChooseGame_lblChoose() As String
Get
Return ResourceManager.GetString("frmChooseGame_lblChoose", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;Cancel.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_btnCancel() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_btnCancel", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Search.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_FormName() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_FormName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The location was not found on the [PARAM] drive. Do you wish to search the [PARAM] drive?.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_SwitchDrives() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_SwitchDrives", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &gt;.
'''</summary>
Friend ReadOnly Property frmFilter_btnAdd() As String
Get
Return ResourceManager.GetString("frmFilter_btnAdd", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;OK.
'''</summary>
Friend ReadOnly Property frmFilter_btnOK() As String
Get
Return ResourceManager.GetString("frmFilter_btnOK", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &lt;.
'''</summary>
Friend ReadOnly Property frmFilter_btnRemove() As String
Get
Return ResourceManager.GetString("frmFilter_btnRemove", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Custom Filter.
'''</summary>
Friend ReadOnly Property frmFilter_FormName() As String
Get
Return ResourceManager.GetString("frmFilter_FormName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Company:.
'''</summary>
Friend ReadOnly Property frmFilter_lblCompany() As String
Get
Return ResourceManager.GetString("frmFilter_lblCompany", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Current Filter.
'''</summary>
Friend ReadOnly Property frmFilter_lblGameTags() As String
Get
Return ResourceManager.GetString("frmFilter_lblGameTags", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name:.
'''</summary>
Friend ReadOnly Property frmFilter_lblName() As String
Get
Return ResourceManager.GetString("frmFilter_lblName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Process:.
'''</summary>
Friend ReadOnly Property frmFilter_lblProcess() As String
Get
Return ResourceManager.GetString("frmFilter_lblProcess", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Available Tags.
'''</summary>
Friend ReadOnly Property frmFilter_lblTags() As String
Get
Return ResourceManager.GetString("frmFilter_lblTags", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to All Tags.
'''</summary>
Friend ReadOnly Property frmFilter_optAll() As String
Get
Return ResourceManager.GetString("frmFilter_optAll", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to And.
'''</summary>
Friend ReadOnly Property frmFilter_optAnd() As String
Get
Return ResourceManager.GetString("frmFilter_optAnd", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Any Tag.
'''</summary>
Friend ReadOnly Property frmFilter_optAny() As String
Get
Return ResourceManager.GetString("frmFilter_optAny", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Game Information.
'''</summary>
Friend ReadOnly Property frmFilter_optGameInfo() As String
Get
Return ResourceManager.GetString("frmFilter_optGameInfo", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Or.
'''</summary>
Friend ReadOnly Property frmFilter_optOr() As String
Get
Return ResourceManager.GetString("frmFilter_optOr", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tag.
'''</summary>
Friend ReadOnly Property frmFilter_optTag() As String
Get
Return ResourceManager.GetString("frmFilter_optTag", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] by [PARAM].
'''</summary>
+81
View File
@@ -862,4 +862,85 @@
<data name="frmAddWizard_Summary_Timestamp" xml:space="preserve">
<value>Timestamp</value>
</data>
<data name="frmAdvancedImport_btnCancel" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="frmAdvancedImport_btnImport" xml:space="preserve">
<value>&amp;Import</value>
</data>
<data name="frmAdvancedImport_FormName" xml:space="preserve">
<value>Import Game Configurations</value>
</data>
<data name="frmAdvancedImport_NewConfigs" xml:space="preserve">
<value>[PARAM] new configurations available.</value>
</data>
<data name="frmAdvancedImport_Selected" xml:space="preserve">
<value>[PARAM] Selected</value>
</data>
<data name="frmChooseGame_btnCancel" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="frmChooseGame_btnChoose" xml:space="preserve">
<value>C&amp;hoose Game</value>
</data>
<data name="frmChooseGame_FormName" xml:space="preserve">
<value>Choose Game</value>
</data>
<data name="frmChooseGame_lblChoose" xml:space="preserve">
<value>Please choose the game you were playing:</value>
</data>
<data name="frmFileFolderSearch_btnCancel" xml:space="preserve">
<value>&amp;Cancel</value>
</data>
<data name="frmFileFolderSearch_FormName" xml:space="preserve">
<value>Search</value>
</data>
<data name="frmFileFolderSearch_SwitchDrives" xml:space="preserve">
<value>The location was not found on the [PARAM] drive. Do you wish to search the [PARAM] drive?</value>
</data>
<data name="frmFilter_btnAdd" xml:space="preserve">
<value>&gt;</value>
</data>
<data name="frmFilter_btnOK" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="frmFilter_btnRemove" xml:space="preserve">
<value>&lt;</value>
</data>
<data name="frmFilter_FormName" xml:space="preserve">
<value>Custom Filter</value>
</data>
<data name="frmFilter_lblCompany" xml:space="preserve">
<value>Company:</value>
</data>
<data name="frmFilter_lblGameTags" xml:space="preserve">
<value>Current Filter</value>
</data>
<data name="frmFilter_lblName" xml:space="preserve">
<value>Name:</value>
</data>
<data name="frmFilter_lblProcess" xml:space="preserve">
<value>Process:</value>
</data>
<data name="frmFilter_lblTags" xml:space="preserve">
<value>Available Tags</value>
</data>
<data name="frmFilter_optAll" xml:space="preserve">
<value>All Tags</value>
</data>
<data name="frmFilter_optAnd" xml:space="preserve">
<value>And</value>
</data>
<data name="frmFilter_optAny" xml:space="preserve">
<value>Any Tag</value>
</data>
<data name="frmFilter_optGameInfo" xml:space="preserve">
<value>Game Information</value>
</data>
<data name="frmFilter_optOr" xml:space="preserve">
<value>Or</value>
</data>
<data name="frmFilter_optTag" xml:space="preserve">
<value>Tag</value>
</data>
</root>