private void BCMainForm_FormClosed(object sender, FormClosedEventArgs e) { AEQPT fourColorLight = bcApp.SCApplication.getEQObjCacheManager().getEquipmentByEQPTID("ColorLight"); if (fourColorLight != null) { fourColorLight.setColorLight(false, false, false, false, false, true); } AEQPT trafficLight1 = bcApp.SCApplication.getEQObjCacheManager().getEquipmentByEQPTID("TrafficLight1"); if (trafficLight1 != null) { trafficLight1.setTrafficLight(false, true, false, false, false, true); } AEQPT trafficLight2 = bcApp.SCApplication.getEQObjCacheManager().getEquipmentByEQPTID("TrafficLight2"); if (trafficLight2 != null) { trafficLight2.setTrafficLight(false, true, false, false, false, true); } //bcApp.SCApplication.getEQObjCacheManager().getEquipmentByEQPTID("Fire"); List <AUNIT> units = bcApp.SCApplication.getEQObjCacheManager().getAllUnit(); foreach (AUNIT unit in units) { if (unit.UNIT_ID.StartsWith("FireDoor")) { FireDoorDefaultValueDefMapAction mapAction = unit.getMapActionByIdentityKey(nameof(FireDoorDefaultValueDefMapAction)) as FireDoorDefaultValueDefMapAction; mapAction.sendFireDoorCrossSignal(true); } } System.Environment.Exit(0); }
private void BCMainForm_FormClosed(object sender, FormClosedEventArgs e) { //bcApp.SCApplication.getEQObjCacheManager().getEquipmentByEQPTID("Fire"); List <AUNIT> units = bcApp.SCApplication.getEQObjCacheManager().getAllUnit(); foreach (AUNIT unit in units) { if (unit.UNIT_ID.StartsWith("FireDoor")) { FireDoorDefaultValueDefMapAction mapAction = unit.getMapActionByIdentityKey(nameof(FireDoorDefaultValueDefMapAction)) as FireDoorDefaultValueDefMapAction; mapAction.sendFireDoorCrossSignal(true); } } System.Environment.Exit(0); }
public void section_unreserved(string section_id) { lock (reserve_section_id_dic_lock) { if (reserve_section_id_List.Contains(section_id)) { reserve_section_id_List.Remove(section_id); } else { } if (reserve_section_id_List.Count == 0)//沒有被預約Section時,滅掉CrossSignal。 { FireDoorDefaultValueDefMapAction mapAction = getMapActionByIdentityKey(nameof(FireDoorDefaultValueDefMapAction)) as FireDoorDefaultValueDefMapAction; mapAction.sendFireDoorCrossSignal(false); } } }
public void section_reserved(string section_id) { lock (reserve_section_id_dic_lock) { if (!reserve_section_id_List.Contains(section_id)) { reserve_section_id_List.Add(section_id); } else { } if (reserve_section_id_List.Count == 1)//剛好被預約一個Section時,發送CrossSignal。 { FireDoorDefaultValueDefMapAction mapAction = getMapActionByIdentityKey(nameof(FireDoorDefaultValueDefMapAction)) as FireDoorDefaultValueDefMapAction; mapAction.sendFireDoorCrossSignal(true); } } }