Example #1
0
File: Form1.cs Project: MJViks/FSM
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Random rnd = new Random();

            CheckBox ch = new CheckBox();

            ch.AutoSize = true;
            ch.Location = new System.Drawing.Point(rnd.Next(20, Width), rnd.Next(20, Height));
            ch.Size     = new System.Drawing.Size(15, 14);
            ch.TabIndex = 1;
            ch.UseVisualStyleBackColor = true;
            ch.MouseDown += new MouseEventHandler(this.ChLeaf_MouseDown);

            Controls.Add(ch);
            Ant.Leafs = Ant.GetAllLeafs <CheckBox>(Controls);
        }
Example #2
0
File: Form1.cs Project: MJViks/FSM
 public Form1()
 {
     InitializeComponent();
     Ant.Leafs = Ant.GetAllLeafs <CheckBox>(Controls);
 }