- var y = 3 + LineHeight * i;\r
- const int height = LabelHeight;\r
- var lbp = new Panel\r
- {\r
- Location = new Point(0, y - 2),\r
- Size = new Size(PanelWidth, LineHeight - 1),\r
- BackColor = ShipLabels.ColumnColors[(i + 1) % 2],\r
- Visible = false\r
- };\r
- lbp.Scale(ShipLabel.ScaleFactor);\r
- lbp.Tag = lbp.Location.Y;\r
- var labels = new[]\r
- {\r
- new ShipLabel {Location = new Point(126, 2), AutoSize = true, AnchorRight = true},\r
- new ShipLabel\r
- {\r
- Location = new Point(129, 2),\r
- Size = new Size(23, height),\r
- TextAlign = ContentAlignment.MiddleRight\r
- },\r
- new ShipLabel\r
- {\r
- Location = new Point(155, 2),\r
- Size = new Size(23, height),\r
- TextAlign = ContentAlignment.MiddleRight\r
- },\r
- new ShipLabel\r
- {\r
- Location = new Point(176, 2),\r
- Size = new Size(41, height),\r
- TextAlign = ContentAlignment.MiddleRight\r
- },\r
- new ShipLabel {Location = new Point(10, 2), AutoSize = true},\r
- new ShipLabel {Location = new Point(1, 2), AutoSize = true}\r
- };\r
- _labelList.Add(labels);\r
- _labelPanelList.Add(lbp);\r
-// ReSharper disable once CoVariantArrayConversion\r
- lbp.Controls.AddRange(labels);\r
- panelShipList.Controls.Add(lbp);\r
- foreach (var label in labels)\r
- {\r
- label.Scale();\r
- label.PresetColor =\r
- label.BackColor = ShipLabels.ColumnColors[(i + 1) % 2];\r
- }\r