mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Shared UI - Flattened namespaces Shared UI - General housekeeping Project - Code cleanup
20 lines
630 B
C#
20 lines
630 B
C#
using System.Text.RegularExpressions;
|
|
using System.Windows.Input;
|
|
using Artemis.Core.DataModelExpansions;
|
|
using Artemis.UI.Shared;
|
|
|
|
namespace Artemis.UI.DataModelVisualization.Input
|
|
{
|
|
public class IntDataModelInputViewModel : DataModelInputViewModel<int>
|
|
{
|
|
public IntDataModelInputViewModel(DataModelPropertyAttribute description, int initialValue) : base(description, initialValue)
|
|
{
|
|
}
|
|
|
|
public void NumberValidationTextBox(object sender, TextCompositionEventArgs e)
|
|
{
|
|
var regex = new Regex("[^0-9]+");
|
|
e.Handled = regex.IsMatch(e.Text);
|
|
}
|
|
}
|
|
} |