I would create a Form like this:
1. one horizontal split-container docked full, 'HSplit1
2. in the left panel of #1 a TreeView Control docked full, 'DocTreeView
3. in the right panel of #1 another horizontal split-container, 'HSplt2
4. in the left panel of #2 a TextBox docked full, 'SourceTextBox
5. in the right panel of #2 a TextBox docked full, 'DestinationTextBox
I would set-up the TreeView like this:
1. give the user some interface to select up to five files
2. add a root node for each file
3. parse each file to determine the sections
4. create child-nodes for each root-node internally linked to the sections of each file
The run-time behavior of the program: assuming the TreeView is filled properly
1. the user clicks on a root-node (file), and selects a section (child-node)
2. the text associated with that section is displlayed in the 'SourceTextBox
3. the user can select Text in the 'SourceTextBox and drag-drop it into the 'DestinationTextBox.
4. the Application would provide some useful interface for saving the contents of the 'DestinationTextBox, for changing the currently opened source files, rebuilding the TreeView, etc.
Notes:
1. The difficulty with drag-dropping from one TextBox (or RichTextBox) to another is that a mouse-down (default mouse-down) on the current selection will cause the selection to be cleared. To get around this: you need to use techniques like:
a. don't call 'DoDragDrop in the MouseDown unless the context-click mouse button is down; example:
private void SourceTextBox_MouseDown(object sender, MouseEventArgs e)
{
if (MouseButtons == MouseButtons.Right)
{
SourceTextBox.DoDragDrop(SourceTextBox.SelectedText, DragDropEffects.Copy);
}
}
b. use a modified WndProc and an over-ride of 'OnMouseDown; see: [
^].
2. Why use horizontal splitters ? Answer: for the user's convenience in using the UI.
If you have further questions, please feel free to ask.