|
|
|
@ -838,18 +838,31 @@ namespace Rs.MotionPlat
|
|
|
|
|
private void txtLotName_KeyUp(object sender, KeyEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
StringBuilder msg = new StringBuilder();
|
|
|
|
|
string reg = "[\\w,&,\\.]";
|
|
|
|
|
//string reg = "[\\w,&,\\.]";
|
|
|
|
|
//string reg = "([a-z 0-9 A-Z]*_{0,1})";
|
|
|
|
|
string reg = "\\w";
|
|
|
|
|
TextBox textBox = (TextBox)sender;
|
|
|
|
|
string text=textBox.Text;
|
|
|
|
|
foreach(char c in text.ToCharArray())
|
|
|
|
|
string text = textBox.Text;
|
|
|
|
|
char[] charData = text.ToCharArray();
|
|
|
|
|
for (int i=0;i< charData.Length;i++)
|
|
|
|
|
{
|
|
|
|
|
if(Regex.IsMatch(c.ToString(), reg))
|
|
|
|
|
if (Regex.IsMatch(charData[i].ToString(), reg))
|
|
|
|
|
{
|
|
|
|
|
msg.Append(c);
|
|
|
|
|
if(i>0 && charData[i]=='_')
|
|
|
|
|
{
|
|
|
|
|
if (charData[i] != charData[i-1])
|
|
|
|
|
{
|
|
|
|
|
msg.Append(charData[i].ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
msg.Append(charData[i].ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
textBox.Text = msg.ToString();
|
|
|
|
|
//textBox.Select(msg.Length, 0);
|
|
|
|
|
textBox.Select(msg.Length, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void timer3_Tick_1(object sender, EventArgs e)
|
|
|
|
|