private void PaintImage()
 {
     try
     {
         Bitmap   b = new Bitmap(Controller.ImageSize.Width, Controller.ImageSize.Height);
         Graphics g = Graphics.FromImage(b);
         g.Clear(Color.White);
         if (_count % 10 > 5)
         {
             g.DrawImage(Icon.Mouse2, new Point(Controller.ImageSize.Width - 28, 0));
         }
         else
         {
             g.DrawImage(Icon.Mouse, new Point(Controller.ImageSize.Width - 28, 0));
         }
         g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
         Font sFont = new Font("Arial", 7, FontStyle.Regular);
         g.DrawString("Clicks To Go: " + (_count <= 0 ? "No Clicks" : _count.ToString()), sFont, SystemBrushes.WindowText, 0, 0);
         g.DrawString("+1000", sFont, Brushes.Black, 2, 30);
         g.DrawString("+10000", sFont, Brushes.Black, 40, 30);
         g.DrawString("Stop", sFont, Brushes.Black, 87, 30);
         g.DrawString("Quit", sFont, Brushes.Black, 128, 30);
         g.Dispose();
         Controller.Render(b);
     }
     catch
     {
         // Do Nothing
     }
 }
Exemplo n.º 2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     try
     {
         if (picToLoad != null)
         {
             if (picToLoad.Image != null)
             {
                 Bitmap default_image = new Bitmap(picToLoad.Image);
                 LcdController.Render(default_image);
             }
             else
             {
                 LcdController.Render(new Bitmap(1, 1));
             }
         }
     }
     catch
     {
         // Do Nothing
     }
 }