예제 #1
0
 public override void Execute()
 {
     if (this.SceneViewModel.TextSelectionSet.IsActive)
     {
         this.SceneViewModel.TextSelectionSet.TextEditProxy.EditingElement.SelectAll();
     }
     else
     {
         SelectionManagerPerformanceHelper.MeasurePerformanceUntilPipelinePostSceneUpdate(this.SceneViewModel.DesignerContext.SelectionManager, PerformanceEvent.SelectElement);
         ISceneElementCollection elementCollection = (ISceneElementCollection) new SceneElementCollection();
         SceneElement            selectionRoot     = SelectAllCommand.GetSelectionRoot(this.SceneViewModel);
         if (selectionRoot != null)
         {
             foreach (SceneElement element in SceneElementHelper.GetElementTree(selectionRoot))
             {
                 if (this.IsSelectable(element, selectionRoot))
                 {
                     elementCollection.Add(element);
                 }
             }
         }
         this.SceneViewModel.ElementSelectionSet.SetSelection((ICollection <SceneElement>)elementCollection, (SceneElement)null);
         this.SceneViewModel.PathPartSelectionSet.Clear();
     }
 }
예제 #2
0
 private bool IsSelectable(SceneElement element, SceneElement selectionRoot)
 {
     return(SelectAllCommand.IsSelectable(element, element.EffectiveParent, selectionRoot));
 }