Managing Methods and Events in Q Studio¶
Associate methods with an event
In Project select the desired object: in Events, the events available for the object will appear.
Click near the event of interest and select the desired method (see Selecting a Method), then click Select.
If the method requires arguments, expand the method and set them.
Repeat the previous three steps for each method to be associated the same event.
Configuring a Change Event
In Project select the desired object.
Right-click the variable of interest, then New > Change event: the event will appear in the Events panel.
Click next to the event of interest and select the desired method (see Selecting a Method), then click Select.
If the method requires arguments, expand the method and set them.
Repeat the previous four steps for each method to be associated with the same event.
Manage events of one object from another object
In Project select the object that must manage the event of another object.
Click in the header of the Events panel and select the event to manage of another object, then click Select.
Note
the events are identified by the icon .
To associate a method with the event, click near the event selected and select the desired method, then click Select.
If the method requires arguments, expand the method and set them.
Selecting a Method
Depending on whether the method to be associated with an event is global or local, proceed as follows:
To select a method.. |
Then, in the selection window… |
And… |
---|---|---|
global |
expand the Commands node, then expand the node that identifies the method type |
select the desired method. |
locale |
expand the node of the desired object |
select the desired method. |
Create a new method of an object in Q Studio
Inside the Project panel, click the desired node, then click , NetLogic, runtime Netlogic: a new NetLogic is created.
Right-click NetLogic, New, Method:
The following code is added in NetLogic:
[ExportMethod] public void MethodName() { }
NetLogic opens in the editor of the set code.
(Optional) Rename the method in C#.