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

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