コード例 #1
0
 private void DetailedView_OnClosed(object sender, EventArgs e)
 {
     detailedView.OnClosed    -= DetailedView_OnClosed;
     Settings.DetailedTrackerX = detailedView.Left;
     Settings.DetailedTrackerY = detailedView.Top;
     detailedView = null;
 }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 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;
     }
 }
コード例 #4
0
        public void Dispose()
        {
            state.OnReset -= _state_OnReset;
            state.OnStart -= _state_OnStart;

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

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