Software
Customisation User Guide
Common Application Framework
Common Application Framework
The Common Application Framework (CAF) provides the .NET programmer with access to various services which support both application development and customisation. The available services are:
•
ServiceManager
•
AddinManager
•
SettingsManager
•
CommandBarManager/RibbonBar
•
CommandManager
•
ResourceManager
•
WindowManager
CAF uses a declarative XML definition of menus, toolbars and ribbon tabs and can be used as a menu/toolbar design tool.
Each CAF based application consists of an xml customisation file which lists UIC files that define the tools attached to commands.
XML Customisation File
The example displays an xml customisation file named in the format <module>Customisation.xml.
<?xml version="1.0" encoding="utf-8"?>
<UICustomizationSet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UICustomizationFiles>
<CustomizationFile Name="Module" Path=“module.uic" />
</UICustomizationFiles>
</UICustomizationSet>
UIC File
The example displays a UIC file named in the format module.uic:
<?xml version="1.0" encoding="utf-8"?>
<UserInterfaceCustomization xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="www.aveva.com">
<Version>1.0</Version>
<Tools>
<PopupControlContainerTool Name="Aveva.Pdms.HistoryBackContainer">
<Command>
CAF .NET Commands
.NET commands can be used in a CAF. For example:
public class MyCommand : Aveva.ApplicationFramework.Presentation.Command
{
public override void Execute()
{
Console.WriteLine(“Do something");
}
public override System.Collections.ArrayList List
{
get
{
return new System.Collections.ArrayList();
}
}
}
CAF PML Commands
PML commands can be used in a CAF. For example:
setup command !!MyCommand
exit
define method .commanda()
!this.key = 'Aveva.Pdms.Pml.commanda'
!this.Execute = 'Execute‘
!this.list = 'List'
endmethod
define method .Execute(!args is ARRAY)
$P Execute commanda
Endmethod
define method .List(!args is ARRAY)
!a = object array()
!a[0] = 'a'
!args[0] = !a
endmethod
Execute the CAF Command
Attach the command object to the AVEVA module using the
Command
window.
Execute the command. For example:
define method Execute(!args is ARRAY)
q var !this.checked()
endmethod
The button is displayed on the ribbon.
Detailed information about CAF is available, refer to
Common Application Framework (CAF) Interfaces
and
Menu and Command Bar Customisation
for further information.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.