Skip to main content

Sample Applications

I have created a number of Sample Applications using the Kajabity Tools classes as a way to illustrate how they can be used.

The source code for all of these sample application is available in GitHub at:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Samples

CsvEditor

This application allows you to create, open and save CSV (Comma Separated Values) files – though there isn’t actually an Edit feature yet! The file simply displays the contents of the file loaded in a ListView .

The project was created using a Windows Forms template in Visual Studio, with the MainForm class renamed to CsvEditorForm and extending SDIForm . NewCsvDocument and CsvDocumentManager were added extending the Documentand DocumentManager classes respectively.

UML class diagram of CsvEditor project classes.

This particular example adds some simple error handling to the File/Open method to catch either parser or general exceptions and display a message. See CsvEditorForm.openToolStripMenuItem_Click() .

The code is available on GitHub at:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Samples/CsvEditor

Some useful example CSV files can be found in the Kajabity Tools.Testproject:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Kajabity Tools.Test/Test Data/Csv

JavaPropertiesEditor

This application illustrates the use of the Forms classes along with creating simple Java Properties Document classes. In this instance the JavaPropertiesclass handles its own Load and Save processes and these are used by theJavaPropertiesDocumentManager class.

Again, this project was created using a Windows Forms template in Visual Studio, with the MainForm class changed to extend SDIForm . NewJavaPropertiesDocument and JavaPropertiesDocumentManager were added extending the Document and DocumentManager classes respectively.

UML class diagram of JavaPropertiesEditor project classes.

The code is available on GitHub at:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Samples/JavaPropertiesEditor

Some useful example Java .properties files can be found in the Kajabity Tools.Test project:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Kajabity Tools.Test/Test Data/Java

TextEditor

This application makes use of the TextDocument and TextDocumentManagerclasses included with Kajabity Tools to create a very simple Text editor application.

This project was created using a Windows Forms template in Visual Studio, with the MainForm class changed to extend SDIForm, this time usingTextDocumentManager.

UML class diagram of TextEditor project classes.

HexViewer

This sample is the beginnings of a handy little utility and shows the use of the classes for loading the most basic file type of all, binary.

Use it to open and view the contents of a file as a series of hexadecimal bytes – best to select “All files (*.*)” rather than accept the default of “*.dat” files. As it stands, the application does nothing when Save or Save as are clicked. It tends to be sluggish on large files.

The code is available on GitHub at:

https://github.com/Kajabity/Kajabity-Tools/tree/master/Samples/HexViewer