public void Dispose() { // 次回起動時に監視状態を維持するため監視状態を保存 AppSetting.Value.IsAccumulatingAtLastTime.Value = _isAccumulating; StopToAccumulateScore(); if (_scoreRepository != null) { _scoreRepository.Dispose(); _scoreRepository = null; } }