{\r
public class ShipPanels\r
{\r
- private const int Width = 220;\r
+ private const int PanelWidth = 220;\r
\r
private readonly Panel _combined = new Panel\r
{\r
Location = new Point(0, 0),\r
- Size = new Size(Width, 113),\r
+ Size = new Size(PanelWidth, 113),\r
Visible = false\r
};\r
\r
private readonly Panel _7Ships = new Panel\r
{\r
Location = new Point(0, 0),\r
- Size = new Size(Width, 113),\r
+ Size = new Size(PanelWidth, 113),\r
Visible = false\r
};\r
\r
Cond = new ShipLabel.Cond(new Point(131, y), _lineHeight),\r
Level = new ShipLabel.Level(new Point(155, y + 2), LabelHeight),\r
Exp = new ShipLabel.Exp(new Point(176, y + 2), LabelHeight),\r
- BackGround = new Label {Location = new Point(0, y), Size = new Size(parent.Width, _lineHeight)}\r
+ BackGround = new Label {Location = new Point(0, y), Size = new Size(PanelWidth, _lineHeight)}\r
};\r
labels.Arrange(parent, CustomColors.ColumnColors.DarkFirst(i));\r
labels.SetClickHandler(onClick);\r
new Label {Location = new Point(128, Top), Text = "cond", AutoSize = true},\r
new Label {Location = new Point(162, Top), Text = "Lv", AutoSize = true},\r
new Label {Location = new Point(194, Top), Text = "Exp", AutoSize = true},\r
- new Label {Location = new Point(0, 1), Size = new Size(parent.Width, _lineHeight - 1)}\r
+ new Label {Location = new Point(0, 1), Size = new Size(PanelWidth, _lineHeight - 1)}\r
};\r
parent.Controls.AddRange(headings);\r
foreach (var control in headings)\r
\r
private const int Top = 1;\r
private const int LineHeight = 16;\r
- private const int ParentWidth = 220; // parent.Widthを使うとDPIスケーリング時に計算がくるうので\r
\r
public void Create(Control parent, HpToggle hpToggle, EventHandler onClick)\r
{\r
CreateHeader(parent, hpToggle);\r
for (var i = 0; i < _combinedLines.Length; i++)\r
{\r
- var x = ParentWidth / 2 * (i / ShipInfo.MemberCount);\r
+ var x = PanelWidth / 2 * (i / ShipInfo.MemberCount);\r
var y = Top + LineHeight * (i % ShipInfo.MemberCount + 1);\r
var labels = _combinedLines[i] = new ShipLabels\r
{\r
Name = new ShipLabel.Name(new Point(x + 2, y + 2), ShipNameWidth.Combined),\r
Hp = new ShipLabel.Hp(new Point(x + 88, y), LineHeight),\r
Cond = new ShipLabel.Cond(new Point(x + 85, y), LineHeight),\r
- BackGround = new Label {Location = new Point(x, y), Size = new Size(ParentWidth / 2, LineHeight)}\r
+ BackGround = new Label {Location = new Point(x, y), Size = new Size(PanelWidth / 2, LineHeight)}\r
};\r
labels.Arrange(parent, CustomColors.ColumnColors.DarkFirst(i));\r
labels.SetClickHandler(onClick);\r
new Label {Location = new Point(86, Top), Text = "cnd", AutoSize = true},\r
new Label {Location = new Point(177, Top), Text = "HP", AutoSize = true},\r
new Label {Location = new Point(195, Top), Text = "cnd", AutoSize = true},\r
- new Label {Location = new Point(0, 1), Size = new Size(ParentWidth, LineHeight - 1)}\r
+ new Label {Location = new Point(0, 1), Size = new Size(PanelWidth, LineHeight - 1)}\r
};\r
parent.Controls.AddRange(headings);\r
foreach (var control in headings)\r