internal PredictionItem(KeyboardHost host, int index)
        {
            this.host = host;

            Index  = index;
            Accept = new RelayCommand(AcceptAction);
        }
Beispiel #2
0
        /// <summary>
        /// Create a new instance of the host for the environment.
        /// </summary>
        /// <param name="environment">The environment.</param>
        /// <returns>The new host.</returns>
        public static KeyboardHost Create(IKeyboardApplicationEnvironment environment)
        {
            var host = new KeyboardHost(environment);

            host.SetTextHint(host.TextSlice);

            host.ShiftToggleState.IsChecked   = environment.SystemProvider.IsShiftKeyDown;
            host.ControlToggleState.IsChecked = environment.SystemProvider.IsControlKeyDown;
            host.AltToggleState.IsChecked     = environment.SystemProvider.IsAltKeyDown;

            return(host);
        }