Example #1
0
        private void ExtendElementSelection()
        {
            List <SceneElement> list = new List <SceneElement>();

            foreach (T obj in this.Selection)
            {
                ISceneElementSubpart sceneElementSubpart = (ISceneElementSubpart)obj;
                if (!this.sceneElementSelectionSet.IsSelected(sceneElementSubpart.SceneElement) && !list.Contains(sceneElementSubpart.SceneElement))
                {
                    list.Add(sceneElementSubpart.SceneElement);
                }
            }
            if (list.Count <= 0)
            {
                return;
            }
            this.sceneElementSelectionSet.ExtendSelection((ICollection <SceneElement>)list);
        }
Example #2
0
        private void SetElementSelection()
        {
            List <SceneElement> list = new List <SceneElement>();

            foreach (T obj in this.Selection)
            {
                ISceneElementSubpart sceneElementSubpart = (ISceneElementSubpart)obj;
                if (!list.Contains(sceneElementSubpart.SceneElement) && sceneElementSubpart.SceneElement != null)
                {
                    list.Add(sceneElementSubpart.SceneElement);
                }
            }
            if (list.Count > 0)
            {
                this.sceneElementSelectionSet.SetSelection((ICollection <SceneElement>)list, (SceneElement)null);
            }
            else
            {
                this.sceneElementSelectionSet.Clear();
            }
        }