Esempio n. 1
0
        /// <summary>
        /// 构造函数.
        /// </summary>
        public Elevator(int maxFloor,  int minFloor)
        {
            // 设置最高、最低楼层.
            MaxFloor = maxFloor;
            MinFloor = minFloor;

            // 默认状态 = 待机.
            RunningStatus = ElevatorRunningStatus.Ready;

            // 初始情况下, 电梯处于  底楼状态.
            Status = new ElevatorStatusIsBottom()
            {
                 ElevatorData = this,
            };
        }
Esempio n. 2
0
        /// <summary>
        /// 构造函数.
        /// </summary>
        public Elevator(int maxFloor, int minFloor)
        {
            // 设置最高、最低楼层.
            MaxFloor = maxFloor;
            MinFloor = minFloor;

            // 默认状态 = 待机.
            RunningStatus = ElevatorRunningStatus.Ready;


            // 初始情况下, 电梯处于  底楼状态.
            Status = new ElevatorStatusIsBottom()
            {
                ElevatorData = this,
            };
        }