private void ListDraw() { try { tt.RemoveAll(); panList.Size = new Size(730, 0); panList.Location = new Point(0, 0); int y = 0; foreach (var it in TrainManager.Coachs) { CarriageList01 rl = new CarriageList01(it, this); rl.Location = new Point(0, y); panList.Controls.Add(rl); y += rl.Height; panList.Size = new Size(730, y); } if (panList.Controls.Count <= 2) { panListBack.AutoScroll = false; panListBack.Size = new Size(730, panListBack.Height); } else { panListBack.AutoScroll = true; panListBack.Size = new Size(750, panListBack.Height); } } catch (Exception ex) { RTCore.Environment.ReportError(ex, AccessManager.AccessKey); } }
public void SelectChange(CarriageList01 list) { try { foreach (var it in panList.Controls) { if (it is CarriageList01) { CarriageList01 l = (CarriageList01)it; l.isSelect = false; l.BackColor = Color.Transparent; } } } catch (Exception ex) { RTCore.Environment.ReportError(ex, AccessManager.AccessKey); } }