Exemplo n.º 1
0
    public uint CognitivGetActiveActions(uint userId)
    {
        uint result = 0u;

        EmoEngine.errorHandler(EdkDll.EE_CognitivGetActiveActions(userId, out result));
        return(result);
    }
Exemplo n.º 2
0
    //test
    //public int numOfProfile;
    //public string currentDir;
    //void Update()
    //{
    //    numOfProfile = GetProfilesArraySize();
    //    currentDir = System.IO.Directory.GetCurrentDirectory();
    //}
    public static bool[] CheckCurrentProfile()
    {
        uint temp;

        EdkDll.EE_CognitivGetActiveActions((uint)EmoUserManagement.currentUser, out temp);
        string test = Convert.ToString(temp, 2);

        Debug.Log(test);
        bool[] actionLever = new bool[EmoCognitiv.cognitivActionList.Length];
        for (int i = 0; i < EmoCognitiv.cognitivActionList.Length; i++)
        {
            actionLever[i] = false;
        }
        for (int i = test.Length - 1; i >= 0; i--)
        {
            //if (test[i] == '0')
            //{
            //    actionLever[test.Length - i -1] = false;
            //}
            if (test[i] == '1')
            {
                actionLever[test.Length - i - 1] = true;
            }
        }
        return(actionLever);
    }
Exemplo n.º 3
0
    public static bool[] CheckCurrentProfile()
    {
        uint num;

        EdkDll.EE_CognitivGetActiveActions((uint)EmoUserManagement.currentUser, out num);
        string text = Convert.ToString((long)((ulong)num), 2);

        Debug.Log(text);
        bool[] array = new bool[EmoCognitiv.cognitivActionList.Length];
        for (int i = 0; i < EmoCognitiv.cognitivActionList.Length; i++)
        {
            array[i] = false;
        }
        for (int j = text.Length - 1; j >= 0; j--)
        {
            if (text[j] == '1')
            {
                Debug.Log(j);
                array[text.Length - j - 1] = true;
            }
        }
        return(array);
    }