Exemplo n.º 1
0
        private void mouseHook_MouseUp(object sender, MouseEventArgs e)
        {
            var mouseEventArgs = new SerializableMouseEventArgs()
            {
                X = e.X, Y = e.Y, Button = e.Button
            };

            events.Add(new MacroEvent(MacroEventType.MouseUp, mouseEventArgs, Environment.TickCount - lastTimeRecorded));
            lastTimeRecorded = Environment.TickCount;
        }
Exemplo n.º 2
0
        public MacroEvent(MacroEventType macroEventType, SerializableMouseEventArgs eventArgs, int timeSinceLastEvent)
        {
            MacroEventType     = macroEventType;
            MouseEventArgs     = eventArgs;
            TimeSinceLastEvent = timeSinceLastEvent;

            EventId = UtcNowTicks.ToString();

            CurrentProcessName = ProcessHelper.GetForegroundProcessName();
            WindowSize         = ProcessHelper.GetWindowRect();
        }