private void DetailedView_OnClosed(object sender, EventArgs e)
 {
     detailedView.OnClosed    -= DetailedView_OnClosed;
     Settings.DetailedTrackerX = detailedView.Left;
     Settings.DetailedTrackerY = detailedView.Top;
     detailedView = null;
 }
        private void ToggleDetailedView()
        {
            if (detailedView == null)
            {
                detailedView = new DetailedView()
                {
                    Accuracy       = Settings.Accuracy,
                    ShowPercentage = Settings.ShowPercentage,
                    DarkTheme      = Settings.DarkTheme,
                };

                detailedView.Left = Settings.DetailedTrackerX;
                detailedView.Top  = Settings.DetailedTrackerY;

                detailedView.Show();

                detailedView.OnClosed          += DetailedView_OnClosed;
                detailedView.OnLocationChanged += DetailedView_OnLocationChanged;

                detailedView.GameProgress = progress;
            }
            else
            {
                detailedView.Close();
                detailedView = null;
            }
        }
 private void DetailedView_OnLocationChanged(object sender, EventArgs e)
 {
     if (sender.GetType() == typeof(DetailedView))
     {
         DetailedView d = (DetailedView)sender;
         Settings.DetailedTrackerX = d.Left;
         Settings.DetailedTrackerY = d.Top;
     }
 }
        public void Dispose()
        {
            state.OnReset -= _state_OnReset;
            state.OnStart -= _state_OnStart;

            tracker.OnGameProgressUpdated -= GameTracker_OnGameProgressUpdated;
            tracker.Quit();

            if (detailedView != null)
            {
                detailedView.Close();
                detailedView = null;
            }
        }