Hi,
Ich habe die ganze Lib nochmal neu programmiert, da irgendwie alles nicht so zusammen gepasst hat.
Methoden:
Leider hat nicht alles aufs Bild gepasst.
Funktionsweiße:
Spoiler anzeigen
Auslesen und Verändert einzelener Sections und deren Items:
Informationen
- Entwickelt mit VS 2008
- Framework 2.0
- Dateigröße: 17KB
Download:
IniLib
Grüße
Ich habe die ganze Lib nochmal neu programmiert, da irgendwie alles nicht so zusammen gepasst hat.
Methoden:
Leider hat nicht alles aufs Bild gepasst.
Funktionsweiße:
VB.NET-Quellcode
- IniLib.File.FilePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\config.ini"
- IniLib.File.ClearExistingItemsOnLoad = True 'Beim laden einer neuen Ini, werden die manuell angefügen Items gelöscht, bei false, werden sie drangehängt
- IniLib.File.AddSection("Hauptknoten1") 'Sections [Hauptknoten1]
- IniLib.File.AddSection("Hauptknoten2")
- IniLib.File.AddSection("Hauptknoten3")
- IniLib.File.AddSectionItem(0, "Testsbüääööj", "100") 'Untergeordnete Items: 'AddSectionItem(Index des Hauptknotens, Bezeichnung, Wert)
- IniLib.File.AddSectionItem(0, "Fraqs", "1030")
- IniLib.File.AddSectionItem(1, "Ionie", "102340")
- IniLib.File.AddSectionItem(1, "Kama", "10eqw0")
- IniLib.File.AddSectionItem(1, "Bedo", "Default")
- IniLib.File.AddSectionItem(2, "Seven", "None")
- IniLib.File.AddSectionItem(2, "Inuv", "Accept")
- IniLib.File.AddComment(0, "Fraqs", "Deklariert ein neues Fragment") 'Kommentar, (Section Index, Bezeichner, Kommentar)
- IniLib.File.AddComment(2, "Seven", "Bezeichnet eine neue Zahl")
- IniLib.File.SaveToIni() 'Speichern
- IniLib.File.LoadFromIni() 'Laden
Auslesen und Verändert einzelener Sections und deren Items:
VB.NET-Quellcode
- MsgBox(IniLib.File.GetSectionItemValue(1, "Bedo")) 'Liefert den Wert zurück (Section Index, SectionItemName)
- MsgBox(IniLib.File.GetSectionByIndex(1)) 'Liefert den Sectionnamen zurück (SectionIndex)
- MsgBox(IniLib.File.GetSectionIndexByName("Hauptknoten3")) 'Liefert den Index der angegebenen Section zurück
- MsgBox(IniLib.File.GetSectionItemIndexByName(1, "Bedo")) 'Liefert den Index eines SectionItems zurück, (SectionIndex, Name)
- IniLib.File.EditSection(0, "Neuer Knoten1") 'Editiert den Sectionnamen (Index, NeuerName)
- IniLib.File.EditSectionItemValue(2, "Inuv", "Invalid") 'Editiert die Value eines SectionItems, (SectionIdex, Name, NewValue)
- For Each sinfo In IniLib.File.GetAllSectionItems(0) ' Liefert alle Sectionitems, einer Section zurück, (Section Index)
- Next
- For Each sinfo In IniLib.File.GetAllSections 'Liefert alle Sections zurück
- Next
- For Each sinfo In IniLib.File.GetAllContent 'Liefert den Output zurück, so wie es in der Ini datei stehen würde.
- Next
Informationen
- Entwickelt mit VS 2008
- Framework 2.0
- Dateigröße: 17KB
Download:
IniLib
Grüße
Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von „ThuCommix“ ()