예제 #1
0
    private void UpdateTouchInput(TouchID id, int indexMask, int state)
    {
        if (!enabled || Module_Guide.inCheckConditionTime)
        {
            return;
        }

        var changed = 0;

        for (var i = 0; i < inputKeyCount; ++i)
        {
            var inputKey = m_inputKeys[i];
            if (inputKey.touchID != id || indexMask > -1 && !indexMask.BitMask(inputKey.touchIndex) || (lockedKeyValue > 0 && inputKey.value != lockedKeyValue))
            {
                continue;
            }
            if (inputKey.UpdateTouchState(state))
            {
                AddChangedKey(inputKey, ref changed);
            }
        }

        if (changed > 0)
        {
            OnInputChanged(1, changed);
        }
    }
예제 #2
0
    public void Set(int _ID = -1, string _key = "", InputKeyType _type = InputKeyType.Down, TouchID _touchID = 0, int _touchIndex = 0, int _delay = 0, int _value = 0, string _name = "", string _desc = "")
    {
        ID            = _ID;
        key           = _key;
        type          = _type;
        touchID       = _touchID;
        touchIndex    = _touchIndex;
        delay         = _delay;
        value         = _value;
        name          = _name;
        desc          = _desc;
        bindDirection = 0;
        oneShot       = type < InputKeyType.Press;
        isInstant     = type != InputKeyType.Hold;

        m_lastDownTime      = 0;
        m_lastTouchDownTime = 0;

        m_customFired = false;
        m_fired       = false;
        m_touchFired  = false;

        m_mutexKeyIDs = null;
        m_mutexKeys.Clear();
    }
예제 #3
0
    /// <summary>
    /// Set current touch id state
    /// </summary>
    /// <param name="id"></param>
    /// <param name="state">1 = start, 2 = end, 3 = stay</param>
    private void _SetTouchState(TouchID id, int state, int indexMask = 1, bool oneShot = true)
    {
        //Logger.LogInfo("Touch {0} index {1} update to {2}", id, index, state);

        UpdateTouchInput(id, indexMask, state);

        if (oneShot && indexMask >= 0 && state != 0)
        {
            UpdateTouchInput(id, indexMask, 0);
        }
    }
예제 #4
0
 public IReturnType Calculate(Objects.ValidSetOfTouchPoints set)
 {
     TouchID id = new TouchID();
     foreach (var point in set)
     {
         if (!id.Contains(point.TouchDeviceId))
         {
             id.Add(point.TouchDeviceId);
         }
     }
     return id;
 }
예제 #5
0
 private void Button_Clicked_3(object sender, EventArgs e)
 {
     Device.BeginInvokeOnMainThread(() =>
     {
         DisplayAlert("Status",
                      $"Is Device Secured : {TouchID.IsDeviceSecured().ToString()} {Environment.NewLine}" +
                      $"Is Fingerprint Enrolled : {TouchID.IsFingerPrintEnrolled().ToString()} {Environment.NewLine}" +
                      $"Is Hardware Support : {TouchID.IsHardwareDetected().ToString()} {Environment.NewLine}" +
                      $"Is Permission Grant : {TouchID.IsPermissionGranted().ToString()} {Environment.NewLine}" +
                      $"Fingerprint Status : {TouchID.IsFingerprintAuthenticationPossible().ToString()} {Environment.NewLine}"
                      , "Ok");
     });
 }
예제 #6
0
        void ReleaseDesignerOutlets()
        {
            if (CancelButton != null)
            {
                CancelButton.Dispose();
                CancelButton = null;
            }

            if (ContainerBottomConstraint != null)
            {
                ContainerBottomConstraint.Dispose();
                ContainerBottomConstraint = null;
            }

            if (ContainerTopConstraint != null)
            {
                ContainerTopConstraint.Dispose();
                ContainerTopConstraint = null;
            }

            if (PINButton != null)
            {
                PINButton.Dispose();
                PINButton = null;
            }

            if (PINHeightConstraint != null)
            {
                PINHeightConstraint.Dispose();
                PINHeightConstraint = null;
            }

            if (PINWidthConstraint != null)
            {
                PINWidthConstraint.Dispose();
                PINWidthConstraint = null;
            }

            if (TitleTopConstraint != null)
            {
                TitleTopConstraint.Dispose();
                TitleTopConstraint = null;
            }

            if (TouchID != null)
            {
                TouchID.Dispose();
                TouchID = null;
            }

            if (TouchIDBottomConstraint != null)
            {
                TouchIDBottomConstraint.Dispose();
                TouchIDBottomConstraint = null;
            }

            if (TouchIDButtonHeight != null)
            {
                TouchIDButtonHeight.Dispose();
                TouchIDButtonHeight = null;
            }

            if (TouchIdButtonWidthConstraint != null)
            {
                TouchIdButtonWidthConstraint.Dispose();
                TouchIdButtonWidthConstraint = null;
            }
        }
예제 #7
0
 /// <summary>
 /// Set current touch id state
 /// state: 0 = none, 1 = begin, 2 = end, 3 = stay
 /// </summary>
 /// <param name="id"></param>
 /// <param name="state"></param>
 /// <param name="indexMask">Touch indexs</param>
 /// <param name="oneShot"></param>
 public static void SetTouchState(TouchID id, int state, int indexMask = 1, bool oneShot = true)
 {
     instance._SetTouchState(id, state, indexMask, oneShot);
 }
예제 #8
0
 public InputKey(int _ID = -1, string _key = "", InputKeyType _type = InputKeyType.Down, TouchID _touchID = 0, int _touchIndex = 0, int _delay = 0, int _value = 0, string _name = "", string _desc = "")
 {
     Set(_ID, _key, _type, _touchID, _touchIndex, _delay, _value, _name, _desc);
 }