public ISelectionState CreateSelectionSate(GeometrySelectionMode mode) { if (_currentState != null) { _currentState.Clear(); _currentState.SelectionChanged -= SelectionManager_SelectionChanged; } switch (mode) { case GeometrySelectionMode.Object: _currentState = new ObjectSelectionState(); break; case GeometrySelectionMode.Face: _currentState = new FaceSelectionState(); break; case GeometrySelectionMode.Vertex: _currentState = new VertexSelectionState(); break; default: throw new Exception(); } _currentState.SelectionChanged += SelectionManager_SelectionChanged; SelectionManager_SelectionChanged(_currentState); return(_currentState); }
public ObjectSelectionModeCommand(ISelectable selectedItem, GeometrySelectionMode newMode) : this(newMode) { _selectedItem = selectedItem; }
public ObjectSelectionModeCommand(GeometrySelectionMode newMode) { _newMode = newMode; }