Moved strings to resource (frmStartupWizard, frmTags, frmCustomVariables)
This commit is contained in:
Generated
-2
@@ -34,7 +34,6 @@ Partial Class frmSettings
|
||||
Me.btnBackupFolder = New System.Windows.Forms.Button()
|
||||
Me.lblBackupFolder = New System.Windows.Forms.Label()
|
||||
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
|
||||
Me.fbBrowser = New System.Windows.Forms.FolderBrowserDialog()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.grpBackup = New System.Windows.Forms.GroupBox()
|
||||
@@ -310,7 +309,6 @@ Partial Class frmSettings
|
||||
Friend WithEvents grpGeneral As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpPaths As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
|
||||
Friend WithEvents fbBrowser As System.Windows.Forms.FolderBrowserDialog
|
||||
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
Friend WithEvents lblBackupFolder As System.Windows.Forms.Label
|
||||
|
||||
@@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="fbBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>32</value>
|
||||
</metadata>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmStartUpWizard
|
||||
|
||||
@@ -26,8 +27,34 @@ Public Class frmStartUpWizard
|
||||
|
||||
Private eCurrentStep As eSteps = eSteps.Step1
|
||||
|
||||
Private Sub FormInit()
|
||||
llbManual.Links.Add(0, 26, "http://mikemaximus.github.io/gbm-web/manual.html")
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmStartUpWizard_FormName
|
||||
|
||||
'Set Form Text
|
||||
btnNext.Text = frmStartUpWizard_btnNext
|
||||
btnBack.Text = frmStartUpWizard_btnBack
|
||||
lblStep1Instructions2.Text = frmStartUpWizard_lblStep1Instructions2
|
||||
llbManual.Text = frmStartUpWizard_llbManual
|
||||
lblStep1Title.Text = frmStartUpWizard_lblStep1Title
|
||||
lblStep1Instructions.Text = frmStartUpWizard_lblStep1Instructions
|
||||
chkSync.Text = frmStartUpWizard_chkSync
|
||||
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
|
||||
lblStep2Title.Text = frmStartUpWizard_lblStep2Title
|
||||
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
|
||||
btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse
|
||||
lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro
|
||||
btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard
|
||||
btnOpenMonitorList.Text = frmStartUpWizard_btnOpenMonitorList
|
||||
btnDownloadList.Text = frmStartUpWizard_btnDownloadList
|
||||
lblStep3Title.Text = frmStartUpWizard_lblStep3Title
|
||||
lblStep3Intro.Text = frmStartUpWizard_lblStep3Intro
|
||||
lblStep4Instructions3.Text = frmStartUpWizard_lblStep4Instructions3
|
||||
lblStep4Instructions2.Text = frmStartUpWizard_lblStep4Instructions2
|
||||
lblStep4Title.Text = frmStartUpWizard_lblStep4Title
|
||||
lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions
|
||||
|
||||
llbManual.Links.Add(0, 26, App_URLManual)
|
||||
LoadGameSettings()
|
||||
StepHandler()
|
||||
End Sub
|
||||
@@ -40,7 +67,7 @@ Public Class frmStartUpWizard
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
mgrMonitorList.SyncMonitorLists(False)
|
||||
mgrCommon.ShowMessage("Existing data was detected in the backup folder and has been imported.", MsgBoxStyle.Information)
|
||||
mgrCommon.ShowMessage(frmStartUpWizard_ExistingData, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -60,18 +87,18 @@ Public Class frmStartUpWizard
|
||||
Case eSteps.Step3
|
||||
btnBack.Enabled = False
|
||||
btnNext.Enabled = True
|
||||
btnNext.Text = "&Next"
|
||||
btnNext.Text = frmStartUpWizard_btnNext
|
||||
tabWizard.SelectTab(2)
|
||||
Case eSteps.Step4
|
||||
btnBack.Enabled = True
|
||||
btnNext.Enabled = True
|
||||
btnNext.Text = "&Finish"
|
||||
btnNext.Text = frmStartUpWizard_btnNext_Finish
|
||||
tabWizard.SelectTab(3)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadSettings()
|
||||
If mgrCommon.ShowMessage("Would you like to choose games to import from the official game list?" & vbCrLf & vbCrLf & "This require an active internet connection.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
@@ -103,19 +130,19 @@ Public Class frmStartUpWizard
|
||||
|
||||
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
If strPath = String.Empty Then
|
||||
sErrorMessage = "You must select a backup path to continue."
|
||||
sErrorMessage = frmStartUpWizard_ErrorNoFolder
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(strPath) Then
|
||||
sErrorMessage = "The folder you selected does not exist or is not a valid folder."
|
||||
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Path.IsPathRooted(strPath) Then
|
||||
sErrorMessage = "The selected path must be a full path."
|
||||
sErrorMessage = frmStartUpWizard_ErrorBadFolder
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
@@ -180,7 +207,7 @@ Public Class frmStartUpWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose a backup folder:", sDefaultFolder, True)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser(frmStartUpWizard_BrowseFolder, sDefaultFolder, True)
|
||||
|
||||
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
||||
End Sub
|
||||
@@ -194,12 +221,7 @@ Public Class frmStartUpWizard
|
||||
End Sub
|
||||
|
||||
Private Sub frmStartUpWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
FormInit()
|
||||
|
||||
Dim sResource As String = String.Empty
|
||||
Dim sCode As String = String.Empty
|
||||
mgrCommon.GetAllStrings(Me, sResource, sCode, "frmStartUpWizard")
|
||||
Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
|
||||
SetForm()
|
||||
End Sub
|
||||
|
||||
Private Sub btnFolderBrowse_Click(sender As Object, e As EventArgs) Handles btnFolderBrowse.Click
|
||||
|
||||
+22
-5
@@ -1,4 +1,6 @@
|
||||
Public Class frmTags
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class frmTags
|
||||
|
||||
Dim hshTagData As Hashtable
|
||||
Private bIsDirty As Boolean = False
|
||||
@@ -50,7 +52,7 @@
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
|
||||
oResult = mgrCommon.ShowMessage(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
@@ -229,7 +231,7 @@
|
||||
If lstTags.SelectedItems.Count > 0 Then
|
||||
oTag = DirectCast(TagData(lstTags.SelectedItems(0).ToString), clsTag)
|
||||
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete " & oTag.Name & "? This cannot be undone." & vbCrLf & vbCrLf & "All games using this tag will have it removed.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(frmTags_ConfirmDelete, oTag.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrTags.DoTagDelete(oTag.ID)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
@@ -248,13 +250,13 @@
|
||||
|
||||
Private Function CoreValidatation(ByVal oTag As clsTag) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage("You must enter a valid tag name.", MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmTags_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If mgrTags.DoCheckDuplicate(oTag.Name, oTag.ID) Then
|
||||
mgrCommon.ShowMessage("A tag with this name already exists.", MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmTags_ErrorTagDupe, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
@@ -262,7 +264,22 @@
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmTags_FormName
|
||||
|
||||
'Set Form Text
|
||||
grpTag.Text = frmTags_grpTag
|
||||
lblName.Text = frmTags_lblName
|
||||
btnClose.Text = frmTags_btnClose
|
||||
btnDelete.Text = frmTags_btnDelete
|
||||
btnAdd.Text = frmTags_btnAdd
|
||||
btnCancel.Text = frmTags_btnCancel
|
||||
btnSave.Text = frmTags_btnSave
|
||||
End Sub
|
||||
|
||||
Private Sub frmTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadData()
|
||||
ModeChange()
|
||||
AssignDirtyHandlers(grpTag.Controls)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmVariableManager
|
||||
Dim hshVariableData As Hashtable
|
||||
@@ -53,7 +54,7 @@ Public Class frmVariableManager
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose the path the variable represents:", sDefaultFolder, False)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser(frmVariableManager_PathBrowse, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
||||
End Sub
|
||||
@@ -67,7 +68,7 @@ Public Class frmVariableManager
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = mgrCommon.ShowMessage("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel)
|
||||
oResult = mgrCommon.ShowMessage(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
@@ -251,7 +252,7 @@ Public Class frmVariableManager
|
||||
If lstVariables.SelectedItems.Count > 0 Then
|
||||
oCustomVariable = DirectCast(VariableData(lstVariables.SelectedItems(0).ToString), clsPathVariable)
|
||||
|
||||
If mgrCommon.ShowMessage("Are you sure you want to delete " & oCustomVariable.Name & "? This cannot be undone.", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowMessage(frmVariableManager_ConfirmDelete, oCustomVariable.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrVariables.DoVariableDelete(oCustomVariable.ID)
|
||||
mgrVariables.DoPathUpdate(oCurrentVariable.FormattedName, oCurrentVariable.Path)
|
||||
LoadData()
|
||||
@@ -271,19 +272,19 @@ Public Class frmVariableManager
|
||||
|
||||
Private Function CoreValidatation(ByVal oCustomVariable As clsPathVariable) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage("You must enter a valid path name.", MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmVariableManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtPath.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage("You must enter a valid path.", MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmVariableManager_ErrorValidPath, MsgBoxStyle.Exclamation)
|
||||
txtPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If mgrVariables.DoCheckDuplicate(oCustomVariable.Name, oCustomVariable.ID) Then
|
||||
mgrCommon.ShowMessage("An custom variable with this name already exists.", MsgBoxStyle.Exclamation)
|
||||
mgrCommon.ShowMessage(frmVariableManager_ErrorVariableDupe, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
@@ -291,7 +292,24 @@ Public Class frmVariableManager
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmVariableManager_FormName
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmVariableManager_btnCancel
|
||||
btnSave.Text = frmVariableManager_btnSave
|
||||
grpVariable.Text = frmVariableManager_grpVariable
|
||||
btnPathBrowse.Text = frmVariableManager_btnPathBrowse
|
||||
lblPath.Text = frmVariableManager_lblPath
|
||||
lblName.Text = frmVariableManager_lblName
|
||||
btnClose.Text = frmVariableManager_btnClose
|
||||
btnDelete.Text = frmVariableManager_btnDelete
|
||||
btnAdd.Text = frmVariableManager_btnAdd
|
||||
End Sub
|
||||
|
||||
Private Sub frmVariableManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadData()
|
||||
ModeChange()
|
||||
AssignDirtyHandlers(grpVariable.Controls)
|
||||
|
||||
Reference in New Issue
Block a user