InfFront-based application development

Demo source code: InfFront.Demo.zip (the Microsoft .NET Framework 3.5 Service Pack 1 is required).

In order to build the InfFront-based application you have to reference it to several of the following assemblies:
  • InfFront.UICore which defines most abstract interfaces used by the InfoViews to access the InfoSources.
  • InfFront.InfoSources.Base which implements base components necessary to define you information sources.
  • InfFront.InfoSources.ADO (optional) - link this assembly when you want to use ADO.NET DataTables as the data sources.
  • InfFront.InfoViews.WPF or InfFront.InfoViews.WinForms to provide the information presentation engine (please note that the WinForms version is currently way less developed than the WPF one)
Please see the package relation scheme below.
Package scheme.png

When you've started a .NET project referencing to all InfFront packages you need, you can create the root of your information hierarchy. It must be an InfFront.InfoSources.Base.InfoSource descending component (typically it's the InfFront.InfoSources.Base.DummyInfoSource). After that, all you have to do is to use the following user-friendly Visual Studio 2008-compatible visual designer to specify all the information sources you want to present:
main_demo.PNG

Here it is possible to:
  • Provide all the application captions, comments (tooltips) and images (of any size).
  • Add and configure more nested information sources. There are currently 4 common InfoSource classes:
    • InfFront.InfoSources.Base.DummyInfoSource which provides no data and is only used to host other nested InfoSources.
    • InfFront.InfoSources.Base.ObjectListSource which uses an IList instance as the primary data source.
    • InfFront.InfoSources.Base.SingleObjectInfoSource is used to present non-list information (note: you may use any other InfoSource class for the same purpose when you set it's MaxEntryCount property to "1").
    • InfFront.InfoSources.ADO.DataTableInfoSource which uses an ADO.NET DataTable as the primary data source.
    • Of cource you may also create your own InfoSource descendants and all of them will appear at the common nested InfoSource class selection menu.
  • Bind InfoSources to the correspondent data sources (as you may see at the picture above all nested InfoSources are bound to the "testDataSet" DataTable declarations).
  • Define, customize and group the InfoSource fields. There are currently 3 common InfoSource field classes:
    • InfFront.InfoSources.Base.MappedInfoField which uses System.Reflection to get the data from an object properties.
    • InfFront.InfoSources.Base.IntegralInfoField which is the simple "calc" field with the OnGetValue and OnSetValue events.
    • InfFront.InfoSources.ADO.DataColumnInfoField which is used to bind to the DataTable's columns.
    • You may create your own InfFront.InfoSources.Base.InfoField descendants as well.
  • Define and customize the InfoSource commands.

When you finish this you'll need only 3 lines of code to run your UI:
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            var wnd = new InfFront.InfoViews.WPF.MainWindow();
            wnd.SetSource(new RootInfoSource());
            wnd.Show();
        }


That's all! Now you have your fully functional application:
app_demo.PNG

Please check the InfFront.Demo.zip for more details.

Post-build application configuring

By default, any InfFront-based application has a user configuration capability. It is accessible via the "Preferences" context menu item. When you click it you'll see the configuration dialog:
preferences.PNG
As you can see the preferences subsystem is an InfFront-based InfoSource itself (please see the InfFront.InfoViews.WPF.Settings.GeneralSettingsInfoSource for more details).

All the preference changes you made are stored as an xml database at the user's LocalSettings, so you can ship it to your customers so they could view the application just how you want them to view it. For instance:
configured_app_demo.PNG

Via the run-time configuration facility you are able to:
  • Change the general application layout. Currently the 2 layout styles are supported: the explorer and the menu'n'tabs styles.
  • Change the main window sizes and appearance.
  • Change the application colors including separate color scheme for any page/tab and any button.
  • Change grid column sizes and orders.
  • There are plans to provide much more user configuration functionality.

Last edited Jun 22, 2010 at 2:34 PM by eugals, version 27

Comments

No comments yet.