public void timer_Tick(DateTime dt)
        {
            MouseRecord r = new MouseRecord();

            r.X      = mousePos.X;
            r.Y      = mousePos.Y;
            r.LineNo = lineNumber;
            try
            {
                currentLineCounter[(int)lineNumber - 1]++;
            }
            catch (IndexOutOfRangeException)
            {
                currentLineCounter[currentLineCounter.Length - 1]++;
            }

            r.Time = dt;
            collectedPoints.Add(r);
        }
Beispiel #2
0
        /// <summary>
        /// the array mouseRecordDump is the list of mouseRecords.
        /// </summary>
        public void updateMouseRecordDump()
        {
            bool exists = false;

            foreach (MouseRecord m in mouseRecordDump)
            {
                if (m.point == mousePos)
                {
                    m.increment();
                    m.print();
                    exists = true;
                    break;
                }
            }
            if (!exists)
            {
                MouseRecord newRecord = new MouseRecord(mousePos);
                mouseRecordDump.Add(newRecord);
                newRecord.print();
            }
        }