//初始化函数 public OS(Elevator[] ElevatorForm, ElevatorSchedule thisOutForm) { //TCB初始化 InForm = ElevatorForm; OutForm = thisOutForm; for (int i = 0; i < 5; i++) { //修改一下窗口的拥有者 ReadyTCB[i] = new TCB(i, OutForm); InForm[i].ithelevator = ReadyTCB[i]; ReadyTCB[i].InForm = InForm[i]; } }
public TCB(int id, ElevatorSchedule form1) { Tid = id; prior = 1000; begin = 1; end = 1; //floor = 1; status = Status.free; //order = Order.free; for (int i = 0; i < 21; i++) { TaskList[i] = 0; OutTask[i] = Order.free; } OutForm = form1; //InForm = form2; }