private async void ButtonShowReplay_OnClick(object sender, RoutedEventArgs e) { var game = SelectedGame; await ReplayLauncher.ShowReplay(game, true); game.UpdateReplayState(); }
private async void BorderReplay_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { ToastManager.ForceCloseToast(this); await Task.Delay(500); ReplayLauncher.ShowReplay(_game, true).Forget(); }
private async void MenuItemLastGamesReplay_OnClick(object sender, RoutedEventArgs e) { var game = (e.OriginalSource as MenuItem)?.DataContext as GameStats; if (game == null) { return; } await ReplayLauncher.ShowReplay(game, true); }
private void MenuItemReplayFromFile_OnClick(object sender, RoutedEventArgs e) { try { var dialog = new OpenFileDialog { Title = "Select Replay File", DefaultExt = "*.hdtreplay", Filter = "HDT Replay|*.hdtreplay", InitialDirectory = Config.Instance.ReplayDir }; var dialogResult = dialog.ShowDialog(); if (dialogResult == System.Windows.Forms.DialogResult.OK) { ReplayLauncher.ShowReplay(dialog.FileName, true); } } catch (Exception ex) { Log.Error(ex); } }
internal void ShowReplayFromFileDialog() { try { var dialog = new OpenFileDialog { Title = "Select Replay File", DefaultExt = "*.hdtreplay", Filter = "HDT Replay|*.hdtreplay", InitialDirectory = Config.Instance.ReplayDir }; var dialogResult = dialog.ShowDialog(); if (dialogResult == System.Windows.Forms.DialogResult.OK) { ReplayLauncher.ShowReplay(dialog.FileName, true).Forget(); } } catch (Exception ex) { Log.Error(ex); } }
private async void BorderReplay_OnMouseLeftButtonUp(object sender, EventArgs e) { await Task.Delay(500); ReplayLauncher.ShowReplay(_game, true).Forget(); }
private async void UserControl_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { await Task.Delay(500); ReplayLauncher.ShowReplay(_game, true).Forget(); }