Browse Source

zhao:录制页面增加跳转

tags/录制修改前
耀 4 years ago
parent
commit
3404c3a14b
2 changed files with 183 additions and 136 deletions
  1. 22
    12
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml
  2. 161
    124
      XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs

+ 22
- 12
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

@@ -3,6 +3,7 @@
3 3
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+        xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
6 7
          xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
7 8
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
8 9
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
@@ -638,8 +639,8 @@
638 639
                     <RadioButton Cursor="Hand" x:Name="rbnCrude" Content=" 粗" Style="{StaticResource radBase}" FontSize="14" Margin="5,4,0,0" Click="RbnCrude_Click"/>
639 640
                 </StackPanel>
640 641
                 <!--页码-->
641
-                <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" HorizontalAlignment="Center">
642
-                    <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Transparent" Width="120" HorizontalAlignment="Center" Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
642
+                <Grid Grid.Row="1" x:Name="gridPage" Visibility="Hidden" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" HorizontalAlignment="Center">
643
+                    <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Transparent" Width="150" HorizontalAlignment="Center" Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
643 644
                         <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
644 645
                     x:Name="last_button"
645 646
                     Width="28" Height="20"
@@ -649,18 +650,27 @@
649 650
                                 <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
650 651
                             </StackPanel>
651 652
                         </Button>
652
-                        <Grid Width="60"  Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
653
-                            <Grid.RowDefinitions>
654
-                                <RowDefinition Height="311*"/>
655
-                                <RowDefinition Height="483*"/>
656
-                            </Grid.RowDefinitions>
657
-                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-12,0,0" Grid.Row="1"  Background="Transparent">
653
+                        <Grid Width="95"  Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
654
+                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
655
+                                <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15" MouseLeftButtonDown="txbCurrpage_MouseLeftButtonDown" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0" ToolTip="双击跳转"/>
656
+                                <TextBlock Text="/" TextAlignment="Center" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="txbCurrpage_MouseLeftButtonDown" ToolTip="双击跳转"/>
657
+                                <TextBlock x:Name="txbTotalpage" Text="{Binding pagenum}" TextAlignment="Center" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" MouseLeftButtonDown="txbCurrpage_MouseLeftButtonDown" ToolTip="双击跳转"/>
658
+                            </StackPanel>
659
+                            <TextBox x:Name="txtJump" Text="123" Height="17" Width="25" Visibility="Hidden" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0"  input:InputMethod.IsInputMethodEnabled="False" PreviewTextInput="txtJump_PreviewTextInput" KeyDown="txtJump_KeyDown"/>
660
+                            <Button Cursor="Hand" Visibility="Hidden" x:Name="BtnJumpPage" HorizontalAlignment="Left"  VerticalAlignment="Center" Width="17" Height="17" Background="White" BorderBrush="#FFABADB3" Margin="24,0,0,0" Click="BtnJumpPage_Click">
661
+                                <Button.Resources>
662
+                                    <Style TargetType="{x:Type Border}">
663
+                                        <Setter Property="CornerRadius" Value="0"/>
664
+                                        <Setter Property="BorderBrush" Value="#3492F4"/>
665
+                                    </Style>
666
+                                </Button.Resources>
667
+                                <Image Source="/星火微课;component/Images/VideoList_OK.png" Margin="2,2,2,2"></Image>
668
+                            </Button>
669
+                            <!--<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0"  Background="Transparent">
658 670
                                 <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
659
-                                    <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
660
-                                    <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
661
-                                    <TextBlock Text="{Binding pagenum}" TextAlignment="Center" FontSize="15"/>
671
+                                   
662 672
                                 </StackPanel>
663
-                            </StackPanel>
673
+                            </StackPanel>-->
664 674
                         </Grid>
665 675
                         <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
666 676
                     x:Name="next_btn"  Background="Transparent"

+ 161
- 124
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

@@ -14,6 +14,7 @@ using System.Drawing.Imaging;
14 14
 using System.IO;
15 15
 using System.Linq;
16 16
 using System.Text;
17
+using System.Text.RegularExpressions;
17 18
 using System.Threading;
18 19
 using System.Windows;
19 20
 using System.Windows.Controls;
@@ -3680,72 +3681,103 @@ namespace XHWK.WKTool
3680 3681
             {
3681 3682
                 mouseDown = false;
3682 3683
                 HideAngleBorder();
3684
+
3685
+                //隐藏跳转
3686
+                txbCurrpage.Visibility = Visibility.Visible;
3687
+                txtJump.Visibility = Visibility.Hidden;
3688
+                BtnJumpPage.Visibility = Visibility.Hidden;
3683 3689
                 //if(!APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation)
3684 3690
                 //{
3685 3691
                 //    ImgWG();
3686 3692
                 //}
3687 3693
                 APP.pageData.currpage -= 1;
3688
-                myblackboard.changepage(APP.pageData.currpage - 1);
3689
-                scroMain.ScrollToVerticalOffset(0);
3690
-                if (btnImport.IsEnabled == true)
3694
+                JumpPageClick();
3695
+            }
3696
+        }
3697
+        /// <summary>
3698
+        /// 跳转
3699
+        /// </summary>
3700
+        void JumpPageClick()
3701
+        {
3702
+            myblackboard.changepage(APP.pageData.currpage - 1);
3703
+            scroMain.ScrollToVerticalOffset(0);
3704
+            if (btnImport.IsEnabled == true)
3705
+            {
3706
+                ///截图可用
3707
+                ImgScreenshot.Visibility = Visibility.Visible;
3708
+                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
3709
+                btnScreenshot.IsEnabled = true;
3710
+            }
3711
+            if (APP.pageData.currpage <= APP.PageDrawList.Count)
3712
+            {
3713
+                if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
3691 3714
                 {
3692
-                    ///截图可用
3693
-                    ImgScreenshot.Visibility = Visibility.Visible;
3694
-                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
3695
-                    btnScreenshot.IsEnabled = true;
3715
+                    APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
3696 3716
                 }
3697
-                if (APP.pageData.currpage <= APP.PageDrawList.Count)
3717
+                if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && APP.pageData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
3698 3718
                 {
3699
-                    if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
3700
-                    {
3701
-                        APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
3702
-                    }
3703
-                    if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && APP.pageData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
3719
+                    if (APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation)
3704 3720
                     {
3705
-                        //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
3706
-
3707
-                        if (APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation)
3721
+                        if ("ppt".Equals(APP.PageDrawList[APP.pageData.currpage - 1].Type))
3708 3722
                         {
3709
-                            if ("ppt".Equals(APP.PageDrawList[APP.pageData.currpage - 1].Type))
3710
-                            {
3711
-                                imgCanvas.Source = null;
3712
-                                imgDocumentation.Source = null;
3713
-                                imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3714
-                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3715
-                                ImgScreenshotTwo.Visibility = Visibility.Visible;
3716
-                                btnScreenshot.IsEnabled = false;
3717
-                            }
3718
-                            else
3719
-                            {
3720
-                                imgPPT.Source = null;
3721
-                                imgCanvas.Source = null;
3722
-                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3723
-                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3724
-                                ImgScreenshotTwo.Visibility = Visibility.Visible;
3725
-                                btnScreenshot.IsEnabled = false;
3726
-                            }
3723
+                            imgCanvas.Source = null;
3724
+                            imgDocumentation.Source = null;
3725
+                            imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3726
+                            ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3727
+                            ImgScreenshotTwo.Visibility = Visibility.Visible;
3728
+                            btnScreenshot.IsEnabled = false;
3727 3729
                         }
3728 3730
                         else
3729 3731
                         {
3730 3732
                             imgPPT.Source = null;
3731
-                            imgDocumentation.Source = null;
3732
-                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3733
-                            APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
3734
-                            if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
3735
-                            {
3736
-                                mouseDown = false;
3737
-                                ImgXY();
3738
-
3739
-                            }
3733
+                            imgCanvas.Source = null;
3734
+                            imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3735
+                            ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3736
+                            ImgScreenshotTwo.Visibility = Visibility.Visible;
3737
+                            btnScreenshot.IsEnabled = false;
3740 3738
                         }
3739
+                        //imgCanvas.Source = null;
3740
+                        //imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3741
+                        //ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3742
+                        //ImgScreenshotTwo.Visibility = Visibility.Visible;
3743
+                        //btnScreenshot.IsEnabled = false;
3741 3744
                     }
3742 3745
                     else
3743 3746
                     {
3744 3747
                         imgPPT.Source = null;
3745
-                        imgCanvas.Source = null;
3746 3748
                         imgDocumentation.Source = null;
3749
+                        imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3750
+                        APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
3751
+                        if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
3752
+                        {
3753
+                            //var group = IMG.FindResource("Imageview") as TransformGroup;
3754
+                            //#region 高低 缩放比例
3755
+                            //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
3756
+                            //{
3757
+                            //    var transform1 = group.Children[0] as ScaleTransform;
3758
+                            //    transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
3759
+                            //    transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
3760
+                            //    imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
3761
+                            //    imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
3762
+                            //}
3763
+                            //#endregion
3764
+                            //#region 坐标XY轴
3765
+                            //var transform = group.Children[1] as TranslateTransform;
3766
+                            //transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
3767
+                            //transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
3768
+                            //#endregion
3769
+                            mouseDown = false;
3770
+                            ImgXY();
3771
+
3772
+                        }
3747 3773
                     }
3748 3774
                 }
3775
+                else
3776
+                {
3777
+                    imgPPT.Source = null;
3778
+                    imgCanvas.Source = null;
3779
+                    imgDocumentation.Source = null;
3780
+                }
3749 3781
             }
3750 3782
         }
3751 3783
         private void ImgXY()
@@ -3782,91 +3814,18 @@ namespace XHWK.WKTool
3782 3814
             {
3783 3815
                 mouseDown = false;
3784 3816
                 HideAngleBorder();
3817
+
3818
+                //隐藏跳转
3819
+                txbCurrpage.Visibility = Visibility.Visible;
3820
+                txtJump.Visibility = Visibility.Hidden;
3821
+                BtnJumpPage.Visibility = Visibility.Hidden;
3822
+
3785 3823
                 //if (!APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation)
3786 3824
                 //{
3787 3825
                 //    ImgWG();
3788 3826
                 //}
3789 3827
                 APP.pageData.currpage += 1;
3790
-                myblackboard.changepage(APP.pageData.currpage - 1);
3791
-                scroMain.ScrollToVerticalOffset(0);
3792
-                if (btnImport.IsEnabled == true)
3793
-                {
3794
-                    ///截图可用
3795
-                    ImgScreenshot.Visibility = Visibility.Visible;
3796
-                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
3797
-                    btnScreenshot.IsEnabled = true;
3798
-                }
3799
-                if (APP.pageData.currpage <= APP.PageDrawList.Count)
3800
-                {
3801
-                    if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
3802
-                    {
3803
-                        APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
3804
-                    }
3805
-                    if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
3806
-                    {
3807
-                        if (APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation)
3808
-                        {
3809
-                            if ("ppt".Equals(APP.PageDrawList[APP.pageData.currpage - 1].Type))
3810
-                            {
3811
-                                imgCanvas.Source = null;
3812
-                                imgDocumentation.Source = null;
3813
-                                imgPPT.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3814
-                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3815
-                                ImgScreenshotTwo.Visibility = Visibility.Visible;
3816
-                                btnScreenshot.IsEnabled = false;
3817
-                            }
3818
-                            else
3819
-                            {
3820
-                                imgPPT.Source = null;
3821
-                                imgCanvas.Source = null;
3822
-                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3823
-                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3824
-                                ImgScreenshotTwo.Visibility = Visibility.Visible;
3825
-                                btnScreenshot.IsEnabled = false;
3826
-                            }
3827
-                            //imgCanvas.Source = null;
3828
-                            //imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3829
-                            //ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
3830
-                            //ImgScreenshotTwo.Visibility = Visibility.Visible;
3831
-                            //btnScreenshot.IsEnabled = false;
3832
-                        }
3833
-                        else
3834
-                        {
3835
-                            imgPPT.Source = null;
3836
-                            imgDocumentation.Source = null;
3837
-                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
3838
-                            APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
3839
-                            if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
3840
-                            {
3841
-                                //var group = IMG.FindResource("Imageview") as TransformGroup;
3842
-                                //#region 高低 缩放比例
3843
-                                //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
3844
-                                //{
3845
-                                //    var transform1 = group.Children[0] as ScaleTransform;
3846
-                                //    transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
3847
-                                //    transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
3848
-                                //    imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
3849
-                                //    imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
3850
-                                //}
3851
-                                //#endregion
3852
-                                //#region 坐标XY轴
3853
-                                //var transform = group.Children[1] as TranslateTransform;
3854
-                                //transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
3855
-                                //transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
3856
-                                //#endregion
3857
-                                mouseDown = false;
3858
-                                ImgXY();
3859
-
3860
-                            }
3861
-                        }
3862
-                    }
3863
-                    else
3864
-                    {
3865
-                        imgPPT.Source = null;
3866
-                        imgCanvas.Source = null;
3867
-                        imgDocumentation.Source = null;
3868
-                    }
3869
-                }
3828
+                JumpPageClick();
3870 3829
             }
3871 3830
         }
3872 3831
         /// <summary>
@@ -5006,5 +4965,83 @@ namespace XHWK.WKTool
5006 4965
             double proportion = 210.0 / 297.0;
5007 4966
             gridM.Height = gridM.ActualWidth / proportion;
5008 4967
         }
4968
+        /// <summary>
4969
+        /// 跳转页
4970
+        /// </summary>
4971
+        /// <param name="sender"></param>
4972
+        /// <param name="e"></param>
4973
+        private void txbCurrpage_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
4974
+        {
4975
+            if(e.ClickCount==2)
4976
+            {
4977
+                try
4978
+                {
4979
+                    if (int.Parse(txbCurrpage.Text) > 0)
4980
+                    {
4981
+                        txtJump.Text = txbCurrpage.Text;
4982
+                        txbCurrpage.Visibility = Visibility.Hidden;
4983
+                        txtJump.Visibility = Visibility.Visible;
4984
+                        BtnJumpPage.Visibility = Visibility.Visible;
4985
+                        txtJump.Focus();
4986
+                        txtJump.SelectAll();
4987
+                    }
4988
+                }
4989
+                catch (Exception)
4990
+                {
4991
+                }
4992
+            }
4993
+        }
4994
+        /// <summary>
4995
+        /// 确定跳转
4996
+        /// </summary>
4997
+        /// <param name="sender"></param>
4998
+        /// <param name="e"></param>
4999
+        private void BtnJumpPage_Click(object sender, RoutedEventArgs e)
5000
+        {
5001
+            int JumpPage = 0;
5002
+            try
5003
+            {
5004
+                JumpPage = int.Parse(txtJump.Text);
5005
+            }
5006
+            catch (Exception ex)
5007
+            {
5008
+                MessageWindow.Show("操作有误!请输入有效的页码!");
5009
+                return;
5010
+            }
5011
+            if(JumpPage<1)
5012
+            {
5013
+                JumpPage = 1;
5014
+            }
5015
+            if (JumpPage > int.Parse(txbTotalpage.Text))
5016
+            {
5017
+                JumpPage = int.Parse(txbTotalpage.Text);
5018
+            }
5019
+            #region 跳转
5020
+            APP.pageData.currpage = JumpPage;
5021
+            JumpPageClick();
5022
+            #endregion
5023
+
5024
+            txbCurrpage.Visibility = Visibility.Visible;
5025
+            txtJump.Visibility = Visibility.Hidden;
5026
+            BtnJumpPage.Visibility = Visibility.Hidden;
5027
+        }
5028
+        /// <summary>
5029
+        /// 只允许输入数字
5030
+        /// </summary>
5031
+        /// <param name="sender"></param>
5032
+        /// <param name="e"></param>
5033
+        private void txtJump_PreviewTextInput(object sender, TextCompositionEventArgs e)
5034
+        {
5035
+            Regex re = new Regex("[^0-9.-]+");
5036
+            e.Handled = re.IsMatch(e.Text);
5037
+        }
5038
+
5039
+        private void txtJump_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
5040
+        {
5041
+            if (e.Key == Key.Enter)
5042
+            {
5043
+                BtnJumpPage_Click(null, null);
5044
+            }
5045
+        }
5009 5046
     }
5010 5047
 }

Loading…
Cancel
Save