123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace PDF_Master.Views
- {
- /// <summary>
- /// BottomToolContent.xaml 的交互逻辑
- /// </summary>
- public partial class BottomToolContent : UserControl
- {
- public BottomToolContent()
- {
- InitializeComponent();
- }
- private void SetSinglePageCommand_Executed(object sender, ExecutedRoutedEventArgs e)
- {
- this.SinglePage_Btn.IsChecked = true;
- this.DoublePage_Btn.IsChecked = false;
- }
- private void SetDoublePageCommand_Executed(object sender, ExecutedRoutedEventArgs e)
- {
- this.SinglePage_Btn.IsChecked = false;
- this.DoublePage_Btn.IsChecked = true;
- }
- private void TextBoxEx_PreviewTextInput(object sender, TextCompositionEventArgs e)
- {
- Regex regex = new Regex("[^0-9^%]+"); // 限制仅允许数字和百分号
- e.Handled = regex.IsMatch(e.Text);
- }
- }
- }
|