private void AttachButtonClick(object sender, RoutedEventArgs e) { if (Engine.Attach()) { Engine.Start(); TimeTrial = new TimeTrial(Engine.GameState); ButtonSetStart.IsEnabled = true; ButtonSetEnd.IsEnabled = true; ButtonResetAll.IsEnabled = true; } else { MessageBox.Show("Could not find a running A Short Hike process..."); } }
private void ButtonResetAll_Click(object sender, RoutedEventArgs e) { TimeTrial = new TimeTrial(Engine.GameState); ButtonResetAll.Content = "ack"; var timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(500) }; timer.Start(); timer.Tick += (sender_, args) => { timer.Stop(); ButtonResetAll.Content = "reset all"; }; }