menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MacroCmd - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MacroCmd

    List of commands that are bundled into a single command.

    Inheritance
    System.Object
    MacroCmd
    Implements
    ICommand
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class MacroCmd : ICommand

    Constructors

    MacroCmd(String)

    Initializes a new instance of the MacroCmd class.

    Declaration
    public MacroCmd(string strDescription)
    Parameters
    Type Name Description
    System.String strDescription

    The description.

    Fields

    cmds

    List of commands to execute.

    Declaration
    protected ArrayList cmds
    Field Value
    Type
    System.Collections.ArrayList

    Properties

    CanUndo

    Gets a value indicating whether or not the command supports undo.

    Declaration
    public bool CanUndo { get; }
    Property Value
    Type
    System.Boolean

    Description

    Gets short, user-friendly description of the command.

    Declaration
    public string Description { get; }
    Property Value
    Type
    System.String

    Methods

    AddCommand(ICommand)

    Add a command to the macro.

    Declaration
    public void AddCommand(ICommand cmd)
    Parameters
    Type Name Description
    ICommand cmd

    Command to add.

    CanMerge(ICommand)

    Determines whether this instance can merge the specified command to previous recorded command.

    Declaration
    public bool CanMerge(ICommand cmd)
    Parameters
    Type Name Description
    ICommand cmd

    The command to merge.

    Returns
    Type Description
    System.Boolean

    true if this instance can merge the specified command to last recorded command; otherwise, false.

    Clear()

    Removes all commands from the macro.

    Declaration
    public void Clear()

    Do(Object)

    Executes all commands in the macro.

    Declaration
    public bool Do(object cmdTarget)
    Parameters
    Type Name Description
    System.Object cmdTarget

    Command target object.

    Returns
    Type Description
    System.Boolean

    True if successful; otherwise False.

    Merge(ICommand)

    Merges the specified command with last recorded user operation.

    Declaration
    public void Merge(ICommand cmd)
    Parameters
    Type Name Description
    ICommand cmd

    The command to merge.

    Undo()

    Reverses the command.

    Declaration
    public bool Undo()
    Returns
    Type Description
    System.Boolean

    True if successful; otherwise False.

    Implements

    ICommand
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved