Ejemplo n.º 1
0
        public void CreateShipLabels(int i)
        {
            var       y      = ShipListPanel.LineHeight * i + 1;
            const int height = ShipListPanel.LabelHeight;
            var       labels = new ShipLabels
            {
                Fleet     = new ShipLabel.Fleet(new Point(1, 2)),
                Name      = new ShipLabel.Name(new Point(10, 2), ShipNameWidth.ShipList),
                Hp        = new ShipLabel.Hp(new Point(126, 0), ShipListPanel.LineHeight),
                Cond      = new ShipLabel.Cond(new Point(127, 0), ShipListPanel.LineHeight),
                Level     = new ShipLabel.Level(new Point(152, 2), height),
                Exp       = new ShipLabel.Exp(new Point(174, 2), height),
                BackPanel = new Panel
                {
                    Location = new Point(0, y),
                    Size     = new Size(ListForm.PanelWidth, ShipListPanel.LineHeight),
                    Anchor   = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top
                }
            };

            SetAnchorRight(labels.Hp, labels.Cond, labels.Level, labels.Exp);
            _labelList.Add(labels);
            labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i));
            labels.Scale();
            _shipListPanel.SetHpPercent(labels.Hp);
        }
Ejemplo n.º 2
0
        public void CreateLabels(int i)
        {
            var       y      = ShipListPanel.LineHeight * i + 1;
            const int height = ShipListPanel.LabelHeight;
            var       labels = new RepairLabels
            {
                Fleet = new ShipLabel.Fleet(new Point(1, 2)),
                Name  = new ShipLabel.Name(new Point(10, 2), ShipNameWidth.RepairListFull),
                Hp    = new ShipLabel.Hp(new Point(118, 0), ShipListPanel.LineHeight),
                Level = new ShipLabel.Level(new Point(116, 2), height),
                Time  = new ShipLabel.RepairTime(new Point(141, 2)),
                PerHp = new Label {
                    Location = new Point(185, 2), AutoSize = true
                },
                BackPanel = new Panel
                {
                    Location = new Point(0, y),
                    Size     = new Size(ListForm.PanelWidth, ShipListPanel.LineHeight),
                    Anchor   = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top
                }
            };

            SetAnchorRight(labels.Hp, labels.Level, labels.Time, labels.PerHp);
            _labelList.Add(labels);
            labels.Arrange(_shipListPanel, CustomColors.ColumnColors.BrightFirst(i));
            labels.Scale();
            _shipListPanel.SetHpPercent(labels.Hp);
        }