Example #1
0
        public void Dispose()
        {
            _viewProvider = null;
            _timer.Tick  -= OnTimerTick;
            _autoExitDispatcherTimer.Tick -= OnAutoExitTimerEvent;
            _timer.Stop();
            _autoExitDispatcherTimer.Stop();

            GC.SuppressFinalize(this);
        }
Example #2
0
 public CocoJumperLogic(IWpfViewProvider renderer, CocoJumperCommandPackage package)
 {
     _state       = CocoJumperState.Inactive;
     _searchLimit = package.LimitResults;
     _disableMultiSearchHighlight        = package.DisableHighlightForMultiSearch;
     _disableSingleSearchHighlight       = package.DisableHighlightForSingleSearch;
     _disableSingleSearchSelectHighlight = package.DisableHighlightForSingleHighlight;
     _jumpAfterChosenElement             = package.JumpAfterChosenElement;
     _timer = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(package.TimerInterval)
     };
     _autoExitDispatcherTimer = new DispatcherTimer {
         Interval = TimeSpan.FromMilliseconds(package.AutomaticallyExitInterval)
     };
     _autoExitDispatcherTimer.Tick += OnAutoExitTimerEvent;
     _timer.Tick   += OnTimerTick;
     _searchResults = new List <SearchResult>();
     _viewProvider  = renderer;
 }