public bool Initialize() { if (!isInitialized && CheckGCPower()) { try { keyboard = KeyboardFactory.CreateHIDDevice("hidkeyboard"); if (keyboard != null) { bRefreshOnce = true; isInitialized = true; return(true); } isInitialized = false; return(false); } catch (Exception ex) { Debug.WriteLine("Uniwill device error!"); } // Mark Initialized = FALSE isInitialized = false; return(false); } return(isInitialized); }
public bool Initialize() { if (!isInitialized && CheckGCPower()) { try { devicename = KeyboardFactory.GetOEMName(); keyboard = KeyboardFactory.CreateHIDDevice("hidkeyboard"); if (keyboard != null) { bRefreshOnce = true; isInitialized = true; //SetBrightness(); return(true); } isInitialized = false; return(false); } catch { Global.logger.Error("Uniwill device error!"); } // Mark Initialized = FALSE isInitialized = false; return(false); } return(isInitialized); }
public TextHandler(TelegramBotClient bot, KeyboardFactory keyboardFactory, ApiAi ai) { _bot = bot; _keyboardFactory = keyboardFactory; _ai = ai; _logger = new Logger(this); }
public QwertyValidator() : base() { this.keyboardCollector = KeyboardFactory.Create <IKeyboardCollector>(); this.keyboardBuilder = KeyboardFactory.Create <IKeyboardBuilder>(); this.numericBuilder = KeyboardFactory.Create <INumericBuilder>(); this.qwertyBuilder = KeyboardFactory.Create <IQwertyBuilder>(); }
public void OpenKeyboard() { #if UNITY_ANDROID && !UNITY_EDITOR if (keyboardType == Keyboard.KeyboardType.Standalone) { keyboardType = Keyboard.KeyboardType.MobileNative; } #endif keyboard = KeyboardFactory.GetKeyboard(keyboardType); keyboard?.Open(this); }
public BotController(TelegramBotClient bot, ApiAi ai) { _logger = new Logger(this); _bot = bot; _ai = ai; _keyboardFactory = new KeyboardFactory(); _textHandler = new TextHandler(_bot, _keyboardFactory, _ai); _bot.OnMessage += BotOnMessageReceived; _bot.OnCallbackQuery += BotOnCallbackQueryReceived; var me = _bot.GetMeAsync().Result; Console.WriteLine($"Hello, World! I am user {me.Id} and my name is {me.FirstName}."); }
private GameObject CreateKeyboard() { KeyboardFactory factory = Undoable.AddComponent <KeyboardFactory>(disposable); factory.parent = parent; GameObject panel = factory.Generate(); keyboardInstance = panel; Vector3 localPosition = keyboardInstance.transform.localPosition; localPosition.x = keyboardLocalPosition.x; keyboardInstance.transform.localPosition = localPosition; keyboard = keyboardInstance.GetComponent <Keyboard>(); return(panel); }
public QwertyGeneratorControl() : base() { this.InitializeComponent(); this.qwertyValidator = KeyboardFactory.Create <IQwertyValidator>(); StandardContextMenu contextMenu = StandardContextMenu.Create(this.OnContextMenuItemClick); contextMenu.Opening += this.OnContextMenuOpening; this.txtSource.ContextMenu = null; this.txtSource.ContextMenuStrip = contextMenu; this.txtSource.SetWatermark(true); this.txtResult.Text = String.Empty; }
public UniwillDevice() { devicename = KeyboardFactory.GetOEMName(); ChoiceGamingCenter(); }