Esempio n. 1
0
        public static void Init(PictureBox _pb)
        {
            IDrawer stdDrawer        = new DrawerStandart(_pb);
            IDrawer testDrawer       = new DrawerDebug(_pb);
            IDrawer interstingDrawer = new DrawerInteresting(_pb);

            m_pBox = _pb;


            m_factory2 = new ParticleFactoryStandart(_pb.Width, _pb.Height, stdDrawer);

            m_tstFactory = new ParticleFactoryInteresting(_pb.Width, _pb.Height, interstingDrawer);


            var borderOfArea = new BorderBounce(new List <PairDouble>
            {
                new PairDouble(0, 0),
                new PairDouble(0, _pb.Height),
                new PairDouble(_pb.Width, _pb.Height),
                new PairDouble(_pb.Width, 0)
            });

            m_box = new ParticleBox(m_factory2, Miscelaneous.ParticleCount, stdDrawer, borderOfArea);

            Run(m_box);
        }
Esempio n. 2
0
        public static void Init(PictureBox _pb)
        {
            IDrawer stdDrawer = new DrawerStandart(_pb);
            IDrawer testDrawer = new DrawerDebug(_pb);
            IDrawer interstingDrawer = new DrawerInteresting(_pb);
            m_pBox = _pb;


            m_factory2 = new ParticleFactoryStandart(_pb.Width, _pb.Height, stdDrawer);

            m_tstFactory = new ParticleFactoryInteresting(_pb.Width, _pb.Height, interstingDrawer);


            var borderOfArea = new BorderBounce(new List<PairDouble>
                                            {
                                                new PairDouble(0, 0),
                                                new PairDouble(0, _pb.Height),
                                                new PairDouble(_pb.Width, _pb.Height),
                                                new PairDouble(_pb.Width, 0)
                                            });

            m_box = new ParticleBox(m_factory2, Miscelaneous.ParticleCount, stdDrawer, borderOfArea);

            Run(m_box);
        }