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" );
 }
Esempio n. 5
0
 void OnMouseDriverServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Stopped )
     {
         MouseDriver.Service.PointerMove -= new PointerDeviceEventHandler( OnPointerMove );
     }
 }
Esempio n. 6
0
        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 ) );
     }
 }
Esempio n. 8
0
 void HelpService_ServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Started )
     {
         HelpService.Service.RegisterHelpContent( PluginId, typeof( KeyboardEditor ).Assembly.GetManifestResourceStream( "KeyboardEditor.Resources.helpcontent.zip" ) );
     }
 }
Esempio n. 9
0
 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;
     }
 }
Esempio n. 12
0
 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" );
 }
Esempio n. 14
0
 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 );
     }
 }
Esempio n. 15
0
 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;
     }
 }
Esempio n. 16
0
 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" );
     }
 }
Esempio n. 17
0
 void OnHighlighterServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Started )
     {
         RegisterHighlighter();
     }
     else if( e.Current == InternalRunningStatus.Stopping )
     {
         UnregisterHighlighter();
     }
 }
Esempio n. 18
0
 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 );
 }
Esempio n. 19
0
        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();
                }
            }
        }
Esempio n. 20
0
 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;
     }
 }