static void DrawGraphics()
{
x = rnd.Next(239);
width = rnd.Next(240 - x);
y = rnd.Next(319);
height = rnd.Next(320 - y);
c = rnd.Next(colors.Length - 1);
switch (index++ % 3)
{
case 0:
if (rnd.Next(10) > 5)
Graphics.DrawRectangle(x, y, width, height, colors[c]);
else Graphics.FillRectangle(x, y, width, height, colors[c]);
break;
case 1:
if (rnd.Next(10) > 5)
Graphics.DrawEllipse(x, y, width, height, colors[c]);
else Graphics.FillEllipse(x, y, width, height, colors[c]);
break;
case 2:
Graphics.DrawLine(x, y, rnd.Next(239), rnd.Next(319), colors[c]);
break;
}
Graphics.FillRectangle(0, 300, 240, 20, Color.White);
#
if STM3210E_EVAL
Graphics.DrawString(2, 303,
"Key - Back", Color.Black);
#
else Graphics.DrawString(2, 303,
"Select - Back", Color.Black);
#endif
}
static void DrawPicture()
{
if (++picIndex > 12) picIndex = 0;
AccessFlash.Read((
uint)(0x002A0000 + picIndex * 0xEA6C), 0xEA6C, picData);
if(StateIndex!= SystemState.Main) Graphics.DrawImage(20, 70, picData);
}