void OnSendStringServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Stopping ) { SendStringService.Service.KeySent -= OnKeySent; SendStringService.Service.StringSent -= OnStringSent; } if( e.Current == InternalRunningStatus.Starting ) { SendStringService.Service.KeySent += OnKeySent; SendStringService.Service.StringSent += OnStringSent; } }
void OnCommandTextualContextServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Stopping ) { CommandTextualContextService.Service.TextualContextClear -= OnTextualContextClear; } if( e.Current == InternalRunningStatus.Starting ) { CommandTextualContextService.Service.TextualContextClear += OnTextualContextClear; } }
private void OnPredictionAreaServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Stopping ) { PredictionTextAreaService.Service.TextSent -= OnPredictionAreaContentSent; PredictionTextAreaService.Service.PropertyChanged -= OnPredictionAreaServicePropertyChanged; } if( e.Current == InternalRunningStatus.Starting ) { PredictionTextAreaService.Service.TextSent += OnPredictionAreaContentSent; PredictionTextAreaService.Service.PropertyChanged += OnPredictionAreaServicePropertyChanged; } }
private void TextualContextService_ServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { OnPropertyChanged( "IsTextualContextServiceAvailable" ); }
void OnMouseDriverServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Stopped ) { MouseDriver.Service.PointerMove -= new PointerDeviceEventHandler( OnPointerMove ); } }
internal void SetStatusChanged( RunningStatus newOne, bool allowErrorTransition ) { Debug.Assert( _status.IsValidTransition( newOne, allowErrorTransition ) ); RunningStatus previous = _status; _status = newOne; ConfigureRawImplFromPlugin(); var h = ServiceStatusChanged; if( h != null ) { ServiceStatusChangedEventArgs ev = new ServiceStatusChangedEventArgs( previous, _status, allowErrorTransition ); h( this, ev ); } }
void OnTopMostServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { ForEachSkin( s => RegisterTopMostService( s ) ); } else if( e.Current == InternalRunningStatus.Stopping ) { ForEachSkin( s => UnregisterTopMostService( s ) ); } }
void HelpService_ServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { HelpService.Service.RegisterHelpContent( PluginId, typeof( KeyboardEditor ).Assembly.GetManifestResourceStream( "KeyboardEditor.Resources.helpcontent.zip" ) ); } }
void OnTopMostServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { TopMostService.Service.RegisterTopMostElement( "10", _autoClickWindow ); TopMostService.Service.RegisterTopMostElement( "200", _mouseIndicatorWindow ); } else if( e.Current == InternalRunningStatus.Stopping ) { TopMostService.Service.UnregisterTopMostElement( _autoClickWindow ); TopMostService.Service.UnregisterTopMostElement( _mouseIndicatorWindow ); } }
void OnFeatureServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Starting ) { Feature.PropertyChanged += OnFeaturePropertyChanged; } if( e.Current <= InternalRunningStatus.Stopping ) { Feature.PropertyChanged -= OnFeaturePropertyChanged; } }
void OnWordPredictorServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Stopping ) { WordPredictorService.Service.Words.CollectionChanged -= OnWordPredictedCollectionChanged; } if( e.Current == InternalRunningStatus.Starting ) { WordPredictorService.Service.Words.CollectionChanged += OnWordPredictedCollectionChanged; } }
void OnTopMostServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { foreach( var screen in _screens ) { TopMostService.Service.RegisterTopMostElement( "150", screen ); } } else if( e.Current == InternalRunningStatus.Stopping ) { foreach( var screen in _screens ) { TopMostService.Service.UnregisterTopMostElement( screen ); } } }
private void TextualContextService_ServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) _textualContext.Service.TextualContextChanged += TextualContext_PropertyChanged; else if( e.Current == InternalRunningStatus.Stopping ) _textualContext.Service.TextualContextChanged -= TextualContext_PropertyChanged; OnPropertyChanged( "IsTextualContextServiceAvailable" ); }
void OnTopMostServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { TopMostService.Service.RegisterTopMostElement( "200", _radar ); } else if( e.Current == InternalRunningStatus.Stopping ) { TopMostService.Service.UnregisterTopMostElement( _radar ); } }
void OnHighlighterServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { Parent.Highlighter.Service.BeginHighlight += OnBeginHighlight; Parent.Highlighter.Service.EndHighlight += OnEndHighlight; Parent.Highlighter.Service.SelectElement += OnSelectElement; } else if( e.Current == InternalRunningStatus.Stopping ) { Parent.Highlighter.Service.BeginHighlight -= OnBeginHighlight; Parent.Highlighter.Service.EndHighlight -= OnEndHighlight; Parent.Highlighter.Service.SelectElement -= OnSelectElement; } }
void OnWindowManagerStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { WindowManager.Service.RegisterWindow( "AutoClick", _autoClickWindow ); } else if( e.Current == InternalRunningStatus.Stopping ) { WindowManager.Service.UnregisterWindow( "AutoClick" ); } }
void OnHighlighterServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { RegisterHighlighter(); } else if( e.Current == InternalRunningStatus.Stopping ) { UnregisterHighlighter(); } }
void OnTopMostServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) TopMostService.Service.RegisterTopMostElement( "10", _clickSelectorWindow ); else if( e.Current == InternalRunningStatus.Stopping ) TopMostService.Service.UnregisterTopMostElement( _clickSelectorWindow ); }
void OnHighlighterServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { Debug.Assert( Dispatcher.CurrentDispatcher == NoFocusManager.ExternalDispatcher, "This method should only be called by the ExternalThread." ); if( e.Current == InternalRunningStatus.Started ) { if( _viewHidden == true ) { if( Highlighter.Status == InternalRunningStatus.Started ) { Highlighter.Service.RegisterTree( _miniViewVm.Name, R.MiniViewName, _miniViewVm ); } } else { ForEachSkin( s => RegisterHighlighter( s ) ); DirtyTemporaryPredictionInjectionInCurrentKeyboard(); } } else if( e.Current == InternalRunningStatus.Stopping ) { if( _viewHidden == true ) { if( Highlighter.Status == InternalRunningStatus.Started ) { Highlighter.Service.UnregisterTree( _miniViewVm.Name, _miniViewVm ); } } else { ForEachSkin( s => UnregisterFromHighlighter( s ) ); UnregisterPrediction(); } } }
void OnWindowManagerStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { WindowManager.Service.WindowMinimized += OnWindowMinimized; WindowManager.Service.WindowRestored += OnWindowRestored; WindowManager.Service.RegisterWindow( "ClickSelector", _clickSelectorWindow ); } else if( e.Current == InternalRunningStatus.Stopping ) { WindowManager.Service.UnregisterWindow( "ClickSelector" ); } else if( e.Current <= InternalRunningStatus.Stopped ) { WindowManager.Service.WindowMinimized -= OnWindowMinimized; WindowManager.Service.WindowRestored -= OnWindowRestored; } }
protected void WindowManager_ServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { if( e.Current == InternalRunningStatus.Started ) { RegisterWindowManager(); } else if( e.Current == InternalRunningStatus.Stopping ) { UnregisterWindowManager(); } }
void OnWordPredictorServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e ) { Debug.Assert( Dispatcher.CurrentDispatcher == NoFocusManager.Default.ExternalDispatcher, "This method should only be called by the ExternalThread." ); if( e.Current.IsStoppingOrStopped ) { WordPredictorService.Service.Words.CollectionChanged -= OnWordPredictedCollectionChanged; } else if( e.Current.IsStartingOrStarted ) { WordPredictorService.Service.Words.CollectionChanged += OnWordPredictedCollectionChanged; } }