public void Dispose()
 {
     _queueWorker.Run = false;
     Debug.WriteLine($"ReportGenerationQueueManager: disposing of NotifyIcon (Thread '{Thread.CurrentThread.Name}')");
     _notifyIcon.Dispose();
     _notifyIcon = null;
 }
        public ReportGenerationQueueManager(IMatchManager matchManager)
        {
            _matchManager = matchManager;

            Debug.WriteLine($"ReportGenerationQueueManager: creating ReportGenerationNotifyIcon (Thread '{Thread.CurrentThread.Name}')");
            _notifyIcon = new ReportGenerationNotifyIcon();

            // AsyncOperation being created in the constructor gives us a way of letting code run on the UI (main) thread,
            // which is needed for NotifyIcon (& its BalloonTip) to generate click events
            _asyncOp     = AsyncOperationManager.CreateOperation(null);
            _queueWorker = new QueueWorker(this);
            Start();
        }