public WindowReplayer() { InitializeComponent(); KeyDown += (sender, args) => { if (args.Key == Key.Left) { UcReplayerTable_Main.UndoCommand(); } if (args.Key == Key.Right) { UcReplayerTable_Main.DoCommand(); } if (args.Key == Key.Up) { //UcReplayerTable_Main.ReplayHand(PokerHand.FromHandHistory(Clipboard.GetText())); } }; MouseDown += (sender, args) => { Keyboard.ClearFocus(); }; Closing += (sender, args) => { if (!IsClosing) { Visibility = Visibility.Hidden; args.Cancel = true; } }; }
private void Button_PasteFromClipboard_Click(object sender, RoutedEventArgs e) { try { UcReplayerTable_Main.ReplayHand(PokerHand.Parse(Methods.GetClipboardText())); } catch { UcReplayerTable_Main.ReplayHand(null); } }
public void ReplayHand(string HandHistoryStr) { Visibility = Visibility.Visible; var pokerData = PokerData.FromText(HandHistoryStr); if (pokerData.PokerHands.Any()) { UcReplayerTable_Main.ReplayHand(pokerData.PokerHands.First()); } Topmost = true; Topmost = false; }
private void Button_First_Click(object sender, RoutedEventArgs e) { UcReplayerTable_Main.UndoCommandAll(); }
private void Button_Previous_Click(object sender, RoutedEventArgs e) { UcReplayerTable_Main.UndoCommand(); }
private void Button_Next_Click(object sender, RoutedEventArgs e) { UcReplayerTable_Main.DoCommand(); }
private void Button_GoToRiver_Click(object sender, RoutedEventArgs e) { UcReplayerTable_Main.GoToRiver(); }