Exemple #1
0
        public void Start()
        {
            if (t == null || !t.IsAlive)
            {
                ThreadStart th = new ThreadStart(Animate);
                t = new Thread(th);
                t.Start();
            }
            var rect = new Rectangle(0, 0, width, heigth);

            Drop d = new Drop(rect);

            d.Start();
            Monitor.Enter(drops);
            drops.Add(d);
            Monitor.Exit(drops);
        }
Exemple #2
0
        public void Start()
        {
            if (t == null || !t.IsAlive)
            {
                ThreadStart th = new ThreadStart(Animate);
                t = new Thread(th);
                t.Start();
            }
            var rect = new Rectangle(0, 0, width, heigth);

            Drop d = new Drop(rect);

            d.Start();
            Monitor.Enter(drops);
            drops.Add(d);
            Drop.Count++;
            Monitor.Exit(drops);
            if (Program.bucket && buc == null)
            {
                buc = new Bucket(rect);
            }
        }