Manuscript Table Viewer is a Windows Forms application built using .NET Framework 4.8 that allows users to load, view, and interact with custom table-like data. The application provides a modular and extensible architecture for handling both single-table and multi-table views, including advanced functionality for dynamically displaying rows and keys.
-
Load Multiple Tables:
- Supports loading multiple
<table>
elements from a text file, even if separated by spaces or newlines. - Displays all loaded tables in a
ListView
for selection.
- Supports loading multiple
-
Modular View Architecture:
- Single-table views (e.g.,
RawView
,SelectView
). - Multi-table views (e.g.,
MultiRawView
,MultiSelectView
). - Dynamically switches between views based on user selection in a
ComboBox
.
- Single-table views (e.g.,
-
Single-Table Views:
- Raw View: Displays the raw XML-like structure of the table.
- Select View: Allows users to select a key from a dropdown and displays the corresponding row value.
-
Multi-Table Views:
- MultiRaw View: Concatenates and displays the raw XML-like structure of all selected tables.
- MultiSelect View: Allows users to select a key and displays the corresponding rows from all selected tables, gracefully handling missing keys.
-
Error Handling:
- Handles missing keys, mismatched rows, and invalid input gracefully.
- Provides informative error messages for invalid operations.
-
Views:
IViewType
: Interface for single-table views.IMultiViewType
: Interface for multi-table views.RawView
: Displays the raw structure of a table.SelectView
: Displays rows for a selected key in a single table.MultiRawView
: Displays raw structures for all selected tables.MultiSelectView
: Displays rows for a selected key across multiple tables.
-
Data Types:
Table
: Represents a parsed<table>
element with its fields, keys, and rows.Field
: Represents a field inside a table.Key
: Represents a key used to index rows in a table.
-
Table Parser:
- Parses the input text to extract and construct multiple
Table
objects. - Handles malformed input and provides detailed error messages.
- Parses the input text to extract and construct multiple
-
View Manager:
- Registers and retrieves
IViewType
andIMultiViewType
implementations. - Dynamically distinguishes between single and multi views based on the selected view.
- Registers and retrieves
- The main form of the application.
- Manages UI components like the
ListView
,ComboBox
, andRichTextBox
. - Dynamically switches between views based on user interaction.
- Represents the structure of a
<table>
element, including fields, keys, and rows.
- Responsible for parsing a text file containing multiple
<table>
elements.
- Interfaces defining the contract for single-table and multi-table views.
- Implements
IViewType
to display the raw structure of a table.
- Implements
IViewType
to display rows for a selected key in a single table.
- Implements
IMultiViewType
to display raw structures for all selected tables.
- Implements
IMultiViewType
to display rows for a selected key across multiple tables.
- Handles registration and retrieval of single and multi views.
- .NET Framework 4.8
- Visual Studio 2019 or later
- Clone the repository:
git clone https://github.com/your-username/manuscript-table-viewer.git cd manuscript-table-viewer