我有一个有两页的老式angularJs应用程序.在这两个页面上,我都包含了auth0锁定脚本.
<script src="https://cdn.auth0.com/js/lock/11.9.0/lock.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
在这两个页面中,有一个具有以下js,它们指定允许用户登录的auth0锁定:
new Auth0LockPasswordless(configuration.id,configuration.domain,
{
allowedConnections: ['email'],
passwordlessMethod: "link",
auth: {
redirectUrl: configuration.redirectUrl,
responseType: 'token id_token',
params: {
scope: 'openid profile email offline_access'
}
}
}).show();
Run Code Online (Sandbox Code Playgroud)
另一页负责在点击电子邮件中的链接后进行回拨.
var lock = new Auth0LockPasswordless(configuration.id, configuration.domain);
lock.on('authorization_error',
function(authResult) {
console.log("DEBUG::AUTHRESULT::", authResult);
});
lock.on('authenticated',
function(authResult) {
console.log("DEBUG::AUTHRESULT::", authResult);
});
Run Code Online (Sandbox Code Playgroud)
现在我已经设置offline_access了请求的范围,并且在我的本地环境中,在进行身份验证时会提示其他权限(因此它正在通过).但是,当我从lock.on('authenticated', function(authResult)..refreshToken 检查日志时始终为null.
网络上存在一些相互矛盾的文档,两种建议都是锁定并且不会返回刷新令牌.是否有人能够确认此代码是否应该导致有效的refreshToken?
我希望能够在monotouch中创建的ios应用程序中为文本输入提供我自己的可用自动更正/自动完成选项列表.
单词列表通过Web服务更新.完成搜索后,可以在Ebay应用程序中看到此类功能的示例.
实现这一目标的最佳方法是什么?
因此,我尝试模拟鼠标左键单击和鼠标左键释放以进行一些自动拖放。
目前它在C#Winforms中(是的,winforms:|),有点像鹅。
基本上,一旦发送了Click,我希望它根据Kinect输入来更新光标位置。Kinect方面很好,但是我不确定如何找到按钮是否仍处于按下状态。
这是我当前正在使用的代码+一些psuedocode以帮助更好地解释自己(做的时候)。
class MouseImpersonator
{
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
private static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo);
private const int leftDown = 0x02;
private const int leftUp = 0x04;
public static void Grab(int xPos, int yPos)
{
Cursor.Position = new Point(xPos + 25, yPos + 25);
mouse_event(leftDown, (uint) xPos, (uint) yPos, 0, 0);
//do
//{
//Cursor.Position = new Point(KinectSettings.movement.LeftHandX, KinectSettings.movement.LeftHandY);
//} while (the left mouse button is still clicked); …Run Code Online (Sandbox Code Playgroud) 我正在尝试找到一种显示文本块的方法,或者允许我随意拖放屏幕上的控件.
我已经搜索谷歌和这里,但我找到的每个拖放相关的问题都是围绕交换数据,而不仅仅是位置.
是否有人知道某些事情已经准备好了,或者你能指出我应该看的方向吗?
我创建了一个标签覆盖,可以让我的新控件轻松地在屏幕上移动.
我已经附上了下面的代码,但是当我运行应用程序或尝试移动标签时,它总是关闭.它有时也会完全消失,留下痕迹或重置到0,0位置.看一下截图.
我曾经100%使用它,但经过最近的一些调整之后它再次出现在狗身上,我不知道如何让它发挥作用.
截图:

码:
internal sealed class DraggableLabel : Label
{
private bool _dragging;
private int _mouseX, _mouseY;
public DraggableLabel()
{
DoubleBuffered = true;
}
protected override void OnMouseMove(MouseEventArgs e)
{
if (_dragging)
{
Point mposition = PointToClient(MousePosition);
mposition.Offset(_mouseX, _mouseY);
Location = mposition;
}
base.OnMouseMove(e);
}
protected override void OnMouseDown(MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
_dragging = true;
_mouseX = -e.X;
_mouseY = -e.Y;
BringToFront();
Invalidate();
}
base.OnMouseDown(e);
}
protected override void OnMouseUp(MouseEventArgs e)
{
if (_dragging) …Run Code Online (Sandbox Code Playgroud) c# ×2
winforms ×2
auth0 ×1
auth0-lock ×1
autocomplete ×1
autocorrect ×1
ios ×1
javascript ×1
kinect ×1
mouseevent ×1
xamarin.ios ×1