Esempio n. 1
0
        private void create_labels()
        {
            var x      = board_dispaly.Size.Width - 10;
            var y      = board_dispaly.Size.Height;
            var width  = x / current_job.Bibx;
            var height = y / current_job.Biby;

            for (int i = 0; i < current_job.Biby; i++)             //column
            {
                for (int j = 0; j < current_job.Bibx; j++)         //row
                {
                    int dut_num = (i * current_job.Bibx) + j + 1;
                    //build the DUT thing in here
                    colorLabel label = new colorLabel();
                    board_dispaly.Controls.Add(label);                     //add the label
                    labels[dut_num - 1] = label;

                    label.TextAlign   = ContentAlignment.TopCenter;
                    label.Location    = new Point(j * width, (i * height) + 1);                  //calculated height based on loop position
                    label.BorderStyle = BorderStyle.Fixed3D;
                    label.Size        = new Size(width - 3, height - 2);

                    edit_label_text("S" + dut_num, dut_num - 1);

                    //label.Anchor = ((AnchorStyles.Top | AnchorStyles.Left));// | AnchorStyles.Right | AnchorStyles.Left);
                    //label.AutoSize = true;
                    label.Dock = DockStyle.None;

                    create_tooltip(label, dut_num - 1);                     //create it so we can index it
                }
            }
            create_finger(x, y);             //draws gold line for finger
        }
Esempio n. 2
0
        private void create_tooltip(colorLabel label, int index)
        {
            ToolTip tip = new ToolTip();

            tip.ToolTipTitle = "Unlogged Items";
            tip.SetToolTip(label, "");
            tip.AutomaticDelay = 250;
            tip.AutoPopDelay   = 30000;
            tips[index]        = tip;
            //return tip;
        }