ActionList

Overview

The ActionList class is used to store a list of actions inside .NET plugins. You can get access to the action list by using plugin's Action property with visual designer or in code.

Use Case

      var act = new Action("actSave", "Save File", 0); 
      act.Execute += (s, e) => MyDocument.Save();
      this.Actions.Add(act);

Location

 

constructor

Creates a new instance of the class.

 

constructor

 

ActionList()

 

Sub New()

Actions

Returns an action with specified index.

 

property Actions[aIndex: Int32]: Action read write;

 

Action Actions[Int32 aIndex] { get; set; }

 

Property Actions(aIndex As Int32) As Action

Add (Action)

Adds an action with a specified parameters to the list.

 

method Add(action: Action)

 

void Add(Action action)

 

Sub Add(action As Action)

Parameters:

  • action: Reference to an Action that needs to be added.

Add (String, String, Int32): Action

 

method Add(name: String; caption: String; imageIndex: Int32): Action

 

Action Add(String name, String caption, Int32 imageIndex)

 

Function Add(name As String, caption As String, imageIndex As Int32) As Action

Parameters:

  • name:
  • caption:
  • imageIndex:

Add (String, String, Int32, EventHandler): Action

 

method Add(name: String; caption: String; imageIndex: Int32; callback: EventHandler): Action

 

Action Add(String name, String caption, Int32 imageIndex, EventHandler callback)

 

Function Add(name As String, caption As String, imageIndex As Int32, callback As EventHandler) As Action

Parameters:

  • name:
  • caption:
  • imageIndex:
  • callback:

Clear

Removes all the actions from the list.

 

method Clear

 

void Clear()

 

Sub Clear()

Count

Returns the number of Action items in the ActionList.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

ReadOnly Property Count() As Int32

FindByName

 

method FindByName(actionName: String): Action

 

Action FindByName(String actionName)

 

Function FindByName(actionName As String) As Action

Parameters:

  • actionName:

GetActionAt

 

method GetActionAt(index: Int32): Action

 

Action GetActionAt(Int32 index)

 

Function GetActionAt(index As Int32) As Action

Parameters:

  • index:

IndexOf (Action): Int32

Adds an action with a specified parameters to the list.

 

method IndexOf(action: Action): Int32

 

Int32 IndexOf(Action action)

 

Function IndexOf(action As Action) As Int32

Parameters:

  • action: Reference to an Action that needs to be added.

IndexOf (String, Boolean): Int32

 

method IndexOf(name: String; ignoreCase: Boolean): Int32

 

Int32 IndexOf(String name, Boolean ignoreCase)

 

Function IndexOf(name As String, ignoreCase As Boolean) As Int32

Parameters:

  • name:
  • ignoreCase:

 

Actions

Returns an action with specified index.

 

property Actions[aIndex: Int32]: Action read write;

 

Action Actions[Int32 aIndex] { get; set; }

 

Property Actions(aIndex As Int32) As Action

Count

Returns the number of Action items in the ActionList.

 

property Count: Int32 read;

 

Int32 Count { get; }

 

ReadOnly Property Count() As Int32

 

constructor

Creates a new instance of the class.

 

constructor

 

ActionList()

 

Sub New()

Add (Action)

Adds an action with a specified parameters to the list.

 

method Add(action: Action)

 

void Add(Action action)

 

Sub Add(action As Action)

Parameters:

  • action: Reference to an Action that needs to be added.

Add (String, String, Int32): Action

 

method Add(name: String; caption: String; imageIndex: Int32): Action

 

Action Add(String name, String caption, Int32 imageIndex)

 

Function Add(name As String, caption As String, imageIndex As Int32) As Action

Parameters:

  • name:
  • caption:
  • imageIndex:

Add (String, String, Int32, EventHandler): Action

 

method Add(name: String; caption: String; imageIndex: Int32; callback: EventHandler): Action

 

Action Add(String name, String caption, Int32 imageIndex, EventHandler callback)

 

Function Add(name As String, caption As String, imageIndex As Int32, callback As EventHandler) As Action

Parameters:

  • name:
  • caption:
  • imageIndex:
  • callback:

Clear

Removes all the actions from the list.

 

method Clear

 

void Clear()

 

Sub Clear()

FindByName

 

method FindByName(actionName: String): Action

 

Action FindByName(String actionName)

 

Function FindByName(actionName As String) As Action

Parameters:

  • actionName:

GetActionAt

 

method GetActionAt(index: Int32): Action

 

Action GetActionAt(Int32 index)

 

Function GetActionAt(index As Int32) As Action

Parameters:

  • index:

IndexOf (Action): Int32

Adds an action with a specified parameters to the list.

 

method IndexOf(action: Action): Int32

 

Int32 IndexOf(Action action)

 

Function IndexOf(action As Action) As Int32

Parameters:

  • action: Reference to an Action that needs to be added.

IndexOf (String, Boolean): Int32

 

method IndexOf(name: String; ignoreCase: Boolean): Int32

 

Int32 IndexOf(String name, Boolean ignoreCase)

 

Function IndexOf(name As String, ignoreCase As Boolean) As Int32

Parameters:

  • name:
  • ignoreCase: