Camfight.Form1.RenderLog C# (CSharp) Method

RenderLog() public method

public RenderLog ( ) : void
return void
        public void RenderLog()
        {
            //background
            g = Graphics.FromImage(picShow);
            g.DrawImage(background, new Rectangle(0, 0, 640, 480));

            Font myfont = new Font("Arial Rounded MT Bold", 50.0f);
            PointF[] myp = new PointF[2] { new PointF(10, 10), new PointF(10, 150) };
            //draw text
            for (int i = 0; i < 2; i++)
            {
                if (logIndex == i)
                {
                    g.DrawString(log[i], myfont, Brushes.Red, myp[i]);
                }
                else
                {
                    g.DrawString(log[i], myfont, Brushes.Black, myp[i]);
                }
            }
            if (username != null)
                g.DrawString(username, myfont, Brushes.GreenYellow, new PointF(10, 80));
            if (password != null)
            {
                string show = "";
                for (int i = 0; i < password.Length; i++)
                {
                    show += "*";
                }
                g.DrawString(show, myfont, Brushes.GreenYellow, new PointF(10, 220));
            }

            gamebox.Image = picShow;
            gamebox.Refresh();
            gamebox.Show();
        }