public void Init(int floorcount) { for (int i = 0; i < floorcount; i++) { var elevatorstat = new ElevatorStat(i); elevatorstat.SetEvent += Elevatorstat_SetEvent; Floors.Add(elevatorstat); } }
private void Elevatorstat_SetEvent(int arg1, int arg2, ElevatorStat arg3) { if (arg2 == 0)//down { up.Add(arg3); } else//up { down.Add(arg3); } }