Enhancement for issue #83

This commit is contained in:
Michael J. Seiferling
2017-09-23 15:20:53 -06:00
parent 2ef141ee9b
commit 0f874ae74a
+17 -4
View File
@@ -1,10 +1,11 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.IO
Public Class frmAdvancedImport Public Class frmAdvancedImport
Private hshImportData As Hashtable Private hshImportData As Hashtable
Private hshFinalData As New Hashtable Private hshFinalData As New Hashtable
Private bSelectAll As Boolean = False Private bSelectAll As Boolean = True
Private bIsLoading As Boolean = False Private bIsLoading As Boolean = False
Private iCurrentSort As Integer = 0 Private iCurrentSort As Integer = 0
Private WithEvents tmFilterTimer As Timer Private WithEvents tmFilterTimer As Timer
@@ -44,7 +45,7 @@ Public Class frmAdvancedImport
End If End If
End Sub End Sub
Private Sub LoadData(Optional ByVal sFilter As String = "") Private Sub LoadData(Optional ByVal sFilter As String = "", Optional ByVal bAutoDetect As Boolean = False)
Dim oApp As clsGame Dim oApp As clsGame
Dim oListViewItem As ListViewItem Dim oListViewItem As ListViewItem
Dim sTags As String Dim sTags As String
@@ -79,6 +80,18 @@ Public Class frmAdvancedImport
oListViewItem.Checked = False oListViewItem.Checked = False
End If End If
If bAutoDetect Then
If oApp.AbsolutePath Then
If Directory.Exists(oApp.Path) Then
oListViewItem.Checked = True
Else
oListViewItem.Checked = False
End If
Else
oListViewItem.Checked = False
End If
End If
If sFilter = String.Empty Then If sFilter = String.Empty Then
bAddItem = True bAddItem = True
Else Else
@@ -142,8 +155,7 @@ Public Class frmAdvancedImport
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
bIsLoading = True bIsLoading = True
SetForm() SetForm()
LoadData() LoadData(String.Empty, True)
SelectToggle()
bIsLoading = False bIsLoading = False
End Sub End Sub
@@ -184,6 +196,7 @@ Public Class frmAdvancedImport
tmFilterTimer.Stop() tmFilterTimer.Stop()
tmFilterTimer.Enabled = False tmFilterTimer.Enabled = False
End Sub End Sub
End Class End Class
' Column Sorter ' Column Sorter