예제 #1
0
 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;
     }
 }
예제 #2
0
 void OnCommandTextualContextServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Stopping )
     {
         CommandTextualContextService.Service.TextualContextClear -= OnTextualContextClear;
     }
     if( e.Current == InternalRunningStatus.Starting )
     {
         CommandTextualContextService.Service.TextualContextClear += OnTextualContextClear;
     }
 }
예제 #3
0
 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" );
 }
예제 #5
0
 void OnMouseDriverServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Stopped )
     {
         MouseDriver.Service.PointerMove -= new PointerDeviceEventHandler( OnPointerMove );
     }
 }
예제 #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 );
			}
		}
예제 #7
0
 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 ) );
     }
 }
예제 #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" ) );
     }
 }
예제 #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 );
     }
 }
예제 #10
0
 void OnFeatureServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Starting )
     {
         Feature.PropertyChanged += OnFeaturePropertyChanged;
     }
     if( e.Current <= InternalRunningStatus.Stopping )
     {
         Feature.PropertyChanged -= OnFeaturePropertyChanged;
     }
 }
예제 #11
0
 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;
     }
 }
예제 #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" );
 }
예제 #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 );
     }
 }
예제 #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;
     }
 }
예제 #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" );
     }
 }
예제 #17
0
 void OnHighlighterServiceStatusChanged( object sender, ServiceStatusChangedEventArgs e )
 {
     if( e.Current == InternalRunningStatus.Started )
     {
         RegisterHighlighter();
     }
     else if( e.Current == InternalRunningStatus.Stopping )
     {
         UnregisterHighlighter();
     }
 }
예제 #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 );
 }
예제 #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();
                }
            }
        }
예제 #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;
     }
 }