示例#1
0
文件: Form1.cs 项目: 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);
        }
示例#2
0
文件: Form1.cs 项目: MJViks/FSM
 public Form1()
 {
     InitializeComponent();
     Ant.Leafs = Ant.GetAllLeafs <CheckBox>(Controls);
 }