public static InputLock LockControls(InputLockType type, object token) { var iLock = new InputLock(type, token); Instance.AddInputLock(iLock); return(iLock); }
private void ApplyInputLock(InputLockType newState) { if (QdmsMessageBus.Instance != null) //it's possible for this to run after the message bus is destroyed { QdmsMessageBus.Instance.PushBroadcast(new InputLockMessage(newState)); } InputLockState = newState; }
/// <summary> /// 锁定窗口输入 /// </summary> /// <param name="lockType">锁定类型</param> /// <param name="isSetType">是否改变窗口锁定类型</param> /// <returns></returns> public bool SetInputLock(InputLockType lockType, bool isSetType = true) { bool flag = _dm.LockInput((int)lockType); if (flag && isSetType) { InputLockType = lockType; } return flag; }
/// <summary> /// 锁定窗口输入 /// </summary> /// <param name="lockType">锁定类型</param> /// <param name="isSetType">是否改变窗口锁定类型</param> /// <returns></returns> public bool LockInput(InputLockType lockType, bool isSetType = true) { bool flag = _dm.LockInput((int)lockType) == 1; if (flag && isSetType) { InputLockType = lockType; } return(flag); }
/// <summary> /// 锁定窗口输入 /// </summary> /// <param name="lockType">锁定类型</param> /// <param name="isSetType">是否改变窗口锁定类型</param> /// <returns></returns> public bool LockInput(InputLockType lockType, bool isSetType = true) { bool flag = _dm.LockInput((int)lockType) == 1; if (flag && isSetType) { InputLockType = lockType; } return flag; }
public InputLock(InputLockType type, object owner) { Type = type; Owner = owner; }