only accept hex characters for network id
This commit is contained in:
parent
b7b973624a
commit
7e635d37ad
2 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue