Пример #1
0
 private void CreateLabel()
 {
     MyLabel lb;
     for (int i = 0; i < H; i++)
     {
         for (int j = 0; j < L; j++)
         {
             lb = new MyLabel();
             lb.x = i;
             lb.y = j;
             lb.Width = panel1.Width / L;
             lb.Height = panel1.Height / H;
             lb.BorderStyle = BorderStyle.FixedSingle;
             panel1.Controls.Add(lb);
             lb.Top = panel1.Height / H * i;
             lb.Left = panel1.Width / L * j;
             la[i, j] = lb;
         }
     }
 }
Пример #2
0
 private void CreateLable()
 {
     MyLabel l1;
     for (int i = 0; i < H; i++)
     {
         for (int j = 0; j < L; j++)
         {
             l1 = new MyLabel();
             l1.x = i;
             l1.y = j;
             l1.BackColor = Color.Blue;
             l1.BorderStyle = BorderStyle.FixedSingle;
             l1.Width = panel1.Width / L;
             l1.Height = panel1.Height / H;
             panel1.Controls.Add(l1);
             l1.Top = panel1.Height / H * i;
             l1.Left = panel1.Width / L * j;
             la[i, j] = l1;
         }
     }
 }
Пример #3
0
 public MyForm(MyLabel[,] lb, int H, int L)
 {
     la = lb;
     this.H = H;
     this.L = L;
     GetForm();
 }