Exemplo n.º 1
0
        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;
                }
            };
        }
Exemplo n.º 2
0
 private void Button_PasteFromClipboard_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         UcReplayerTable_Main.ReplayHand(PokerHand.Parse(Methods.GetClipboardText()));
     }
     catch
     {
         UcReplayerTable_Main.ReplayHand(null);
     }
 }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
 private void Button_First_Click(object sender, RoutedEventArgs e)
 {
     UcReplayerTable_Main.UndoCommandAll();
 }
Exemplo n.º 5
0
 private void Button_Previous_Click(object sender, RoutedEventArgs e)
 {
     UcReplayerTable_Main.UndoCommand();
 }
Exemplo n.º 6
0
 private void Button_Next_Click(object sender, RoutedEventArgs e)
 {
     UcReplayerTable_Main.DoCommand();
 }
Exemplo n.º 7
0
 private void Button_GoToRiver_Click(object sender, RoutedEventArgs e)
 {
     UcReplayerTable_Main.GoToRiver();
 }