|
|
|
@ -1,8 +1,11 @@
|
|
|
|
|
using SlnMesnac.WPF.ViewModel;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
|
using SlnMesnac.Config;
|
|
|
|
|
using SlnMesnac.WPF.ViewModel;
|
|
|
|
|
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;
|
|
|
|
@ -21,6 +24,7 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class BaseConfigInfoPage : UserControl
|
|
|
|
|
{
|
|
|
|
|
private DebugConfig debugConfig = DebugConfig.Instance;
|
|
|
|
|
private BaseConfigInfoViewModel ViewModel;
|
|
|
|
|
public BaseConfigInfoPage()
|
|
|
|
|
{
|
|
|
|
@ -56,5 +60,27 @@ namespace SlnMesnac.WPF.Page
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void InputRFIDButton_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
string RFID = Microsoft.VisualBasic.Interaction.InputBox("请输入小包出口RFID:", "人工处理", "", -1, -1);
|
|
|
|
|
// 定义正则表达式模式
|
|
|
|
|
string pattern = @"^JYHB\d{8}$";
|
|
|
|
|
|
|
|
|
|
// 创建正则表达式对象
|
|
|
|
|
Regex regex = new Regex(pattern);
|
|
|
|
|
|
|
|
|
|
// 校验输入字符串是否符合模式
|
|
|
|
|
if (regex.IsMatch(RFID))
|
|
|
|
|
{
|
|
|
|
|
debugConfig.MdjOutRFID = RFID;
|
|
|
|
|
MessageBox.Show("保存成功");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show($"输入的RFID:{RFID}无效,JYHB开头后接8位数字!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|