Exemple #1
0
 private void ShowDoor(ZoneDoor zd, int i)
 {
     if (zd != null)
     {
         UpdateCheckBox("cb_d{0}e", i, zd.Enabled);
         UpdateCheckBox("cb_d{0}s", i, zd.SwitchOn);
         UpdateCheckBox("cb_d{0}g", i, zd.GreenOn);
         UpdateCheckBox("cb_d{0}r", i, zd.RedOn);
     }
     else
     {
         UpdateCheckBox("cb_d{0}e", i, false);
         UpdateCheckBox("cb_d{0}s", i, false);
         UpdateCheckBox("cb_d{0}g", i, false);
         UpdateCheckBox("cb_d{0}r", i, false);
     }
 }
Exemple #2
0
 /// Get Zone by [index]
 public ZoneDoor DoorOf(int index)
 {
     if (index < 0) return null;
     if (Doors == null)
     {
         Doors = new List<ZoneDoor>();
     }
     foreach (ZoneDoor zd in Doors)
     {
         if (zd.Index == index)
         {
             return zd;
         }
     }
     ZoneDoor nd = new ZoneDoor()
     {
         Index = index
     };
     Doors.Add(nd);
     return nd;
 }