Exemplo n.º 1
0
 internal override object Execute(WorkspaceModel workspaceModel, bool events = true)
 {
     if (Model == null)
     {
         Model = workspaceModel.newPluginModel(Position,
                                               Width,
                                               Height,
                                               PluginType);
     }
     else
     {
         workspaceModel.addPluginModel((PluginModel)Model);
     }
     if (events)
     {
         workspaceModel.OnNewChildElement(Model);
     }
     return(Model);
 }
Exemplo n.º 2
0
 internal override void Undo(WorkspaceModel workspaceModel)
 {
     workspaceModel.addPluginModel((PluginModel)Model);
     workspaceModel.OnNewChildElement(Model);
 }