sCfg | (String) Source of the read configuration data.
"serverfile.tg:" - file on the server in the trend configuration folder (see the "Path to configuration groups" configurator), e.g. "serverfile.tg:config.tg".
Caution! The important fact is that this reference to the configuration file is valid on the server in the running application and also for the client in the Web application. Therefore it is possible to use the same way of reading the configuration file, regardles if the application is local or Web. In the running application the file is read directly as file: and in the Web application as http:. "string:" - The parameter contains the configuration data themselves - a string in the XML format.
The configuration is read even if the string: is omited at the beginning of the parameter, but it is recommended to use the string:. "http:" - URL address. For example "http://computer/address/cfg.tg" must be entered in the parameter. See Example3.
"input:" - Selection from the list.
In the list there are filenames of configurations saved in the #cfg: folder. (e.g. input:#cfg: ).
If the configuration server has been defined (by the AddServer method with sPurpose="cfg") parameter, then the configuration groups from this server are also included in this list. In the Web client there are additional options available: - The configuration files saved locally in Web browser temporary storage by the SaveCfg method.
- Configuration groups from the Web panel server. |
---|---|
nStyle | (Long) Specifies how the data have to be read to the viewer. The viewer properties are always overwritten. The parameter specifies how to read the tvTrend objects if the viewer has already created some tvTrend objects (i.e. it views some graphs) before calling the method.
6 - Existing tvTrend objects in the viewer are overwritten by the configuration data. If they don't exist, then new ones are created and filled up.
|
var oTView = pMe;
if (oTView.LoadCfg("serverfile.tg:mycfg.tg", 11))
{
// .. configuration has been read
}
var oTView = pMe;
if (oTView.LoadCfg("file:c:/mycfg.tg", 11))
{
// .. configuration has been read
}
var oTView = pMe;
if (oTView.LoadCfg("http://computerAP1/dir3/cfg1.tg", 11))
{
// .. configuration has been read
}