Event argument when the current keyboard changed. Gives access to the previous keyboard.
Inheritance: KeyboardContextEventArgs
Esempio n. 1
0
 void OnCurrentChanged( object sender, CurrentKeyboardChangedEventArgs e )
 {
     OnPropertyChanged( "Current" );
 }
 void OnCurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
 {
     if( e.Current != null ) ChangeActiveCurrentKeyboardStatus( true );
 }
Esempio n. 3
0
 /// <summary>
 /// Called when the current keyboard changed.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void CurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
 {
     if( e.Previous != null )
         UnRegistersOnKeyboard( e.Previous );
     if( e.Current != null )
         RegistersOnKeyboard( e.Current );
 }
Esempio n. 4
0
        void OnCurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
        {
            InitializeHighligther();

            if( Highlighter.Status == InternalRunningStatus.Started )
            {
                Highlighter.Service.RegisterTree( _ctxVm.KeyboardVM );
            }

            if( e.Current != null && _skinWindow != null )
            {
                if( Config.User[PlacementString] != null )
                {
                    WINDOWPLACEMENT placement = (WINDOWPLACEMENT)Config.User[PlacementString];
                    if( _viewHidden ) placement.showCmd = 0;
                    else placement.showCmd = 8; //Show without taking focus

                    _skinDispatcher.BeginInvoke( (Action)( () => CKWindowTools.SetPlacement( _skinWindow.Hwnd, placement ) ), null );
                }
                else
                {
                    int w;
                    int h;
                    var viewPortSize = Config[_ctxVm.KeyboardContext.CurrentKeyboard.CurrentLayout]["ViewPortSize"];
                    if( viewPortSize != null )
                    {
                        Size size = (Size)viewPortSize;
                        w = (int)size.Width;
                        h = (int)size.Height;
                    }
                    else
                    {
                        w = _ctxVm.KeyboardVM.W;
                        h = _ctxVm.KeyboardVM.H;
                    }

                    _skinDispatcher.BeginInvoke( (Action)( () => SetDefaultWindowPosition( w, h ) ), null );
                }
            }
        }
 void OnCurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
 {
     Feature.PredictionContextFactory.CreatePredictionZone( e.Current, Feature.MaxSuggestedWords );
 }
Esempio n. 6
0
        void OnCurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
        {
            if( e.Previous != null ) e.Previous.CurrentLayoutChanged -= new EventHandler<KeyboardCurrentLayoutChangedEventArgs>( OnCurrentLayoutChanged );
            if( e.Current != null )
            {
                e.Current.CurrentLayoutChanged += new EventHandler<KeyboardCurrentLayoutChangedEventArgs>( OnCurrentLayoutChanged );

                _zoneCache.Clear();
                Zones.Refresh();
                Zones = new VMCollection<LayoutZoneViewModel, ILayoutZone>( _ctx.CurrentKeyboard.CurrentLayout.LayoutZones, FindOrCreate );
                ToggleCurrentKeyboardAsHolder();
                NotifyOfPropertyChange( () => Zones );
                Refresh();
            }
        }
 void OnCurrentKeyboardChanged( object sender, CurrentKeyboardChangedEventArgs e )
 {
     Debug.Assert( Dispatcher.CurrentDispatcher == NoFocusManager.Default.ExternalDispatcher, "This method should only be called by the ExternalThread." );
     //Feature.PredictionContextFactory.RemovePredictionZone( e.Previous );
     //Feature.PredictionContextFactory.CreatePredictionZone( e.Current, Feature.MaxSuggestedWords );
 }