DashboardControl DashboardControlsAdd(string mon, DashboardControl arg)
mon. Moniker for working with information panel controls.
arg. Settings of the created control.
The DashboardControlsAdd operation creates an information panel control.
To execute the operation, in the mon field specify moniker of opened information panel instance with the !Controls postfix, and in the arg field specify settings of the created control. The moniker can be obtained on executing the OpenDashboard operation. The minimum required fields are arg.id (empty string can be specified) and arg.k (the -1 value can be specified). Default values will be generated for all the settings that were not determined.
The operation results in the settings of the created control.
Below is the example of creating a new control. The request contains moniker for working with controls, empty identifier, and key. The response contains basic settings of the created control.
{
"DashboardControlsAdd" :
{
"mon" : "DDAHEFONHJEHGOAEEDLJNELPBEBAIMJEJILGKJKBBPLABDMK!M!S!PMAMCNGONHJEHGOAEGHJFDCONGPFPHECEDKMIJJCJCFJDMONM!Controls",
"arg" :
{
"k" : "-1",
"id" : ""
}
}
}
{
"DashboardControlsAddResult" :
{
"k" : "2",
"id" : "ITEM1",
"title" :
{
"text" : "Control 1",
"title" : "Control 1",
"font" :
{
"family" : "Roboto",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "14",
"units" : "Pt"
}
},
"textColor" : "#54575B",
"backgroundColor" : "#FFFFFF",
"textAlignment" : "Near",
"verticalTextAlignment" : "Center",
"size" :
{
"width" : "-1",
"height" : "8000",
"units" : "Mkm"
},
"visible" : "1",
"htmlText" : "<span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span>",
"htmlTitle" : "<span style="font-weight: normal;font-size: 14pt;color: #54575b;background-color: #ffffff;text-align: left;font-family: Roboto; "><span style="color: #54575b;background-color: #ffffff;font-size: 14pt;font-weight: normal;font-family: Roboto; ">Control 1</span></span>",
"isControl" : "1",
"autoHeight" : "0",
"customFormat" :
{
"@F" : "",
"@FT" : "0"
}
},
"visualizerKey" : "4294967295",
"fieldKey" : "4294967295",
"binding" : "",
"slideKeys" :
{
"u" :
[
"1",
"2"
]
},
"reciveKeys" : "",
"font" :
{
"family" : "Roboto",
"style" :
{
"it" : "Regular"
},
"size" :
{
"width" : "-1",
"height" : "14",
"units" : "Pt"
}
},
"textColor" : "#54575B",
"backgroundColor" : "#FFFFFF"
}
}
public static DashboardControl DashboardControlsAdd(string moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tAdd = new DashboardControlsAdd()
{
arg = new DashboardControl()
{
id = string.Empty,
k = uint.MaxValue
},
mon = moniker + "!Controls"
};
// Create a control in information panel
var result = somClient.DashboardControlsAdd(tAdd);
return result;
}
See also: