Example #1
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     foreach (Control panel in flowLayoutPanel2.Controls)
     {
         DrawPanel drawPanel = panel as DrawPanel;
         if (drawPanel != null)
         {
             drawPanel.NextImage();
         }
     }
 }
        public void Initialize()
        {
            TXTDirectory.Text = Environment.CurrentDirectory + "\\data.txt";
            persons           = new List <person>();
            queue             = new List <person>();
            g = DrawPanel.CreateGraphics();
            g.Clear(Color.White);
            //draw queue
            g.DrawString("Queue", new Font(FontFamily.GenericSansSerif, 14f, FontStyle.Bold), MainPen.Brush, new PointF(380, 24));
            g.DrawRectangle(MainPen, new Rectangle(200, 50, 400, 100));

            //draw server
            g.DrawString("Server", new Font(FontFamily.GenericSansSerif, 14f, FontStyle.Bold), MainPen.Brush, new PointF(780, 290));
            g.DrawRectangle(MainPen, new Rectangle(700, 250, 200, 100));
        }