Changes for issue #123 (Pass 1)
This commit is contained in:
@@ -195,10 +195,7 @@ Public Class frmAddWizard
|
||||
End Sub
|
||||
|
||||
Private Function ValidateName(ByVal strName As String, ByRef sErrorMessage As String) As Boolean
|
||||
If txtName.Text <> String.Empty Then
|
||||
txtName.Text = mgrPath.ValidateForFileSystem(txtName.Text)
|
||||
Return True
|
||||
Else
|
||||
If txtName.Text.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidName
|
||||
txtName.Focus()
|
||||
Return False
|
||||
@@ -207,7 +204,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
If strPath = String.Empty Then
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidProcess
|
||||
txtProcessPath.Focus()
|
||||
Return False
|
||||
@@ -235,7 +232,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
If strPath = String.Empty Then
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidSavePath
|
||||
txtSavePath.Focus()
|
||||
Return False
|
||||
@@ -257,7 +254,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateSaveType(ByVal strSaveType As String, ByRef sErrorMessage As String)
|
||||
If strSaveType = String.Empty Then
|
||||
If strSaveType.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidSaveType
|
||||
txtFileTypes.Focus()
|
||||
Return False
|
||||
@@ -268,7 +265,7 @@ Public Class frmAddWizard
|
||||
|
||||
Private Sub DoSave()
|
||||
Dim hshDupeCheck As New Hashtable
|
||||
Dim sNewGame As String = oGameToSave.ProcessName & ":" & oGameToSave.Name
|
||||
Dim sNewGame As String = oGameToSave.ProcessName & ":" & oGameToSave.SafeName
|
||||
|
||||
For Each o As clsGame In GameData.Values
|
||||
hshDupeCheck.Add(o.CompoundKey, String.Empty)
|
||||
|
||||
@@ -183,14 +183,14 @@ Public Class frmGameManager
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
|
||||
'Rename Backup File
|
||||
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.SafeName, oNewApp.SafeName)
|
||||
If File.Exists(sFileName) Then
|
||||
FileSystem.Rename(sFileName, sNewFileName)
|
||||
End If
|
||||
|
||||
'Rename Directory
|
||||
sDirectory = Path.GetDirectoryName(sFileName)
|
||||
sNewDirectory = sDirectory.Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
sNewDirectory = sDirectory.Replace(oOriginalApp.SafeName, oNewApp.SafeName)
|
||||
If sDirectory <> sNewDirectory Then
|
||||
If Directory.Exists(sDirectory) Then
|
||||
FileSystem.Rename(sDirectory, sNewDirectory)
|
||||
@@ -198,7 +198,7 @@ Public Class frmGameManager
|
||||
End If
|
||||
|
||||
oBackupItem.Name = oNewApp.Name
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.SafeName, oNewApp.SafeName)
|
||||
mgrManifest.DoManifestUpdateByID(oBackupItem, mgrSQLite.Database.Local)
|
||||
Next
|
||||
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
@@ -210,7 +210,7 @@ Public Class frmGameManager
|
||||
|
||||
For Each oBackupItem As clsBackup In oBackupItems
|
||||
oBackupItem.Name = oNewApp.Name
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.SafeName, oNewApp.SafeName)
|
||||
mgrManifest.DoManifestUpdateByID(oBackupItem, mgrSQLite.Database.Remote)
|
||||
Next
|
||||
oRemoteBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
@@ -1160,7 +1160,7 @@ Public Class frmGameManager
|
||||
If txtID.Text <> String.Empty Then
|
||||
oApp.ID = txtID.Text
|
||||
End If
|
||||
oApp.Name = mgrPath.ValidateForFileSystem(txtName.Text)
|
||||
oApp.Name = txtName.Text
|
||||
If Path.HasExtension(txtProcess.Text) Then
|
||||
If txtProcess.Text.ToLower.EndsWith(".exe") Then
|
||||
oApp.ProcessName = Path.GetFileNameWithoutExtension(txtProcess.Text)
|
||||
@@ -1280,13 +1280,13 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
||||
If txtName.Text = String.Empty Then
|
||||
If txtName.Text.Trim = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtProcess.Text = String.Empty Then
|
||||
If txtProcess.Text.Trim = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorValidProcess, MsgBoxStyle.Exclamation)
|
||||
txtProcess.Focus()
|
||||
Return False
|
||||
|
||||
Reference in New Issue
Block a user