示例#1
0
 private void MoveBeeFromFieldToHive(BeeControl beeControl)
 {
     fieldForm.Controls.Remove(beeControl);
     beeControl.Size = new Size(20, 20);
     hiveForm.Controls.Add(beeControl);
     beeControl.BringToFront();
 }
示例#2
0
        private BeeControl GetBeeControl(Bee bee)
        {
            BeeControl beeControl;

            if (!beeLookup.ContainsKey(bee))
            {
                beeControl = new BeeControl()
                {
                    Width = 20, Height = 20
                };
                beeLookup.Add(bee, beeControl);
                hiveForm.Controls.Add(beeControl);
                beeControl.BringToFront();
            }
            else
            {
                beeControl = beeLookup[bee];
            }
            return(beeControl);
        }