Configuration Tool

Applications based on .NET and the PPJ Framework have many new features and a lot of new possibilities that were unthinkable of in the old Team Developer world. Many of these new features can be configured using the standard App.config file (which is compiled into the standard [application-name].exe.config) and in the sql.config file that is used by the PPJ Framework to load data sources (this file replaces the old sql.ini).

However, adding or editing options to XML files can be confusing and time consuming to make sure everything is typed correctly, all the options are filled properly, and so on. For this reason we have added a new complete and easy-to-use Application Configuration Tool. Using this tool, developers can fine tune and configure many of the new exciting features supported by their new .NET applications.

The configuration tool (see image below) includes four panels to configure the areas listed below:

  • Theme - Select, Import, Edit, Configure the new skinning engine

  • Data Sources - Add, Remove, Configure all the data sources in sql.config

  • Tracing - Enable, Add, Remove, Configure trace listeners without recompiling the application

  • Reporting - Change the default reporting engine without recompiling the application

The Configuration Tool can be used both on a Visual Studio Solution (when installed with the PPJ Integration package) while working on the project, or after the application has been compiled.

Skinning

The new skinning engine has a number of properties that can affect the final look of the application. Obviously the most important is the skin being used. However, you can also define the shadow of forms, excluded system dialogs and more.

After you have selected the executable to configure, the tool will load the skinning configuration from the [application-name].exe.config file (it creates one when saving if it didn't exist).

Enable Skinning

Enables/Disables skinning altogether.

Active Skins

Selects the skin file to use. If the application has been compiled with embedded skin files, the list shows all the skins embedded with the application plus the three default Office2007 skins pre built into the PPJ Framework. Otherwise, the tool shows all the skins in the .\Skins subdirectory.

Import Skin...

This is enabled only if the application uses external skin files in a \Skins subdirectory, or if the tool is being used on a open project being developed. This button shows the form below and allows you to import any standard skin file (based on the .msstyles format) or an already converted .vssf skin file.

Edit Skin...

This is enabled only if the application uses external skin files or is the tool is being used in development. This button launches the new Skin Editor which allows you to edit all aspects of a skin file.

Options

There are 5 options that can be changed in the config file:

Skin System Colors: When enabled, the skinner adapts the system colors to the skin. If a custom control uses Windows system colors API it will retrieve the altered colors.

Skin Common Dialogs: When enabled, the skinner applies the selected theme also to all system dialogs (File Open, Font, Message Box, Print, etc.).

Skin Windows Frames: When disabled, the frame of forms is not skinned. This is useful if you want to skin on the controls on a form and preserve the current Windows frames.

Use System Font: When enabled, the skinner ignores the fonts defined in the skin file and uses always the system's fonts.

Shadow Style: Adds a configurable shadow to all skinned forms.

Data Sources

The new sql.config file supports several options and can be quite complex and error-prone to edit by hand. Using the new configuration tool you can now fully manage all data sources in sql.config files.

After you have selected the executable to configure, the tool will load the sql.config file in the same directory. If the application configuration file (app.exe.config) specifies an alternative path, the tool will load the alternative sql.config file.

Location of sql.config

When the Default option is checked, it means that the tool has loaded the sql.config from the same directory where the executable is located. Otherwise the alternative path is displayed in the next field. If this setting and path are changed using the tool, the data sources settings are saved into the new sql.config file and the App.config configuration is updated with the new path.

Data Sources

This is the list of all loaded data sources. You can add new ones or remove existing ones. For each data source you can edit all properties in the panel on the right. Each property has a description (show at the bottom when selected). Some properties display a drop down list with predefined options.

Tracing

Applications based on .NET and using the Trace class can generate logging and diagnostic information without the need of recompilation. It's enough to enable a trace listener to turn on logging. When tracing is turned off there is no performance loss.

Using the configuration tool you can manage multiple listeners and fine tune the traces coming from the PPJ Framework and/or your application.

After you have selected the executable to configure, the tool will load the diagnostics configuration from the application's configuration file. Any change is saved back into the same file. If the application didn't have a configuration file, the tool creates a new one.

Sources

In the sources section you will find all the supported sources (Trace switches) supported by the PPJ Framework. For each source you can set the trace level that you want to generate: Off, Error, Warning, Info, Verbose. These are all standard .NET values from the TraceLevel enumeration. When selecting a higher level you are also enabling all the lower levels. Verbose, for example, will log everything.

For more information about the different trace sources and levels, see Tracing.

Listeners

In the listeners list you can add or remove listeners. When you remove the Default listener, it is not actually removed from the list, rather the Remove property is set to true. All other listeners are removed from the list. Also, the Default listener cannot be edited, it can only be removed.

Properties under the global section are shared among all listeners. Most listeners don't use the Autoflush or IndentSize properties anyway.

When setting the clear property to true, the tool will add the <clear/> tag to the configuration file to remove all existing listeners.

Reporting

The PPJ Framework is designed to support multiple reporting engines. Using the configuration tool you can change the default engine used by the application and can also manage the properties that are specific for each engine.

In addition to the reporting systems already supported, you can also select any custom implementation that supports the ISalReport interface.

See Reports Support for more information.

Last updated