2026-06-05 13:44:39 +09:00

30 lines
855 B
C#

using Aurora;
using System.Text.RegularExpressions;
using System.Windows.Controls;
using System.Windows.Input;
namespace AuroraLaser.Amplitude
{
/// <summary>
/// UCLaserController.xaml에 대한 상호 작용 논리
/// </summary>
public partial class UCLaserController : UserControl
{
UCLaserControllerViewModel m_ViewModel;
public UCLaserController(IAuroraEnvironment auroraEnv, string deviceId, string recipeId)
{
InitializeComponent();
m_ViewModel = new UCLaserControllerViewModel(auroraEnv, deviceId, recipeId);
DataContext = m_ViewModel;
}
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
Regex regex = new Regex("[^0-9].+");
e.Handled = regex.IsMatch(e.Text);
}
}
}