예제 #1
0
        public IMouseTrailCollection ParseFile(string fileName)
        {
            if (!File.Exists(fileName))
            {
                return(new MouseTrailCollection(new MouseMovementInfo[0]));
            }

            using (var fs = new StreamReader(fileName))
            {
                var infos = new List <MouseMovementInfo>();

                while (!fs.EndOfStream)
                {
                    var s = fs.ReadLine();

                    if (!string.IsNullOrWhiteSpace(s))
                    {
                        infos.Add(mouseMoveInfoParser(s));
                    }
                }

                var mouseAnalysis = new MouseTrailCollection(infos);

                return(mouseAnalysis);
            }
        }
        public IMouseTrailCollection ParseFile(string fileName)
        {
            if (!File.Exists(fileName))
                return new MouseTrailCollection(new MouseMovementInfo[0]);

            using (var fs = new StreamReader(fileName))
            {
                var infos = new List<MouseMovementInfo>();

                while (!fs.EndOfStream)
                {
                    var s = fs.ReadLine();

                    if (!string.IsNullOrWhiteSpace(s))
                    {
                        infos.Add(mouseMoveInfoParser(s));
                    }
                }

                var mouseAnalysis = new MouseTrailCollection(infos);

                return mouseAnalysis;
            }
        }