public override void Execute(object parameter = null) { if (parameter is Fluent.ToggleButton) { ToggleButton = (ToggleButton)parameter; } CommandBase command = CommandLogger.GetNextCommand(); if (command is StackedCommand) { ((StackedCommand)command).Controller = Current.Controller; ICommandWithDiagramParameter commandWithDiagramParameter = command as ICommandWithDiagramParameter; if (commandWithDiagramParameter != null && commandWithDiagramParameter.DiagramGuid != Guid.Empty) { Diagram diagram = Current.Controller.Project.TranslateComponent <Diagram>(commandWithDiagramParameter.DiagramGuid); if (diagram.Schema != null) { commandWithDiagramParameter.SchemaGuid = diagram.Schema; } } } command.Execute(); }