Пример #1
0
        private async void Run()
        {
            int skip = 2;// Config.SkipLast.Value;

            run = true;
            long prevTime = _recording.StartTime;

            for (int i = 0; i < _recording.Events.Count - skip && run; i++)
            {
                var evt = _recording.Events[i];

                await Task.Delay((int)(evt.Time - prevTime));

                prevTime = evt.Time;
                if (evt.Type == DetailsType.Mouse)
                {
                    MouseMove.ProcessMouseEvent(_recording.Events[i] as MouseDetails);
                }
                else if (_recording.Events[i].Type == DetailsType.Keyboard)
                {
                    KeyPress.ProcessKeyEvent(_recording.Events[i] as KeyboardDetails);
                }
            }
        }