Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27251

VS 2010 how to order liistview items by no. in the .ini?

$
0
0
`Exachtly the question: "how to order liistview items by no. in the .ini?"

the .ini file:
Code:

Install Order:1
Prog Name:Adobe Reader X 11.0.02
Installer File:Install\Apps\AcroRdrX-11.0.02.exe

##############################################################################

Install Order:2
Prog Name:Adobe Photoshop CS5 Extended Edition
Installer File:Install\Apps\Adobe_Photoshop_CS5_Extended_Edition_Silent_Chris2k.exe

##############################################################################

Install Order:3
Prog Name:Adobe Dreamweaver CS5 Lite Edition
Installer File:Install\Apps\Adobe_Dreamweaver_CS5_Lite_Edition_Silent_Chris2k.exe

##############################################################################

Install Order:4
Prog Name:AVG Antivirus 2013.0.2805
Installer File:Install\Apps\AVG_Antivirus_2013.0.2805_Silent_Chris2k.exe

my code:
Code:

        Dim installOrder As Integer = 0
        Dim highestOrder As Integer = 1

        For Each ln In IO.File.ReadAllLines(iniFile)
            If ln.ToLower.StartsWith("install order") Then
                installOrder = (ln.Substring(ln.IndexOf(":"c) + 1)) ' a faster and more efficient option than splitting
                App_List.Items.Add(installOrder)
            ElseIf ln.ToLower.StartsWith("app name") Then
                Dim app_name As String = (ln.Substring(ln.IndexOf(":"c) + 1))
                App_List.Items(1).SubItems.Add(app_name)
            ElseIf ln.ToLower.StartsWith("description") Then
                Dim app_desc As String = (ln.Substring(ln.IndexOf(":"c) + 1))
                App_List.Items(2).SubItems.Add(app_desc)
            ElseIf ln.ToLower.StartsWith("app file size") Then
                Dim app_filesize As String = (ln.Substring(ln.IndexOf(":"c) + 1))
                App_List.Items(3).SubItems.Add(app_filesize)
            ElseIf ln.ToLower.StartsWith("app file") Then
                Dim exe_path As String = (ln.Substring(ln.IndexOf(":"c) + 1))
                App_List.Items(4).SubItems.Add(exe_path)
            End If
        Next

I have no idea......

Viewing all articles
Browse latest Browse all 27251

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>