CTCOfficeGUI.TrackBlockGraphic.TrackBlockGraphic C# (CSharp) Method

TrackBlockGraphic() public method

Primary constructor for the track block graphic class
public TrackBlockGraphic ( TrackBlock block, double scale ) : System
block TrackBlock Track block object this graphic represents
scale double Scaling constant for the screen
return System
        public TrackBlockGraphic(TrackBlock block, double scale)
        {
            this.SuspendLayout();

            InitializeComponent();

            //Need this crap to make it transparent
            this.DoubleBuffered = true;
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            SetStyle(ControlStyles.UserPaint, true);

            RedColor = Color.Red;
            YellowColor = Color.Yellow;
            GreenColor = Color.Green;
            SuperGreenColor = Color.Green;

            LineThickness = 5;
            ArrowLength = 5;

            Block = block;

            m_currentColor = GetDrawColor();

            SetScale(scale);
            CalculateArrowPoints();
            this.BackColor = Color.Transparent;

            this.ResumeLayout();
        }