I'm creating a hierarchical textual data listing with the format shown below. This data will be contained in a plain text file. I want to read it into some kind of structure (using C#) and I'm not sure what kind of structure would be best or what is available in C#.
The first line is the Title line.
The next line is flush left and is a Top Level item.
The items associated with this top level item are shown immediately below it, with each one of their lines indented by one space. You can see the pattern.
On my form, I will list the top level items in a listbox and when an is selected, I want to populate to the right of this listbox, the associated items in a richTextBox component.
So, I can click on a checklist item such as Before Start and see the associated items in the richTextBox.
What options do I have to read in this data and store in some kind of data structure?
Thanks...
Aircraft Type
Preflight
Oxygen
Navigation transfer and display switches
Window heat
Pressurization mode selector
Flight instruments
Before Start
Flight deck door
Fuel
Passenger signs
Windows
MCP
Before Taxi
Generators
Probe heat
Anti-ice