private void btnPlayback_Click(object sender, RoutedEventArgs e) { btnPlayback.IsEnabled = false; var sim = new InputSimulator(); sim.OnPlayback += OnPlayback; sim.PlayBack(_macroEvents); btnPlayback.IsEnabled = true; }
private void Playback() { this.isPlaying = true; btnPlayback.Enabled = false; var sim = new InputSimulator(); sim.OnPlayback += OnPlayback; sim.PlayBack(_macroEvents); btnPlayback.Enabled = true; var timer = new System.Threading.Timer(new TimerCallback(SetPlaying), false, 10000, 2000); }