public ICommand CreateCommand() { PathObjectTypeDialog dialog = new PathObjectTypeDialog(); dialog.pathObjectType = pathObjectTypeNode.PathObjectType; PathObjectType beforePathObjectType = new PathObjectType(dialog.pathObjectType); if (dialog.ShowDialog() == DialogResult.OK) { PathObjectType afterPathObjectType = new PathObjectType(dialog.pathObjectType); ICommand cmd = new EditPathObjectTypeCommand(app, parent, pathObjectTypeNode, beforePathObjectType, afterPathObjectType); return(cmd); } else { return(null); } }
public ICommand CreateCommand() { PathObjectTypeDialog dialog = new PathObjectTypeDialog(); dialog.pathObjectType = pathObjectTypeNode.PathObjectType; PathObjectType beforePathObjectType = new PathObjectType(dialog.pathObjectType); if (dialog.ShowDialog() == DialogResult.OK) { PathObjectType afterPathObjectType = new PathObjectType(dialog.pathObjectType); ICommand cmd = new EditPathObjectTypeCommand(app, parent, pathObjectTypeNode, beforePathObjectType, afterPathObjectType); return cmd; } else return null; }