I've been talking about rewriting the File Viewer application I developed at Communisis back in the early naughties for some time now. It took a while for me to find a solution for opening very large files (>20GB) that I liked and a virtual grid that would allow me to view them.
After being (almost) forced to learn Java I thought it might hold the key. It can certainly handle the large files easily enough and
JTableis certainly virtual enough to view them. I got quite a long way down the Java route before I decided Swing didn't give me the most aesthetic of GUIs and layout managers were too much like hard work (I've since got to grips with layout managers and changed my mind about them to some extent).
I started looking around for a virtual grid for C#. I already knew that C# could handle the file sizes without any problem from the testing I'd done a few years back. It was pointed out to me that the
DataGridhas a virtual mode and a little bit of playing about soon showed me that it was ideal for the task. Moving to C# would loose some of the platform independence I've always strived for, but the better looking GUI and the interest shown by some people who might actually use it in a C# version were overwhelming.
I ported my MVC design directly to C# from Java taking advantage of some of the better features in C#, such as properties and events and I now have a working prototype that allows the user to open and view fixed length record files using an xml layout to describe the fields:
<field name="Id" length="20">
<field name="Number" length="20">
<field name="Add1" length="20">
<field name="Add2" length="20">
<field name="Add3" length="20">
<field name="Postcode" length="20">
<field name="CR" length="1">
This is the current limit of the features. There is no way of saving or reloading projects (a project consists of a layout and datafile), no search or reporting and no way of creating or modifying layouts. This is strictly a prototype to prove the concept.
Marauder File Viewer can be download here (You'll need .Net 2 if you don't already have it). After unzipping double click FileViewer.Exe to run file viewer. To test it:
- Go to the Help menu and select Create Test Files to create a set of three test files and a layout file in the same location as the exe.
- Go to the File menu and select New Project.
- Double click the Fixed Length icon from the New Project dialog.
- Click the first browse button and navigate to
test1.txtto set the file.
- Click the second browse button and navigate to
lay.xmlto set the layout.
- Click create to load the file and layout.
- Repeat steps 2 to 6 for
You can now use the tabs to switch between the test files and the vertical scroll bars to scroll through their content. The Marauder File Viewer will work with any fixed length record text file and any xml layout that uses the format shown above.
The next steps in development will be:
- Support for RDF layouts
- Allow the saving and opening of projects.
- Fixed length record file layout creator and modifier
- Further development plugin facility to allow other file types to be viewed