Esempio n. 1
0
 public void Create(Control parent, ShipListPanels panels)
 {
     _toolTip = panels._toolTip;
     parent.SuspendLayout();
     CreateHeader(parent, panels._hpToggle);
     for (var i = 0; i < _combinedLines.Length; i++)
     {
         var x      = PanelWidth / 2 * (i / ShipInfo.MemberCount);
         var y      = Top + LineHeight * (i % ShipInfo.MemberCount + 1);
         var labels = _combinedLines[i] = new ShipLabels
         {
             Name       = new ShipLabel.Name(new Point(x + 2, y + 2), ShipNameWidth.Combined),
             Hp         = new ShipLabel.Hp(new Point(x + 88, y), LineHeight),
             Cond       = new ShipLabel.Cond(new Point(x + 85, y), LineHeight),
             BackGround = new Label {
                 Location = new Point(x, y), Size = new Size(PanelWidth / 2, LineHeight)
             }
         };
         labels.Arrange(parent, CustomColors.ColumnColors.DarkFirst(i));
         labels.SetClickHandler(panels._onClick);
         labels.SetTag(i);
         var hpLabel = _combinedLines[i].Hp;
         panels._hpToggle.AddHpLabel(hpLabel);
     }
     parent.ResumeLayout();
 }
Esempio n. 2
0
 public void Create(Control parent, ShipListPanels panels)
 {
     _toolTip = panels._toolTip;
     parent.SuspendLayout();
     _akashiTimerLabels.Create(parent);
     CreateHeader(parent, panels._hpToggle);
     for (var i = 0; i < _shipLines.Length; i++)
     {
         var y      = Top + _lineHeight * (i + 1);
         var labels = _shipLines[i] = new ShipLabels
         {
             Name       = new ShipLabel.Name(new Point(2, y + 2), ShipNameWidth.MainPanel),
             Hp         = new ShipLabel.Hp(new Point(129, y), _lineHeight),
             Cond       = new ShipLabel.Cond(new Point(131, y), _lineHeight),
             Level      = new ShipLabel.Level(new Point(155, y + 2), LabelHeight),
             Exp        = new ShipLabel.Exp(new Point(176, y + 2), LabelHeight),
             BackGround = new Label {
                 Location = new Point(0, y), Size = new Size(PanelWidth, _lineHeight)
             }
         };
         labels.Arrange(parent, CustomColors.ColumnColors.DarkFirst(i));
         labels.SetClickHandler(panels._onClick);
         labels.SetTag(i);
         panels._hpToggle.AddHpLabel(labels.Hp);
     }
     parent.ResumeLayout();
 }