|
@@ -7,6 +7,7 @@ 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;
|
|
@@ -1079,5 +1080,11 @@ namespace PDF_Master.Views.PageEdit
|
|
|
timer.Tick += Timer_Tick;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void CmbPageRange_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
|
|
+ {
|
|
|
+ Regex regex = new Regex("[^0-9,-]+"); // 限制仅允许数字、逗号和横杠
|
|
|
+ e.Handled = regex.IsMatch(e.Text);
|
|
|
+ }
|
|
|
}
|
|
|
}
|