Beispiel #1
0
        private void CreateLabels(int i)
        {
            var y      = 1 + LineHeight * i;
            var labels = new FleetLabels
            {
                Fleet = new Label {
                    Location = new Point(1, 2), AutoSize = true
                },
                Name  = new ShipLabel.Name(new Point(10, 2), ShipNameWidth.Max),
                Equip = new Label {
                    Location = new Point(38, 2), AutoSize = true, Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top
                },
                EquipColor = new Label {
                    Location = new Point(35, 2), Size = new Size(4, LabelHeight - 2)
                },
                Spec = new GrowLeftLabel {
                    Location = new Point(217, 2), GrowLeft = true, Anchor = AnchorStyles.Right | AnchorStyles.Top
                },
                BackPanel = new Panel
                {
                    Location  = new Point(0, y),
                    Size      = new Size(ListForm.PanelWidth, LineHeight),
                    BackColor = CustomColors.ColumnColors.BrightFirst(i)
                }
            };

            _labelList.Add(labels);
            labels.Fleet.DoubleClick += (obj, ev) => { Clipboard.SetText((string)labels.Fleet.Tag); };
            labels.Arrange(this, CustomColors.ColumnColors.BrightFirst(i));
            labels.Scale();
            labels.Move(AutoScrollPosition);
        }
Beispiel #2
0
 private void buttonCopyToClipboard_Click(object sender, EventArgs e)
 {
     Clipboard.SetText(textBoxDetails.Text);
 }