public void FreezeVerse()
 {
     if (this.mode == projection.Modes.Freeze)
     {
         this.NormalVerse();
     }
     else
     {
         projection projection = this;
         using (Bitmap bmp = new Bitmap(projection.Width, projection.Height))
         {
             this.DrawBitmap(bmp, new Rectangle(0, 0, bmp.Width, bmp.Height));
             using (Image image1 = (Image)bmp)
             {
                 Image image2 = (Image) new Bitmap(image1.Width, image1.Height, PixelFormat.Format32bppArgb);
                 using (Graphics graphics = Graphics.FromImage(image2))
                     graphics.DrawImage(image1, 0, 0);
                 this.freezePic.Image = image2;
             }
         }
         this.freezePic.Visible = true;
         this.mode = projection.Modes.Freeze;
         this.SetPreviewImage();
     }
 }
 public void NormalVerse()
 {
     if (this.mode == projection.Modes.Normal)
     {
         return;
     }
     this.lblTitle.Visible  = this.lblContent.Visible = true;
     this.freezePic.Visible = false;
     this.mode = projection.Modes.Normal;
     this.SetPreviewImage();
 }
        private void projection_Load(object sender, EventArgs e)
        {
            this.pictureBox1.Image = Image.FromFile("bg.png");
            this.mode          = projection.Modes.Normal;
            this.lblTitle.Text = this.title;
            this.BoundToImage(this.lblTitle);
            this.BoundToImage(this.lblContent);
            this.lblTitle.Location   = new Point(this.Width / 2 - this.lblTitle.Size.Width / 2, this.lblTitle.Location.Y);
            this.lblContent.Location = new Point(this.Width / 2 - this.lblContent.Size.Width / 2, this.lblContent.Location.Y);
            Rectangle rectangle = new Rectangle(new Point(0, 0), new Size(this.Size.Width - 5, this.Size.Height - this.lblTitle.Size.Height - 15));

            this.lblContent.Location = rectangle.Location;
            this.lblContent.Size     = rectangle.Size;
            this.lblTitle.Visible    = false;
            this.lblTitle.Text       = "";
        }
 public void WhiteScreen()
 {
     if (this.mode == projection.Modes.White)
     {
         this.NormalVerse();
     }
     else
     {
         Bitmap bitmap = new Bitmap(this.Width, this.Height);
         Graphics.FromImage((Image)bitmap).FillRectangle(Brushes.White, new Rectangle(0, 0, this.Width, this.Height));
         this.freezePic.Image   = (Image)bitmap;
         this.freezePic.Visible = true;
         this.mode = projection.Modes.White;
         this.SetPreviewImage();
     }
 }