Exemple #1
0
        public Form1()
        {
            InitializeComponent();
            g = panel1.CreateGraphics();

            bwutw = new Bitmap(panel1.Width, panel1.Height);

            panel1.Paint += panel1_Paint;

            glob = new Glob(panel1.Width, panel1.Height, this);
            lst = new List<IAgent>();

            this.Resize += Form1_Resize;

            this.Activated += raiseFlag;
            this.Deactivate += lowerFlag;

            panel1.MouseClick += Form1_MouseEnter;

            colorByGeck();
        }
Exemple #2
0
        private void resetGlob()
        {
            if (fpt != null) fpt.stop();
            keepMoving = false;
            if(moverThread != null)
                while (moverThread.IsAlive) { } // spin

            glob = null;
            glob = new Glob(panel1.Width, panel1.Height, this);

            lst = null;
            lst = new List<IAgent>();

            bwutw = new Bitmap(glob.x, glob.y);

            repaint();
        }