Exemplo n.º 1
0
 public MulluskForm()
 {
     InitializeComponent();
     button1AddMullusk.Enabled = false;
     locationGenerator         = new Random();
     aquarium = new Аquarium();
 }
Exemplo n.º 2
0
 public FishForm()
 {
     InitializeComponent();
     button1AddFish.Enabled = false;
     aquarium          = new Аquarium();
     locationGenerator = new Random();
 }
Exemplo n.º 3
0
        public AquariumForm()
        {
            randonGenerator = new Random();
            currentAquarium = new Аquarium();

            InitializeComponent();

            button1Stop.Enabled        = false;
            textBox1FishNumber.Text    = currentAquarium.FishCollection.Count().ToString();
            textBox2MolluskNumber.Text = currentAquarium.MolluskCollection.Count().ToString();
            MyTimer          = new Timer();
            MyTimer.Interval = (250); //(45 * 60 * 1000); // 45 mins
            MyTimer.Tick    += new EventHandler(MyTimer_Tick);
            //foreach (Animal animal in currentAquarium.AllAnimalsCollection)
            //{
            //    var aw = new AnimalWrapper(animal);
            //    animals.Add(aw);
            //    //PictureBox pb = new PictureBox();
            //    //pb.Location = new Point(animal.XPossition, animal.YPossition);
            //    //pb.Image = animal.Img;
            //    this.Controls.Add(aw.picBox);
            //}
        }