Dictionary<string, object> Commands = new Dictionary<string, object>()
{
//clone command
{
//command name
"copy",
//command definition
new Command()
{
//Name of the method/command handler that is defined in scripts
Execute = "copyObject",
//Gesture to define when the command is to be executed
Gesture = new Gesture()
{
//Combination of keys and modifier keys
Key = Keys.C, KeyModifiers = KeyModifiers.Control
}
}
},
{
//command name
"paste",
//command definition
new Command()
{
//Name of the method/command handler that is defined in scripts
Execute = "pasteObject",
//Gesture to define when the command is to be executed
Gesture = new Gesture()
{
//Combination of keys and modifier keys
Key = Keys.V, KeyModifiers = KeyModifiers.Control
}
}
},
};
DiagramContent.CommandManager.Commands = Commands;
Please let me know if any concerns.
Regards,
Shyam G