예제 #1
0
        private void AddCustomSurnameRow(SignItem item, int rowIdx)
        {
            if (this.Disposing)
            {
                return;
            }
            var pn = new TableLayoutPanel {
                AutoSize = true, ColumnCount = 3, Margin = new Padding(0)
            };

            var hll = new HoverLinkLabel(TopLevelForm);

            SetLabelProperties(hll, item.FIO);
            hll.Caption = string.Format("№{0} {1}", item.Employee, hll.Text);
            hll.Url     = Environment.UsersURL + item.Employee;
            pn.Controls.Add(hll, 2, 0);

            var lb = new Label();

            SetLabelProperties(lb, "/");
            lb.TextAlign = ContentAlignment.MiddleCenter;
            lb.Margin    = new Padding(0);
            pn.Controls.Add(lb, 1, 0);

            var hll4 = new HoverLinkLabel(TopLevelForm);

            SetLabelProperties(hll4, item.FIO4);
            hll4.Margin  = new Padding(hll.Margin.Left, 0, 0, 0);
            hll4.Caption = string.Format("№{0} {1}", item.Employee4, hll4.Text);
            hll4.Url     = Environment.UsersURL + item.Employee4;
            pn.Controls.Add(hll4, 0, 0);

            tableLayoutPanel.Controls.Add(pn, SURNAME_COLUMN_IDX, rowIdx);
        }
예제 #2
0
        private void AddSimpleSurnameRow(SignItem item, int rowIdx)
        {
            if (this.Disposing)
            {
                return;
            }
            var hll = new HoverLinkLabel(TopLevelForm);

            SetLabelProperties(hll, item.FIO);
            hll.Caption = string.Format("№{0} {1}", item.Employee, hll.Text);
            hll.Url     = Environment.UsersURL + item.Employee;
            tableLayoutPanel.Controls.Add(hll, SURNAME_COLUMN_IDX, rowIdx);
        }