Esempio n. 1
0
 private void PaintElevators(Graphics g)
 {
     for (int i = 0; i < MyBuilding.ArrayOfAllElevators.Length; i++)
     {
         Elevator ElevatorToPaint = MyBuilding.ArrayOfAllElevators[i];
         g.DrawImage(ElevatorToPaint.GetCurrentFrame(), ElevatorToPaint.GetElevatorXPosition(), ElevatorToPaint.GetElevatorYPosition(), 54, 90);
     }
 }
Esempio n. 2
0
        private void GetInToTheElevator(Elevator ElevatorToGetIn)
        {
            //Rise an event
            ElevatorToGetIn.OnPassengerEnteredTheElevator(new PassengerEventArgs(this));

            //Unsubscribe from an event for current floor
            this.currentFloor.ElevatorHasArrivedOrIsNotFullAnymore -= this.Passenger_ElevatorHasArrivedOrIsNoteFullAnymore;

            //Move the picture on the UI
            this.MovePassengersGraphicHorizontally(ElevatorToGetIn.GetElevatorXPosition());

            //Make PassengerControl invisible
            this.visible = false;

            //Update myElevator
            this.myElevator = ElevatorToGetIn;
        }
Esempio n. 3
0
        private void GetInToTheElevator(Elevator ElevatorToGetIn)
        {
            //Rise an event
            ElevatorToGetIn.OnPassengerEnteredTheElevator(new PassengerEventArgs(this));

            //Unsubscribe from an event for current floor
            this.currentFloor.ElevatorHasArrivedOrIsNotFullAnymore -= this.Passenger_ElevatorHasArrivedOrIsNoteFullAnymore;

            //Move the picture on the UI
            this.MovePassengersGraphicHorizontally(ElevatorToGetIn.GetElevatorXPosition());

            //Make PassengerControl invisible
            this.visible = false;

            //Update myElevator
            this.myElevator = ElevatorToGetIn;
        }