Ejemplo n.º 1
0
        private void Movement_OnMovingEnd(object sender, StepLever e)
        {
            if (IsMoving)
            {
                return;
            }

            if (scriptPosition.LeverType != e.Lever)
            {
                throw new Exception("Ошибка создания сценария");
            }

            scriptPosition.To = movement.GetLeverPosition(e.Lever);
            leverPositions.Add(scriptPosition);

            OnPathChanged(this, EventArgs.Empty);

            scriptPosition = null;
        }
 private void SetCurrentPositionOnView()
 {
     view.SetCurrentPosition(new LeverPosition(LeverType.Horizontal, movement.GetLeverPosition(LeverType.Horizontal)));
     view.SetCurrentPosition(new LeverPosition(LeverType.Lever1, movement.GetLeverPosition(LeverType.Lever1)));
     view.SetCurrentPosition(new LeverPosition(LeverType.Lever2, movement.GetLeverPosition(LeverType.Lever2)));
 }