private void Form1_Load(object sender, EventArgs e) { strPort = new Char[13]; strPortPoc = 0; labelChyba.Text = ""; poKazdeHodn = new TKlavesyRezie(button4); usercontrol = new UserControl1[usercontrol1max]; for (int i = 0; i < usercontrol1max; i++) { usercontrol[i] = new UserControl1(); usercontrol[i].Location = new Point(comboBox1.Location.X, 50 + i * 50); usercontrol[i].label1.Text += (i + 1).ToString() + ":"; usercontrol[i].Parent = groupBox1; } poNHodn = new UserControl2[usercontrol2max]; for (int i = 0; i < usercontrol2max; i++) { poNHodn[i] = new UserControl2(); poNHodn[i].Location = new Point(0, 148 + i * 55); poNHodn[i].Parent = groupBox3; } button1_Click(null, null); // nacte vsechny ostatní aplikace button3_Click(null, null); // nacte vsechny porty }
public TKlavesyRezie(TKlavesyRezie inKlavesy) { zpravy = new Message[pocZpr]; reset(); enabled = false; for (int i = 0; i < pocZpr; i++) { zpravy[i] = inKlavesy.getzprava(i); } }
public UserControl2() { InitializeComponent(); poNHodn = new TKlavesyRezie(button1); }