示例#1
0
        internal void EventLabel(MainForm frm, Control parent, ref Point location, string caption, WorldObject data)
        {
            if (data == null)
            {
                return;
            }
            Label newlabel = new Label();

            newlabel.Parent    = parent;
            newlabel.Text      = caption;
            newlabel.Location  = new Point(location.X, location.Y);
            newlabel.BackColor = Color.Transparent;
            frm.EventDetailControls.Add(newlabel);
            newlabel.BringToFront();

            DFWV.Controls.LinkLabel newlinklabel = new DFWV.Controls.LinkLabel();
            newlinklabel.Parent    = parent;
            newlinklabel.Data      = data;
            newlinklabel.AutoSize  = true;
            newlinklabel.Location  = new Point(location.X + 75, location.Y);
            newlinklabel.BackColor = Color.Transparent;
            frm.EventDetailControls.Add(newlinklabel);
            newlinklabel.BringToFront();

            location.Y += 20;
        }
示例#2
0
        internal static void EventLabel(MainForm frm, Control parent, ref Point location, string caption, WorldObject data, string dataCaption = "")
        {
            if (data == null)
            {
                return;
            }
            var newlabel = new Label
            {
                Parent    = parent,
                Text      = caption,
                Location  = new Point(location.X, location.Y),
                BackColor = Color.Transparent
            };

            frm.EventDetailControls.Add(newlabel);
            newlabel.BringToFront();

            var newlinklabel = new LinkLabel
            {
                Parent    = parent,
                Data      = data,
                AutoSize  = true,
                Location  = new Point(location.X + 75, location.Y),
                BackColor = Color.Transparent
            };

            if (dataCaption != "")
            {
                newlinklabel.Text = dataCaption;
            }
            frm.EventDetailControls.Add(newlinklabel);
            newlinklabel.BringToFront();

            location.Y += 20;
        }