Commit 16921313 LN

出入库时需要检测叉子是否有料

1 个父辈 a547da51
......@@ -28,7 +28,7 @@
<add key="CameraName" value="GigE:acA3800-10gc (23124327)#GigE:acA3800-10gc (23172285)" />
<!--二维码类型列表配置,用#分割-->
<add key="CodeType" value="QR Code" />
<add key="CodeType" value="Data Matrix ECC 200#QR Code" />
<add key="CodeType" value="Data Matrix ECC 200#QR Code#PDF417" />
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" />
<add key="InOutDefaultPosition" value="50000000" />
......
......@@ -51,7 +51,7 @@ namespace OnlineStore.AutoInOutStore
LogUtil.info("版本号[" + version + "][" + str + "][" + GetCodeNum() + "]");
return str;
}
internal static string GetCodeNum(string codeName = "RC1252-AutoInOutStore")
internal static string GetCodeNum(string codeName = "RC1252-AutoInOutStore-N")
{
byte[] byteArray = System.Text.Encoding.ASCII.GetBytes(codeName);
string result = "";
......
......@@ -11,20 +11,20 @@ using System.Reflection;
using System.Resources;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace OnlineStore.AutoInOutStore
{
public class ResourceCulture
{
public static bool ShowLog = false ;
public static bool ShowLog = false;
public static string China = "zh-CN";
public static string English = "en-US";
public static string German = "ge-DE";
public static string Japanese = "ja-JP";
public static string Japanese = "ja-JP";
private static ResourceManager rm = null;
public static string CurrLanguage = "zh-CN";
public static Dictionary<string, string> defaultMap = new Dictionary<string, string>();
/// <summary>
/// Set current culture by name
......@@ -45,8 +45,10 @@ namespace OnlineStore.AutoInOutStore
}
CurrLanguage = name;
Thread.CurrentThread.CurrentCulture = new CultureInfo(name);
LoadAllRes();
}
public static void LoaAllRes()
public static void LoadAllRes()
{
if (rm == null)
{
......@@ -55,22 +57,24 @@ namespace OnlineStore.AutoInOutStore
//CultureInfo ci = Thread.CurrentThread.CurrentCulture;
Dictionary<string, string> chinaMap = GetRMap(China);
Dictionary<string, string> englishMap = GetRMap(English);
List<string> keyList = new List<string>(chinaMap.Keys);
keyList = (from m in keyList orderby m select m).ToList<string>();
List<string> resulList = new List<string>();
foreach(string key in chinaMap.Keys)
foreach (string key in keyList)
{
string china = chinaMap[key];
string english = "";
string english = "";
englishMap.TryGetValue(key, out english);
if (String.IsNullOrEmpty(english))
{
english = "";
}
resulList.Add(key + "," + china.Replace(',', '&') + "," + english.Replace(',', '&'));
resulList.Add(key + "," + china.Replace(',', '&') + "," + english.Replace(',', '&'));
}
File.WriteAllLines("D:\\storeResource.csv", resulList.ToArray());
}
private static Dictionary<string ,string > GetRMap(string lan)
private static Dictionary<string, string> GetRMap(string lan)
{
Dictionary<string, string> chinaMap = new Dictionary<string, string>();
CultureInfo ci = new CultureInfo(lan);
......@@ -98,7 +102,7 @@ namespace OnlineStore.AutoInOutStore
return CurrLanguage;
}
private static Assembly assembly = Assembly.GetExecutingAssembly();
private static Assembly assembly = Assembly.GetExecutingAssembly();
public static string GetString(string id)
{
return GetString(id, id);
......@@ -115,13 +119,13 @@ namespace OnlineStore.AutoInOutStore
}
//CultureInfo ci = Thread.CurrentThread.CurrentCulture;
CultureInfo ci = new CultureInfo(CurrLanguage);
strCurLanguage = rm.GetString(id, ci).Trim();
strCurLanguage = rm.GetString(id, ci).Trim();
if (strCurLanguage.Equals("") && (!defaultStr.Equals("")))
{
strCurLanguage = defaultStr;
NoIdLog(id, defaultStr);
}
}
catch (Exception ex)
{
......@@ -175,7 +179,7 @@ namespace OnlineStore.AutoInOutStore
{
return GetStringByLan(CurrLanguage, id, defaultStr, param);
}
private static void NoIdLog(string id, string defaultStr)
{
......@@ -195,10 +199,10 @@ namespace OnlineStore.AutoInOutStore
{
string value = defaultMap[key];
LogUtil.info(" 缺少文字配置[" + key + "] 默认值[" + value + "]");
}
}
LogUtil.info("结束打印缺少的文字配置");
}
private static string spiltStr = "_";
private static string spiltStr = "_";
private static string Text = "Text";
public static string GetIdStr(string className, string controlName, string propertyName)
{
......@@ -208,11 +212,11 @@ namespace OnlineStore.AutoInOutStore
{
return className + spiltStr + propertyName;
}
public static string GetTextIdStr(string className, string controlName )
public static string GetTextIdStr(string className, string controlName)
{
return className + spiltStr + controlName + spiltStr + Text;
}
public static string GetTextIdStr(string className )
public static string GetTextIdStr(string className)
{
return className + spiltStr + Text;
}
......@@ -229,7 +233,7 @@ namespace OnlineStore.AutoInOutStore
/// </summary>
public static string OpenComFail = "OpenComFail";
/// <summary>
/// 请先启动料仓
/// </summary>
......@@ -271,7 +275,7 @@ namespace OnlineStore.AutoInOutStore
/// </summary>
public static string AutoEnd = "AutoEnd";
/// <summary>
/// 前门未关
/// </summary>
......@@ -300,90 +304,90 @@ namespace OnlineStore.AutoInOutStore
/// <summary>
/// 此设备不支持单个入库
/// </summary>
public static string CanotSingleInStore = "CanotSingleInStore";
public static string CanotSingleInStore = "CanotSingleInStore";
/// <summary>
///叉子不在待机位,请先将叉子退回待机位
/// </summary>
public static string InoutNotOk = "InoutNotOk";
public static string InoutNotOk = "InoutNotOk";
/// <summary>
///警告(叉子在待机位时,才能移动升降轴和旋转轴)
/// </summary>
public static string InoutWarn = "InoutWarn";
public static string InoutWarn = "InoutWarn";
/// <summary>
///无报警,无出入库或者重置操作时,才可以回待机点
/// </summary>
public static string CanotBack = "CanotBack";
public static string CanotBack = "CanotBack";
/// <summary>
///请先关闭批量上下料门
/// </summary>
public static string PCloseDoor = "PCloseDoor";
public static string PCloseDoor = "PCloseDoor";
/// <summary>
///请输入正确的密码
/// </summary>
public static string PWPwd = "PWPwd";
public static string PWPwd = "PWPwd";
/// <summary>
///忙碌中,无法打开门锁
/// </summary>
public static string CnotOpen = "CnotOpen";
public static string CnotOpen = "CnotOpen";
/// <summary>
///批量入库失败:请先关闭上料机构
/// </summary>
public static string batchInError = "batchInError";
public static string batchInError = "batchInError";
/// <summary>
///批量入库失败:叉子料盘检测有料,请检查后再入库
/// </summary>
public static string batchInError2 = "batchInError2";
public static string batchInError2 = "batchInError2";
/// <summary>
///取出料盘失败:无料盘可取
/// </summary>
public static string GetError = "GetError";
public static string GetError = "GetError";
/// <summary>
///取出料盘失败:忙碌中,无法打开门锁
/// </summary>
public static string GetError2 = "GetError2";
public static string GetError2 = "GetError2";
/// <summary>
///锁门失败:请先关闭上料机构
/// </summary>
public static string CloseError = "CloseError";
public static string CloseError = "CloseError";
/// <summary>
///已确认料盘已手动拿出
/// </summary>
public static string TakeTrayOut = "TakeTrayOut";
public static string TakeTrayOut = "TakeTrayOut";
/// <summary>
///未检测到气压信号
/// </summary>
public static string NoAIr = "NoAIr";
public static string NoAIr = "NoAIr";
/// <summary>
///料盘高度
/// </summary>
public static string trayHeight = "trayHeight";
public static string trayHeight = "trayHeight";
/// <summary>
///负限位
/// </summary>
public static string FuLimit = "FuLimit";
public static string FuLimit = "FuLimit";
/// <summary>
///正限位
/// </summary>
public static string ZhLimit = "ZhLimit";
public static string ZhLimit = "ZhLimit";
/// <summary>
///上料轴运动停止
/// </summary>
public static string BatchStop = "BatchStop";
public static string BatchStop = "BatchStop";
/// <summary>
///扫码结束
/// </summary> public static string ScanOk = "ScanOk";
/// <summary>
///操作人员拿走料盘
/// </summary>
public static string TakeTrayGo = "TakeTrayGo";
public static string TakeTrayGo = "TakeTrayGo";
/// <summary>
///等待送料结束
/// </summary>
public static string WaitEnd = "WaitEnd";
public static string WaitEnd = "WaitEnd";
/// <summary>
///吸盘吸料失败
/// </summary>
public static string XiLiaoError = "XiLiaoError";
public static string XiLiaoError = "XiLiaoError";
/// <summary>
///伺服OFF
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!