public MulluskForm() { InitializeComponent(); button1AddMullusk.Enabled = false; locationGenerator = new Random(); aquarium = new Аquarium(); }
public FishForm() { InitializeComponent(); button1AddFish.Enabled = false; aquarium = new Аquarium(); locationGenerator = new Random(); }
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); //} }