Kajabity.DocForms is a simple framework for file based windows desktop applications in .net. The Form, Document and Document Manager classes support creating, loading and saving files with recent file handling, save before closing if modified, drag and drop files and backups.
Kajabity.DocForms is Open Source under the Apache 2.0 Licence and is available as Sources and compiled DLL on GitHub, or from Nuget.org. There are also several sample applications that help
This is the first published release note for Kajabity.DocForms following it’s separation from the Kajabity-Tools project – see Kajabity Tools Version 0.4 Released – Strongly Named, Deployed to NuGet.org and GitHub Releases for details of the previous release.
Kajabity.DocForms is also available on nuget.org.
Changes in Release 0.2
Since release 0.1 of Kajabity.DocForms (details below), I’ve significantly refactored the original SDIForm and DocumentManager classes into SingleDocumentForm and SingleDocumentManager, retaining the old classes for backwards compatibility.
- New SingleDocumentForm class replacing SDIForm (which is retained but marked Obsolete).
- A genericised Form class taking an extended SingleDocumentManager<TDocument> as a constructor parameter.
- Added DocumentChanged events thrown when the document is changed by New, Open, Close.
- Annotations added to more properties to expose them with descriptions in Visual Editor.
- Removed Form.Load event handler – so doesn’t send DocumentChanged() event on Load.
- Introduced IDocumentSelector interface and FileDocumentSelector so that FileDialogs (Open and Close) can be modified by extending classes – e.g. to use OpenDirectory instead. Also helps with testing!
- Load and Save errors now popup MessageBox.
- Moved Windows helper methods to separate WindowsHelper class.
- New SingleDocumentManager class replacing DocumentManager (also retained but marked Obsolete).
- A Genericised taking the extended Document class as a property (so no need to keep casting).
- Added Document Status Changed event and rethrows Document.OnStatusChanged events as DocumentStatusChanged events.
- Added OnStatusChanged event to Document.
Minor updates to obsoleted classes:
- Some Recent Documents settings now public properties.
- More standardised naming: ‘manager’ now Manager. Other public methods now start with capital.
- On Load – DocumentChanged, not new document.
- Load/Save Document methods show message box on error.
- Default extension not initialised to ‘txt’.
- Simplified many properties and initialisers.
- More standardised naming – public properties start with capital.
- TextDocument and TextDocumentManager now obsolete and, if required, replaced with PlainTextDocument/Manager classes (from Samples).
And in Samples:
- Updated samples to use new SingleDocument* classes.
- Added a new PlainTextEditor sample project to replace the TextEditor project. TextEditor is retained to illustrate the obsolete SDIForm and DocumentManager approaches. PlainTextEditor is also used for NUnit testing and some hard to test features have been removed (e.g. drag and drop).
- Modified CsvEditor sample to use UserControl for the data grid display.
- Added extensive NUnit tests to improve the quality of the code each release.
- Started using a more GitFlow like approach to improve the stability of Nugets.
- General improvements to standardised naming and simplifying code.
- Improved overall source code and README documentation.
Changes in Release 0.1
Kajabity Tools v0.4 to Kajabity.DocForms v0.1
- Separated DocForms from KT. Namespace from Kajabity.Tools.Forms to Kajabity.DocForms
- Moved Document classes from Forms to Document namespace.
- Added Recent Files handling.
- Code tidying – more standards based naming and removal of spurious extras (e.g. unnecessary ‘this.’ Prefixes).
- Catch exceptions in saveDocument
- Added DocumentStatusChanged to complement DocumentChanged.
- Spent a little time improving HexViewer sample – much faster display and supports Drag and Drop.