- Getting started
- Using the software
- OPC UA
- Graphic and layout objects
- Developing solutions
- Developing projects with C#
- Application examples
- UI tutorial
- NetLogic tutorial
- Object and variable references
IUAObject.UAEvent
This event occurs when the project object to which the
IUAObject
C# object refers generates any OPC UA event.event EventHandler<UAEventArgs> UAEvent;
Event handler
public delegate void UAEvent(object sender, UAEventArgs e);
Event handler arguments
- sender(object)
- A C# object that corresponds to the object of the project origin of the event.
- e(UAEventArgs)
- A C# object that contains the following properties:
- EventType(IUAObjectType)
- The node of the type of event generated.
- Arguments(UAEventArgumentList)
- A C# object that contains the arguments of the generated event.
Example
The
Button1_UAEvent
method runs each time the Button1
project button generates any event (for example, OnMouseClick
, OnMouseDown
, or OnMouseUp
).public override void Start() { var button1 = Owner.Get<Button>("Button1"); button1.UAEvent += Button1_UAEvent; } private void Button1_UAEvent(object sender, UAEventArgs e) { var label1 = Owner.Get<Label>("Label1"); var button1 = (Button)sender; label1.Text = "Event on " + button1.BrowseName + " of type " + e.EventType.BrowseName + " , "; }
Provide Feedback