Changes in Description
Add new Paramcontrol with Range Validation move Values from general to Etcher-Robot step Table Add File Extension to Save/Open File Dialog
This commit is contained in:
31
uniper_hmi/UniperHMI/Common/ParamControlIntRange.xaml.cs
Normal file
31
uniper_hmi/UniperHMI/Common/ParamControlIntRange.xaml.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Common;
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für AnalogValue.xaml
|
||||
/// </summary>
|
||||
public partial class ParamControlIntRange : UserControl
|
||||
{
|
||||
public bool IsReadonly { get; set; }
|
||||
|
||||
public ParamControlIntRange()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Unloaded += OnUnloaded;
|
||||
}
|
||||
|
||||
private void OnUnloaded(object? sender, EventArgs e)
|
||||
{
|
||||
var disposable = DataContext as IDisposable;
|
||||
disposable?.Dispose();
|
||||
}
|
||||
|
||||
private void NumberValidation(object sender, TextCompositionEventArgs e)
|
||||
{
|
||||
Regex regex = new("^[-+]?[0-9]*,?[0-9]+$");
|
||||
e.Handled = regex.IsMatch(e.Text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user