Filter
This function configures a filter to the Alarm or MultiTagViewer objects.
Function Definition:
void Filter( string property, object value);
. string property: A String parameter containing the property name.
. object value: A object parameter containing the value that will be filtered in the property.
void Filter( Dictionary<string, object> properties );
. Dictionary<string, object> properties: A Dictionary parameter containing all the properties and value that will be filtered in the object.
To configure this property, follow the steps below:
1. In an object event, configure the Add function: MultiTagViewerObjectName.Filter(Property,Value);
2. During the execution of RunTime, run the configured event delete an item.
Example with Filter(string property, object value):
In the graphic document, the user has one Alarm object (named as GraphicObject1). In a Button object (named as GraphicObject2) the user configures the MouseUp event with the following event:
GraphicObject1.Filter("Property.Value", Value);
In this event, the GraphicObject1 will be filtered by the Property value configured.
Example with Filter(Dictionary<string, object > properties):
In the graphic document, the user has one MultiTagViewer object (named as GraphicObject1). In a Text-Box object (named as GraphicObject2) the user configures the MouseUp event with the following event:
System.Collections.Generic.Dictionary<string, object > dict = new System.Collections.Generic.Dictionary<string, object >();
dict.Add("Name.Value", NameTextBox.Text);
dict.Add("LastName.Value", LastNameTextBox.Text);
GraphicObject1.Filter(dict);
In this event, the GraphicObject1 will be filtered by the properties configured. The difference between this function and the first one is that, using a dictionary, the user can filter an item with more than one property configured. For example, in the following script:
GraphicObject1.Filter("Name.Value", NameTextBox.Text);
GraphicObject1.Filter("LastName.Value", LastNameTextBox.Text);
it will filter the items in the MultiTagViewer twice instead of once, then the resulting filter is the last executed.
|
Note: The variable object accepts the basic variable types such as Integer, String, Boolean, and others. |
|
Note: The Alarm object can only be filtered by the following properties: . Group . Priority The Alarm object can only be filtered with the function: . void Filter( string property, object value); |
|
Note: This property exists only to the following objects: . Alarm |