Пример #1
0
        public bool MoveToTrial(int index)
        {
            bool b;

            if (Edf.JumpToTrial(m_EdfFile, index))
            {
                m_CurrentTrialIndex = index;

                TrialIndexUpdated();

                b = true;
            }
            else
            {
                m_CurrentTrialIndex = -1;
                b = false;
            }

            return(b);
        }
Пример #2
0
        private void SearchGazeCoords()
        {
            Constant.EventType type;
            EdfData            dv;
            string             message;

            while ((dv = TrialNextEvent(out type, Constant.EventType.MESSAGEEVENT)) != null)
            {
                message = (dv as AllfData).fe.message;

                if (!string.IsNullOrEmpty(message) && message.StartsWith("GAZE_COORDS"))
                {
                    string[] array = message.Split(new char[] { ' ' });
                    float    x     = float.Parse(array [1]);
                    float    y     = float.Parse(array [2]);
                    m_GazeCoords.Set(x, y, float.Parse(array[3]) + 1.0f - x, float.Parse(array[4]) + 1.0f - y);
                    //Debug.Log("Find: "+m_GazeCoords);
                    break;
                }
            }

            Edf.JumpToTrial(m_EdfFile, m_CurrentTrialIndex);
        }