public GUIMain(StatTracker tracker) {
            InitializeComponent();
            m_tasks = new List<Task>();
            m_statTracker = tracker;
            m_overlay = null;
            m_cts = new CancellationTokenSource();

            // Load version.
            this.versionLabel.Text = GlobalVariables.PROGRAM_TITLE + " V " + GlobalVariables.VERSION_NUM;
            m_highColor = Color.FromArgb(0, 192, 0);
            m_lowColor = Color.Red;

            // Prevent X images showing up.
            ((DataGridViewImageColumn)this.eventLogGridView.Columns[0]).DefaultCellStyle.NullValue = null;
            ((DataGridViewImageColumn)this.eventLogGridView.Columns[4]).DefaultCellStyle.NullValue = null;
            // Handle mouse movement and resizing on borderless window.
            this.menuStrip1.MouseDown += OnMouseDown;
            this.onlineStatusImage.MouseDown += OnMouseDown;
            AddMouseEventDown(this);

            // Check for new updates. Even though this is not awaited it still allows other program operation to run.
            UpdateCheckManagement(false);
        }
 private void overlay_FormClosed(object sender, FormClosedEventArgs e)
 {
     m_overlay.Dispose();
     m_overlay = null;
 }
 private void startOverlayToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (m_overlay == null)
     {
         m_overlay = new GUIOverlay(m_statTracker);
         m_overlay.FormClosed += new FormClosedEventHandler(overlay_FormClosed);
         UpdateOverlay();
         m_overlay.Show(this);
     }
 }