Managing Methods and Events in Q Studio

Associate methods with an event

  1. In Project select the desired object: in Events, the events available for the object will appear.

  2. Click image1 near the event of interest and select the desired method (see Selecting a Method), then click Select.

  3. If the method requires arguments, expand the method and set them.

  4. Repeat the previous three steps for each method to be associated the same event.

Configuring a Change Event

  1. In Project select the desired object.

  2. Right-click the variable of interest, then New > Change event: the event will appear in the Events panel.

  3. Click image2 next to the event of interest and select the desired method (see Selecting a Method), then click Select.

  4. If the method requires arguments, expand the method and set them.

  5. Repeat the previous four steps for each method to be associated with the same event.

Manage events of one object from another object

  1. In Project select the object that must manage the event of another object.

  2. Click image3 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 image4.

  3. To associate a method with the event, click image5 near the event selected and select the desired method, then click Select.

  4. 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

  1. Inside the Project panel, click the desired node, then click image6, NetLogic, runtime Netlogic: a new NetLogic is created.

  2. 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.

  3. (Optional) Rename the method in C#.

See also

Related concepts

Events and Methods