Exemple #1
0
        public void ChangeState(State state)
        {
            SelectionState = state;
            CurrentOperator.DeselectOperator();
            // ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault
            switch (SelectionState)
            {
            case State.Place:
                Binder.ChangeInteractionMode(PlacementString, Brushes.SeaGreen);
                CurrentOperator = Operators[0];
                break;

            case State.Remove:
                Binder.ChangeInteractionMode(RemoveString, Brushes.Brown);
                CurrentOperator = Operators[1];
                break;

            case State.Block:
                Binder.ChangeInteractionMode(BlockString, Brushes.Peru);
                CurrentOperator = Operators[2];
                break;
            }

            CurrentOperator.SelectOperator();
        }
Exemple #2
0
 public void CallDeselect() => CurrentOperator.DeselectOperator();