RealtimeAnalysis.FormPRM.pictureBoxTMS_Paint C# (CSharp) Method

pictureBoxTMS_Paint() private method

private pictureBoxTMS_Paint ( object sender, PaintEventArgs e ) : void
sender object
e PaintEventArgs
return void
        void pictureBoxTMS_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;

            string component = "TMS Component";
            Font fontComp = new Font(FontFamily.GenericSansSerif, 12);
            SizeF sizeComp = e.Graphics.MeasureString(component, fontComp);
            PointF locationComp = new PointF();
            locationComp.X = (pictureBoxTMS.Width - sizeComp.Width) / 2;
            locationComp.Y = (pictureBoxTMS.Height - sizeComp.Height) / 10;
            e.Graphics.DrawString(component, fontComp, Brushes.Black, locationComp);

            string title = "TMS Periodic Tasks";
            Font titleFont = new Font(this.Font, FontStyle.Bold);
            SizeF titleSize = e.Graphics.MeasureString(title, titleFont);
            PointF titleLocation = new PointF();
            titleLocation.X = (pictureBoxTMS.Width / 2) - (titleSize.Width / 2);
            titleLocation.Y = (pictureBoxTMS.Height / 2) - (titleSize.Height);
            e.Graphics.DrawString(title, titleFont, Brushes.Black, titleLocation);

            string pi = "Period (Π)";
            SizeF piSize = e.Graphics.MeasureString(pi, Font);
            PointF piLocation = new PointF();
            piLocation.X = textBoxTmsPi.Location.X - piSize.Width - 8;
            piLocation.Y = textBoxTmsPi.Location.Y + (piSize.Height / 4);
            e.Graphics.DrawString(pi, Font, Brushes.Black, piLocation);

            string theta = "Execution (Θ)";
            SizeF thetaSize = e.Graphics.MeasureString(theta, Font);
            PointF thetaLocation = new PointF();
            thetaLocation.X = textBoxTmsTheta.Location.X - thetaSize.Width - 8;
            thetaLocation.Y = textBoxTmsTheta.Location.Y + (thetaSize.Height / 4);
            e.Graphics.DrawString(theta, Font, Brushes.Black, thetaLocation);
        }
        void pictureBoxEMS_Paint(object sender, PaintEventArgs e)