Start-Up Wizard Improvements

This commit is contained in:
MikeMaximus
2019-05-16 15:49:58 -06:00
parent 8d1396d992
commit e7e2e86a8e
8 changed files with 51 additions and 23 deletions
+1
View File
@@ -1883,6 +1883,7 @@ Public Class frmGameManager
btnDeleteBackup.Visible = False btnDeleteBackup.Visible = False
btnOpenBackup.Visible = False btnOpenBackup.Visible = False
btnOpenRestorePath.Visible = False btnOpenRestorePath.Visible = False
btnImportBackup.Visible = False
End If End If
LoadBackupData() LoadBackupData()
+4 -10
View File
@@ -1007,12 +1007,9 @@ Public Class frmMain
Private Sub OpenStartupWizard() Private Sub OpenStartupWizard()
Dim frm As New frmStartUpWizard() Dim frm As New frmStartUpWizard()
frm.Settings = oSettings frm.Settings = New mgrSettings
PauseScan()
frm.ShowDialog() frm.ShowDialog()
LoadAndVerify()
bFirstRun = False bFirstRun = False
ResumeScan()
End Sub End Sub
Private Sub OpenWebSite() Private Sub OpenWebSite()
@@ -1715,8 +1712,8 @@ Public Class frmMain
Private Sub VerifyGameDataPath() Private Sub VerifyGameDataPath()
'Important: This function cannot access mgrPath for settings, as that will trigger a database creation and destroy the reason for this function 'Important: This function cannot access mgrPath for settings, as that will trigger a database creation and destroy the reason for this function
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm" Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & Path.DirectorySeparatorChar & "gbm"
Dim sDBLocation As String = sSettingsRoot & "/gbm.s3db" Dim sDBLocation As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm.s3db"
If Not Directory.Exists(sSettingsRoot) Then If Not Directory.Exists(sSettingsRoot) Then
Try Try
@@ -2166,6 +2163,7 @@ Public Class frmMain
If bInitialLoad Then If bInitialLoad Then
Try Try
VerifyGameDataPath() VerifyGameDataPath()
If bFirstRun Then OpenStartupWizard()
LoadAndVerify() LoadAndVerify()
Catch ex As Exception Catch ex As Exception
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message & vbCrLf & ex.StackTrace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message & vbCrLf & ex.StackTrace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
@@ -2204,10 +2202,6 @@ Public Class frmMain
CheckForNewBackups() CheckForNewBackups()
End If End If
If bFirstRun And Not bShutdown Then
OpenStartupWizard()
End If
bInitialLoad = False bInitialLoad = False
Else Else
txtLog.Select(txtLog.TextLength, 0) txtLog.Select(txtLog.TextLength, 0)
+13 -1
View File
@@ -49,6 +49,7 @@ Partial Class frmStartUpWizard
Me.lblStep4Instructions = New System.Windows.Forms.Label() Me.lblStep4Instructions = New System.Windows.Forms.Label()
Me.btnNext = New System.Windows.Forms.Button() Me.btnNext = New System.Windows.Forms.Button()
Me.btnBack = New System.Windows.Forms.Button() Me.btnBack = New System.Windows.Forms.Button()
Me.lblStep2Warning = New System.Windows.Forms.Label()
Me.tabWizard.SuspendLayout() Me.tabWizard.SuspendLayout()
Me.tbPage1.SuspendLayout() Me.tbPage1.SuspendLayout()
Me.tbPage2.SuspendLayout() Me.tbPage2.SuspendLayout()
@@ -125,6 +126,7 @@ Partial Class frmStartUpWizard
'tbPage2 'tbPage2
' '
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
Me.tbPage2.Controls.Add(Me.lblStep2Warning)
Me.tbPage2.Controls.Add(Me.chkCreateFolder) Me.tbPage2.Controls.Add(Me.chkCreateFolder)
Me.tbPage2.Controls.Add(Me.lblStep2Title) Me.tbPage2.Controls.Add(Me.lblStep2Title)
Me.tbPage2.Controls.Add(Me.lblStep2Instructions) Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
@@ -162,7 +164,7 @@ Partial Class frmStartUpWizard
' '
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103) Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103)
Me.lblStep2Instructions.Name = "lblStep2Instructions" Me.lblStep2Instructions.Name = "lblStep2Instructions"
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 50) Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 44)
Me.lblStep2Instructions.TabIndex = 6 Me.lblStep2Instructions.TabIndex = 6
Me.lblStep2Instructions.Text = "GBM will store all your backup files along with a manifest database (gbm.s3db) in" & Me.lblStep2Instructions.Text = "GBM will store all your backup files along with a manifest database (gbm.s3db) in" &
" this location. Any existing GBM data in this folder will be automatically impo" & " this location. Any existing GBM data in this folder will be automatically impo" &
@@ -318,6 +320,15 @@ Partial Class frmStartUpWizard
Me.btnBack.TabIndex = 1 Me.btnBack.TabIndex = 1
Me.btnBack.Text = "&Back" Me.btnBack.Text = "&Back"
Me.btnBack.UseVisualStyleBackColor = True Me.btnBack.UseVisualStyleBackColor = True
'
'lblStep2Warning
'
Me.lblStep2Warning.Location = New System.Drawing.Point(14, 147)
Me.lblStep2Warning.Name = "lblStep2Warning"
Me.lblStep2Warning.Size = New System.Drawing.Size(335, 33)
Me.lblStep2Warning.TabIndex = 7
Me.lblStep2Warning.Text = "You cannot return to this step after clicking Next. The Backup Location can be c" &
"hanged any time once Setup is complete."
' '
'frmStartUpWizard 'frmStartUpWizard
' '
@@ -371,4 +382,5 @@ Partial Class frmStartUpWizard
Friend WithEvents lblStep4Instructions2 As System.Windows.Forms.Label Friend WithEvents lblStep4Instructions2 As System.Windows.Forms.Label
Friend WithEvents lblStep1Instructions2 As System.Windows.Forms.Label Friend WithEvents lblStep1Instructions2 As System.Windows.Forms.Label
Friend WithEvents llbManual As System.Windows.Forms.LinkLabel Friend WithEvents llbManual As System.Windows.Forms.LinkLabel
Friend WithEvents lblStep2Warning As Label
End Class End Class
+13 -9
View File
@@ -42,6 +42,7 @@ Public Class frmStartUpWizard
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
lblStep2Title.Text = frmStartUpWizard_lblStep2Title lblStep2Title.Text = frmStartUpWizard_lblStep2Title
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
lblStep2Warning.Text = frmStartUpWizard_lblStep2Warning
btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse
lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro
btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard
@@ -55,7 +56,8 @@ Public Class frmStartUpWizard
lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions
llbManual.Links.Add(0, 26, App_URLManual) llbManual.Links.Add(0, 26, App_URLManual)
LoadGameSettings() txtBackupPath.Text = oSettings.BackupFolder
StepHandler() StepHandler()
End Sub End Sub
@@ -78,8 +80,6 @@ Public Class frmStartUpWizard
btnNext.Enabled = True btnNext.Enabled = True
tabWizard.SelectTab(0) tabWizard.SelectTab(0)
Case eSteps.Step2 Case eSteps.Step2
txtBackupPath.Text = oSettings.BackupFolder
chkCreateFolder.Checked = oSettings.CreateSubFolder
btnBack.Enabled = True btnBack.Enabled = True
btnNext.Enabled = True btnNext.Enabled = True
tabWizard.SelectTab(1) tabWizard.SelectTab(1)
@@ -141,18 +141,22 @@ Public Class frmStartUpWizard
Return False Return False
End If End If
If Not Directory.Exists(strPath) Then
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
txtBackupPath.Focus()
Return False
End If
If Not Path.IsPathRooted(strPath) Then If Not Path.IsPathRooted(strPath) Then
sErrorMessage = frmStartUpWizard_ErrorBadFolder sErrorMessage = frmStartUpWizard_ErrorBadFolder
txtBackupPath.Focus() txtBackupPath.Focus()
Return False Return False
End If End If
If Not Directory.Exists(strPath) Then
Try
Directory.CreateDirectory(strPath)
Catch ex As Exception
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
txtBackupPath.Focus()
Return False
End Try
End If
Return True Return True
End Function End Function
+2 -1
View File
@@ -1,4 +1,5 @@
Imports System.IO Imports System.IO
Imports GBM.My.Resources
Public Class mgrSettings Public Class mgrSettings
Private bStartWithWindows As Boolean = False Private bStartWithWindows As Boolean = False
@@ -18,7 +19,7 @@ Public Class mgrSettings
Private iCompressionLevel As Integer = 5 Private iCompressionLevel As Integer = 5
Private s7zArguments As String = String.Empty Private s7zArguments As String = String.Empty
Private s7zLocation As String = String.Empty Private s7zLocation As String = String.Empty
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"}) Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & Path.DirectorySeparatorChar & App_NameLong
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None
Private eMessages As eSuppressMessages = eSuppressMessages.None Private eMessages As eSuppressMessages = eSuppressMessages.None
Private bAutoSaveLog As Boolean = False Private bAutoSaveLog As Boolean = False
+10 -1
View File
@@ -5263,7 +5263,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to The folder you selected does not exist or is not a valid folder.. ''' Looks up a localized string similar to The selected backup location does not exist and could not be created.[BR][BR][PARAM].
'''</summary> '''</summary>
Friend ReadOnly Property frmStartUpWizard_ErrorNoFolderExists() As String Friend ReadOnly Property frmStartUpWizard_ErrorNoFolderExists() As String
Get Get
@@ -5343,6 +5343,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to You cannot return to this step after clicking Next. The Backup Location can be changed any time once Setup is complete..
'''</summary>
Friend ReadOnly Property frmStartUpWizard_lblStep2Warning() As String
Get
Return ResourceManager.GetString("frmStartUpWizard_lblStep2Warning", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Before you can start monitoring for games, they need to be configured so GBM knows what to look for and how to handle them. You can download pre-made configurations from the official list or add them all yourself using the tools below. You can also skip this step for now!. ''' Looks up a localized string similar to Before you can start monitoring for games, they need to be configured so GBM knows what to look for and how to handle them. You can download pre-made configurations from the official list or add them all yourself using the tools below. You can also skip this step for now!.
'''</summary> '''</summary>
+4 -1
View File
@@ -1136,7 +1136,7 @@
<value>You must select a backup path to continue.</value> <value>You must select a backup path to continue.</value>
</data> </data>
<data name="frmStartUpWizard_ErrorNoFolderExists" xml:space="preserve"> <data name="frmStartUpWizard_ErrorNoFolderExists" xml:space="preserve">
<value>The folder you selected does not exist or is not a valid folder.</value> <value>The selected backup location does not exist and could not be created.[BR][BR][PARAM]</value>
</data> </data>
<data name="frmStartUpWizard_ExistingData" xml:space="preserve"> <data name="frmStartUpWizard_ExistingData" xml:space="preserve">
<value>Existing data was detected in the backup folder and has been imported.</value> <value>Existing data was detected in the backup folder and has been imported.</value>
@@ -2392,4 +2392,7 @@
<data name="frmAddWizard_Summary_NoLimit" xml:space="preserve"> <data name="frmAddWizard_Summary_NoLimit" xml:space="preserve">
<value>Unlimited</value> <value>Unlimited</value>
</data> </data>
<data name="frmStartUpWizard_lblStep2Warning" xml:space="preserve">
<value>You cannot return to this step after clicking Next. The Backup Location can be changed any time once Setup is complete.</value>
</data>
</root> </root>
+4
View File
@@ -16,5 +16,9 @@ All Platforms:
- GBM now always filters out NTFS reserved characters and allows a maximum file name length of 255. - GBM now always filters out NTFS reserved characters and allows a maximum file name length of 255.
- This will prevent various problems when using a backup drive with a non-standard file system in Linux or Windows. - This will prevent various problems when using a backup drive with a non-standard file system in Linux or Windows.
- These rules will be applied to new backup files or folders, existing backups not be modified. - These rules will be applied to new backup files or folders, existing backups not be modified.
- Made improvements to the Start-Up Wizard.
- The default backup location now includes a "Game Backup Monitor" sub-folder.
- The wizard will now automatically create the backup location if it doesn't exist.
- You can no longer attempt to Import Backup Files during the Start-Up Wizard.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html