CK.WordPredictor.DefaultKeyboardContextPredictionFactory.CreatePredictionZone C# (CSharp) Method

CreatePredictionZone() public method

public CreatePredictionZone ( IKeyboard keyboard, int count ) : IZone
keyboard IKeyboard
count int
return IZone
        public virtual IZone CreatePredictionZone( IKeyboard keyboard, int count )
        {
            if( keyboard == null ) throw new ArgumentNullException( "keyboard" );

            IZone predictionZone = keyboard.Zones[PredictionKeyboardAndZoneName];
            if( predictionZone != null )
            {
                predictionZone.Destroy();
            }

            predictionZone = keyboard.Zones.Create( PredictionKeyboardAndZoneName );

            for( int i = 0; i < count; ++i )
            {
                CreatePredictionKey( predictionZone, i );
            }

            if( PredictionZoneCreated != null )
                PredictionZoneCreated( this, new ZoneEventArgs( predictionZone ) );

            return predictionZone;
        }