Exemplo n.º 1
0
 virtual public bool OnCommand(string MenuId)
 {
     switch (MenuId)
     {
     case "MenuId.Explode":
         if (Frame.ActiveAction is SelectObjectsAction)
         {
             using (Frame.Project.Undo.UndoFrame)
             {
                 IGeoObjectOwner addTo = hatch.Owner;
                 if (addTo == null)
                 {
                     addTo = Frame.ActiveView.Model;
                 }
                 GeoObjectList toSelect = hatch.Decompose();
                 addTo.Remove(hatch);
                 for (int i = 0; i < toSelect.Count; ++i)
                 {
                     addTo.Add(toSelect[i]);
                 }
                 SelectObjectsAction soa = Frame.ActiveAction as SelectObjectsAction;
                 soa.SetSelectedObjects(toSelect);     // alle Teilobjekte markieren
             }
         }
         return(true);
     }
     return(false);
 }