屠宰场客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1004 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BO.BarCodeScan
{
public class BwpBarCodeUtil
{
/// <summary>
/// 根据按键获取字符串
/// </summary>
/// <param name="e"></param>
/// <returns></returns>
public static string GetStringByKeyKeyEventArgs(KeyEventArgs e)
{
if (e.KeyData == (Keys.D7 | Keys.Shift))
{
return "&";
}
if (e.KeyData == (Keys.Oem1 | Keys.Shift))
{
return ":";
}
if (e.KeyData == (Keys.Oem2))
{
return "/";
}
if (e.KeyData == (Keys.OemPeriod))
{
return ".";
}
if (e.KeyData == (Keys.Oem2 | Keys.Shift))
{
return "?";
}
if (e.KeyData == (Keys.Oemplus))
{
return "=";
}
char keyvalue = (char)e.KeyValue;
var str = keyvalue.ToString();
return str;
}
}
}