예제 #1
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            MagicImage      LImage = new PacMan();
            MagicBackground LBack  = new TextBackground(LImage.ImageHeight, 10);

            FGenerator = new TextGenerator(LImage, LBack);

            FTimer          = new ObjectTimer(this);
            FTimer.Interval = 33;
//			FTimer.Interval = 100;
            FTimer.Tick += new EventHandler(UpdateData);

            MagicImage      LSampleImage = new PictureGrabber(this.pictureBox1.Image, 5);
            MagicBackground LBackground  = new TextBackground(LSampleImage.ImageHeight, 10);
            TextGenerator   LGenerator   = new TextGenerator(LSampleImage, LBackground);

//			this.Box.Text = FGenerator.GetIntro() + "\r\n"
            this.Box.Text += LGenerator.GetStereogram();

//			UpdateData(FTimer,null);
            this.Box.Select(0, 0);
//			FTimer.Start();

            this.Width  = (int)(FGenerator.Width * (this.Box.Font.Size * 0.75 + 1) + 15);
            this.Height = (int)(FGenerator.Height * (this.Box.Font.Size * 1.25 + 1) + 40);
        }
예제 #2
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();


            MagicImage      LImage      = new PictureGrabber(PilgrimImg.Image, 50);
            MagicBackground LBackground = new ImageBackground(LImage.ImageHeight, 100);

            this.FGenerator = new ImageGenerator(LImage, LBackground);


            this.pictureBox1.Image = ((ImageGenerator)FGenerator).GetStereogram();



            FTimer          = new ObjectTimer(this);
            FTimer.Interval = 33;
            //			FTimer.Interval = 100;
            FTimer.Tick += new EventHandler(UpdateData);

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }