only accept hex characters for network id

This commit is contained in:
Grant Limberg 2015-10-23 15:49:04 -07:00
parent b7b973624a
commit 7e635d37ad
2 changed files with 5 additions and 5 deletions

View file

@ -2,6 +2,7 @@
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;
@ -51,11 +52,10 @@ namespace WinUI
}
private void joinNetworkID_TextChanged(object sender, TextChangedEventArgs e)
private void OnNetworkEntered(object sender, TextCompositionEventArgs e)
{
Regex regex = new Regex("[0-9a-fxA-FX]");
e.Handled = !regex.IsMatch(e.Text);
}
}
}