Facebook全屏模式下没有键盘的连接

时间:2011-04-09 11:04:46

标签: facebook touch kiosk-mode

我们要求在Kiosk模式的Windows中运行的触摸屏信息亭上使用facebook connect。自助服务终端上没有物理键盘。有关如何获取可用于将凭据传递给Facebook以便我们可以对用户进行身份验证的虚拟键盘的任何想法? Facebook似乎不允许在登录页面之外对用户进行身份验证。

1 个答案:

答案 0 :(得分:0)

我在Windows窗体上找到了一个非常简单的解决方案。 SendKeys类可以模拟键盘事件。

http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(SYSTEM.WINDOWS.FORMS.SENDKEYS.SEND);k(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22);k(DevLang-CSHARP)&rd=true

设置是一个带有WebBrowserControl的表单和一组用于键盘键的按钮。这是键盘按钮的事件处理程序。

private void buttonKey_Click(object sender, EventArgs e)
    {
        Control _sender = sender as Control;
        if (_sender != null)
        {
            //focus the webBrowser
            bool focusResult = false;
            do
            {
                focusResult = webBrowser1.Focus();
                if (!focusResult)
                {
                    Thread.Sleep(100);
                }
            } while (!focusResult);

            SendKeys.Send("{TAB}");
            SendKeys.Send("+{TAB}");
            SendKeys.Send("{RIGHT}");
            SendKeys.Send(_sender.Text);
        }
    }
相关问题