Esempio n. 1
0
        protected override void PaintHook()
        {
            G.Clear(BackColor);
            Pen P1 = ConversionFunctions.ConvertToPen(Color.FromArgb(40, Color.White));
            Pen P2 = ConversionFunctions.ConvertToPen(Color.FromArgb(170, Color.Black));

            switch (vert)
            {
            case true:
                G.DrawLine(P1, Convert.ToInt32(this.Width / 2) - 1, 0, Convert.ToInt32(this.Width / 2) - 1, Height);
                G.DrawLine(P2, Convert.ToInt32(this.Width / 2), 0, Convert.ToInt32(this.Width / 2), Height);
                G.DrawLine(P1, Convert.ToInt32(this.Width / 2) + 1, 0, Convert.ToInt32(this.Width / 2) + 1, Height);
                break;

            case false:
                G.DrawLine(P1, 0, Convert.ToInt32(this.Height / 2) - 1, Width, Convert.ToInt32(this.Height / 2) - 1);
                G.DrawLine(P2, 0, Convert.ToInt32(this.Height / 2), Width, Convert.ToInt32(this.Height / 2));
                G.DrawLine(P1, 0, Convert.ToInt32(this.Height / 2) + 1, Width, Convert.ToInt32(this.Height / 2) + 1);
                break;

            default:
                break;
            }
        }