Action
Overview
The Action class is used to store action item inside Hydra plugins.
Use Case
Hydra allows plugins to define a list of actions in the plugins action lists (ActionList) and then host application can access these actions and control their execution.
var act = new Action("actSave", "Save File", 0);
act.Execute += (s, e) => MyDocument.Save();
this.Actions.Add(act);
Location
- Reference: RemObjects.Hydra.dll
- Namespace: RemObjects.Hydra.Actions
- Ancestry: Component | Action
constructor
Creates a new instance of the class.
constructor
Action()
Sub New()
constructor (String, String, Int32)
constructor(name: String; caption: String; imageIndex: Int32)
Action(String name, String caption, Int32 imageIndex)
Sub New(name As String, caption As String, imageIndex As Int32)
Parameters:
- name:
- caption:
- imageIndex:
constructor (String, String, Int32, EventHandler)
constructor(name: String; caption: String; imageIndex: Int32; callback: EventHandler)
Action(String name, String caption, Int32 imageIndex, EventHandler callback)
Sub New(name As String, caption As String, imageIndex As Int32, callback As EventHandler)
Parameters:
- name:
- caption:
- imageIndex:
- callback:
Assign
method Assign(source: Object)
void Assign(Object source)
Sub Assign(source As Object)
Parameters:
- source:
Caption
Gets or sets the text of the caption that is associated with this action.
property Caption: String read write;
String Caption { get; set; }
Property Caption() As String
Checked
Gets or sets value that indicates whether action is displayed with check mark.
property Checked: Boolean read write;
Boolean Checked { get; set; }
Property Checked() As Boolean
Enabled
Gets or sets value that indicates whether action is enabled.
property Enabled: Boolean read write;
Boolean Enabled { get; set; }
Property Enabled() As Boolean
Execute
Fired when host executes the action.
event Execute: EventHandler;
delegate EventHandler Execute()
Event Execute As EventHandler
Hint
Gets or sets hint value.
property Hint: String read write;
String Hint { get; set; }
Property Hint() As String
ImageIndex
Gets or sets the index of the image that is associated with this action.
property ImageIndex: Int32 read write;
Int32 ImageIndex { get; set; }
Property ImageIndex() As Int32
Name
Gets or sets the name of the action.
property Name: String read write;
String Name { get; set; }
Property Name() As String
PerformAction
Executes associated event handler.
method PerformAction
void PerformAction()
Sub PerformAction()
RequiredPrivilege
User defined string that holds privilages that is required to use this action.
property RequiredPrivilege: String read write;
String RequiredPrivilege { get; set; }
Property RequiredPrivilege() As String
ToString
Returns the caption of the action.
method ToString: String
String ToString()
Function ToString() As String
Update
Fired when host updates the action.
event Update: EventHandler;
delegate EventHandler Update()
Event Update As EventHandler
UserData
User defined data.
property UserData: String read write;
String UserData { get; set; }
Property UserData() As String
Visible
Gets or sets value that indicates whether action is visible.
property Visible: Boolean read write;
Boolean Visible { get; set; }
Property Visible() As Boolean
Caption
Gets or sets the text of the caption that is associated with this action.
property Caption: String read write;
String Caption { get; set; }
Property Caption() As String
Checked
Gets or sets value that indicates whether action is displayed with check mark.
property Checked: Boolean read write;
Boolean Checked { get; set; }
Property Checked() As Boolean
Enabled
Gets or sets value that indicates whether action is enabled.
property Enabled: Boolean read write;
Boolean Enabled { get; set; }
Property Enabled() As Boolean
Hint
Gets or sets hint value.
property Hint: String read write;
String Hint { get; set; }
Property Hint() As String
ImageIndex
Gets or sets the index of the image that is associated with this action.
property ImageIndex: Int32 read write;
Int32 ImageIndex { get; set; }
Property ImageIndex() As Int32
Name
Gets or sets the name of the action.
property Name: String read write;
String Name { get; set; }
Property Name() As String
RequiredPrivilege
User defined string that holds privilages that is required to use this action.
property RequiredPrivilege: String read write;
String RequiredPrivilege { get; set; }
Property RequiredPrivilege() As String
UserData
User defined data.
property UserData: String read write;
String UserData { get; set; }
Property UserData() As String
Visible
Gets or sets value that indicates whether action is visible.
property Visible: Boolean read write;
Boolean Visible { get; set; }
Property Visible() As Boolean
constructor
Creates a new instance of the class.
constructor
Action()
Sub New()
constructor (String, String, Int32)
constructor(name: String; caption: String; imageIndex: Int32)
Action(String name, String caption, Int32 imageIndex)
Sub New(name As String, caption As String, imageIndex As Int32)
Parameters:
- name:
- caption:
- imageIndex:
constructor (String, String, Int32, EventHandler)
constructor(name: String; caption: String; imageIndex: Int32; callback: EventHandler)
Action(String name, String caption, Int32 imageIndex, EventHandler callback)
Sub New(name As String, caption As String, imageIndex As Int32, callback As EventHandler)
Parameters:
- name:
- caption:
- imageIndex:
- callback:
Assign
method Assign(source: Object)
void Assign(Object source)
Sub Assign(source As Object)
Parameters:
- source:
PerformAction
Executes associated event handler.
method PerformAction
void PerformAction()
Sub PerformAction()
ToString
Returns the caption of the action.
method ToString: String
String ToString()
Function ToString() As String
Execute
Fired when host executes the action.
event Execute: EventHandler;
delegate EventHandler Execute()
Event Execute As EventHandler
Update
Fired when host updates the action.
event Update: EventHandler;
delegate EventHandler Update()
Event Update As EventHandler