I made a conditional example.
- files with settings (file "Likewise"):
- .. \ 01 \ setting \ fold_1 \ settings_1.xml
.. \ 01 \ setting \ fold_2 \ settings_2.xml
.. \ 01 \ setting \ fold_3 \ settings_3.xml
- data files (used for example (file "Data")):
.. \ 01 \ data \ fol_data_1 \ fol_data_1.txt
.. \ 01 \ data \ fol_data_2 \ fol_data_2.txt
.. \ 01 \ data \ fol_data_3 \ fol_data_3.txt
The "Settings" files are displayed in the tree view. When you move the focus to the tree, all settings are displayed in the form fields depending on the file. The number of settings in the example is conventionally accepted. In fact, the example uses the "File data" setting "Data" (textBox4) ". Those. in each "settings_N.xml" the path to the corresponding "Data" file.
The user. Selects one or more "Likewise" files in the tree;
The choice is made by checking the CheckBox certificate to "true";
- The user. Click "Run" button (button3);
The program. Creates a separate tab in the "tabControl" of each "Data" file; (in this example, "tabControl" is not used)
The program. Creates tables DateTable for each file "Data";
- The program. Creates DateGrid for each "Data" file;
- The program. Parse data from the "Data" file;
- The program. Logs into DateTable;
- The program. Places in DataGrid;
Items 4 - 7 must be executed simultaneously for all selected "Nystroka" files. In this example, the "Run" button (button3) executes the script for only one "Data" file.
I suspect this should be done by means of "multithreading" (Thread), but I can not figure out how to approach it.
Or are there other ways?
- How to implement this scenario?
- How to organize classes?
Code - link
Project - link