Commit 5e131a5d LN

部分中英文完善。条码匹配修改。

1 个父辈 fb910b0b
...@@ -57,19 +57,19 @@ namespace TSA_V.DeviceLibrary ...@@ -57,19 +57,19 @@ namespace TSA_V.DeviceLibrary
} }
public static string StartChangeWidth(int targetWidth, int targetPosition, int timeOutSeconds = 600) public static string StartChangeWidth(int targetWidth, int targetPosition, int timeOutSeconds = 600)
{ {
string result = "";
if (targetWidth <= 0) if (targetWidth <= 0)
{ {
return "宽度无效"; return result =ResourceControl.GetString(ResourceControl.WidthInvalid, "宽度无效");
} }
if (!CanStartChWidth()) if (!CanStartChWidth())
{ {
return "启动调宽失败"; return result = ResourceControl.GetString(ResourceControl.ChangeWFail, "启动调宽失败");
} }
if (!IsStop) if (!IsStop)
{ {
return "移栽调宽中"; return result = ResourceControl.GetString(ResourceControl.InChangeW, "已在调宽中");
} }
string result = "";
IsStop = false; IsStop = false;
string logName = "轨道调宽[" + targetWidth + "][" + targetPosition + "][" + timeOutSeconds + "]:"; string logName = "轨道调宽[" + targetWidth + "][" + targetPosition + "][" + timeOutSeconds + "]:";
try try
...@@ -97,12 +97,12 @@ namespace TSA_V.DeviceLibrary ...@@ -97,12 +97,12 @@ namespace TSA_V.DeviceLibrary
Thread.Sleep(200); Thread.Sleep(200);
if (IsStop) if (IsStop)
{ {
result = "用户中止"; result = ResourceControl.GetString(ResourceControl.UserStop, "用户中止");
break; break;
} }
else if (stopwatch.ElapsedMilliseconds / 1000 > timeOutSeconds) else if (stopwatch.ElapsedMilliseconds / 1000 > timeOutSeconds)
{ {
result = "等待原点完成超时"; result = ResourceControl.GetString(ResourceControl.HomeMoveTimeout, "等待原点完成超时");
break; break;
} }
else if (PUSICANControl.IsHomeEnd(LWidthManager.Line_NodeAddr)) else if (PUSICANControl.IsHomeEnd(LWidthManager.Line_NodeAddr))
...@@ -131,13 +131,13 @@ namespace TSA_V.DeviceLibrary ...@@ -131,13 +131,13 @@ namespace TSA_V.DeviceLibrary
if (IsStop) if (IsStop)
{ {
IsStop = true; IsStop = true;
result = "用户中止"; result = ResourceControl.GetString(ResourceControl.UserStop, "用户中止");
break; break;
} }
else if (stopwatch.ElapsedMilliseconds / 1000 > timeOutSeconds) else if (stopwatch.ElapsedMilliseconds / 1000 > timeOutSeconds)
{ {
IsStop = true; IsStop = true;
result = "等待目标位置:" + DefaultPosition; result = ResourceControl.GetString(ResourceControl.WaitChangeWOk, "等待目标位置{0}超时", DefaultPosition);
break; break;
} }
else else
......
...@@ -136,5 +136,30 @@ namespace TSA_V ...@@ -136,5 +136,30 @@ namespace TSA_V
/// 线体宽度 /// 线体宽度
/// </summary> /// </summary>
public static string LineWidth = "LineWidth"; public static string LineWidth = "LineWidth";
/// <summary>
/// 启动调宽失败
/// </summary>
public static string ChangeWFail = "ChangeWFail";
/// <summary>
/// 宽度无效
/// </summary>
public static string WidthInvalid = "WidthInvalid";
/// <summary>
/// 已在调宽中
/// </summary>
public static string InChangeW = "InChangeW";
/// <summary>
/// 用户中止
/// </summary>
public static string UserStop = "UserStop";
/// <summary>
/// 等待原点完成超时
/// </summary>
public static string HomeMoveTimeout = "HomeMoveTimeout";
/// <summary>
/// 等待目标位置{0}超时
/// </summary>
public static string WaitChangeWOk = "WaitChangeWOk";
} }
} }
...@@ -124,7 +124,7 @@ namespace TSA_V.DeviceLibrary ...@@ -124,7 +124,7 @@ namespace TSA_V.DeviceLibrary
public static string GetTime() public static string GetTime()
{ {
string date = DateTime.Now.ToString("HH:mm"); string date = DateTime.Now.ToString("HH:mm");
return "" + date + "ALARM "; return "" + date + " ALARM ";
} }
public static string StartRun() public static string StartRun()
{ {
...@@ -288,11 +288,6 @@ namespace TSA_V.DeviceLibrary ...@@ -288,11 +288,6 @@ namespace TSA_V.DeviceLibrary
} }
} }
} }
//if (!PUSICANControl.IsHomeEnd(LWidthManager.Line_NodeAddr))
//{
// timeOutMsg = ResourceControl.GetString(ResourceControl.RNodeGoHome, " 调宽轴[{0}]原点返回完成", LWidthManager.Line_NodeAddr);
// isAllOk = false;
//}
if (isAllOk.Equals(true)) if (isAllOk.Equals(true))
{ {
...@@ -306,7 +301,6 @@ namespace TSA_V.DeviceLibrary ...@@ -306,7 +301,6 @@ namespace TSA_V.DeviceLibrary
} }
} }
// PuHomeMove(LWidthManager.Line_NodeAddr, LWidthManager.DefaultPosition, 0);
LogUtil.info(Name + "重置中:所有旋转轴原点返回完成,开始到待机点:" + TSAVBean.RotateNode_DefaultPosition); LogUtil.info(Name + "重置中:所有旋转轴原点返回完成,开始到待机点:" + TSAVBean.RotateNode_DefaultPosition);
resetStep = ResetStep.RNodeOnline_4; resetStep = ResetStep.RNodeOnline_4;
LastResetChangeTime = DateTime.Now; LastResetChangeTime = DateTime.Now;
...@@ -343,7 +337,7 @@ namespace TSA_V.DeviceLibrary ...@@ -343,7 +337,7 @@ namespace TSA_V.DeviceLibrary
} }
if (isTimeOut) if (isTimeOut)
{ {
WarnMsg = GetTime() + ResourceControl.GetString(ResourceControl.TimeOutMsg, "重置等待[{0}]超时,已等待:{1}分", timeOutMsg, Math.Round(span.TotalMinutes, 1)); WarnMsg = GetTime() + ResourceControl.GetString(ResourceControl.TimeOutMsg, "重置等待[{0}]超时{1}分", timeOutMsg, Math.Round(span.TotalMinutes, 1));
LogUtil.error(Name + WarnMsg); LogUtil.error(Name + WarnMsg);
} }
} }
......
...@@ -123,7 +123,7 @@ namespace TSA_V.DeviceLibrary ...@@ -123,7 +123,7 @@ namespace TSA_V.DeviceLibrary
//当等待超过一分钟时,需要打印提示 //当等待超过一分钟时,需要打印提示
if (span.TotalSeconds > LineStep.TimeOutSeconds) if (span.TotalSeconds > LineStep.TimeOutSeconds)
{ {
WarnMsg = GetTime() + ResourceControl.GetString(ResourceControl.LineTimeOutMsg, "流水线转动中,等待【{0}】超时 已等待[{1}]秒", waitMsg, Math.Round(span.TotalSeconds, 0)); WarnMsg = GetTime() + ResourceControl.GetString(ResourceControl.LineTimeOutMsg, "流水线转动{0}-{1},等待【{2}】超时[{3}]秒", LineStep.moveType,LineStep.lineStep, waitMsg, Math.Round(span.TotalSeconds, 0));
LogUtil.error(WarnMsg); LogUtil.error(WarnMsg);
} }
} }
......
...@@ -38,18 +38,11 @@ namespace TSA_V ...@@ -38,18 +38,11 @@ namespace TSA_V
if (comList.Count > 0) if (comList.Count > 0)
{ {
Dictionary<string, string> namePositonMap = new Dictionary<string, string>(); Dictionary<string, string> namePositonMap = new Dictionary<string, string>();
Dictionary<string, string> posiitonNameMap = new Dictionary<string, string>();
foreach (ComponetInfo com in comList) foreach (ComponetInfo com in comList)
{ {
if (!namePositonMap.ContainsKey(com.ComponentName)) if (!namePositonMap.ContainsKey(com.ComponentName))
{ {
//验证库位是否存在过
List<string> positinList = new List<string>();
if (positinList.Contains(com.ComponentName))
{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.CheckFile,"两个不同的元器件中都配置在库位【{0}】中,请检查文件",com.PositionNum));
comList = new List<ComponetInfo>();
return ;
}
namePositonMap.Add(com.ComponentName, com.PositionNum); namePositonMap.Add(com.ComponentName, com.PositionNum);
} }
else else
...@@ -58,21 +51,40 @@ namespace TSA_V ...@@ -58,21 +51,40 @@ namespace TSA_V
if (!prePosition.Equals(com.PositionNum)) if (!prePosition.Equals(com.PositionNum))
{ {
result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImport, result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SureImport,
"元器件【{0}】配置了两个位置【{1}】和【{2}】,是否确定导入?",com.ComponentName,prePosition,com.PositionNum), "", "元器件【{0}】配置了两个位置【{1}】和【{2}】,是否确定导入?", com.ComponentName, prePosition, com.PositionNum), "",
MessageBoxButtons.YesNoCancel); ; MessageBoxButtons.OKCancel); ;
if (!result.Equals(DialogResult.Yes)) if (!result.Equals(DialogResult.OK))
{
comList = new List<ComponetInfo>();
return;
}
}
}
if (posiitonNameMap.ContainsKey(com.PositionNum))
{
string name = posiitonNameMap[com.PositionNum];
if (!name.Equals(com.ComponentName))
{
result = MessageBox.Show(ResourceCulture.GetString(ResourceCulture.CheckFile, "两个元器件【{0}】和【{1}】都配置在位置【{2}】中,是否确定导入", name,com.ComponentName, com.PositionNum) ,"",
MessageBoxButtons.OKCancel); ;
if (!result.Equals(DialogResult.OK))
{ {
comList = new List<ComponetInfo>(); comList = new List<ComponetInfo>();
return ; return;
} }
} }
} }
else
{
posiitonNameMap.Add(com.PositionNum, com.ComponentName);
}
} }
this.txtBomFilePath.Text = fileName; this.txtBomFilePath.Text = fileName;
} }
else else
{ {
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SelectRightFile,"请选择正确的文件(文件格式可以通过下载模板获得)")); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.SelectRightFile, "请选择正确的文件(文件格式可以通过下载模板获得)"));
} }
} }
} }
......
...@@ -21,6 +21,7 @@ namespace TSA_V ...@@ -21,6 +21,7 @@ namespace TSA_V
{ {
public static FrmBoardList instance = new FrmBoardList(); public static FrmBoardList instance = new FrmBoardList();
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private bool LoadOk = false;
private FrmBoardList( ) private FrmBoardList( )
{ {
InitializeComponent(); InitializeComponent();
...@@ -34,6 +35,7 @@ namespace TSA_V ...@@ -34,6 +35,7 @@ namespace TSA_V
} }
public void LoadCom() public void LoadCom()
{ {
LoadOk = false;
cmbBoardList.DataSource = null; cmbBoardList.DataSource = null;
cmbBoardList.DataSource = BoardManager.boardList; cmbBoardList.DataSource = BoardManager.boardList;
cmbBoardList.DisplayMember = "boardName"; cmbBoardList.DisplayMember = "boardName";
...@@ -65,6 +67,7 @@ namespace TSA_V ...@@ -65,6 +67,7 @@ namespace TSA_V
leftCount.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式 leftCount.TextAlign = HorizontalAlignment.Left; //设置列的对齐方式
this.listPoint.Columns.Add(leftCount); //将列头添加到ListView控件。 this.listPoint.Columns.Add(leftCount); //将列头添加到ListView控件。
LoadOk = true;
LoadBoard(); LoadBoard();
} }
...@@ -96,31 +99,49 @@ namespace TSA_V ...@@ -96,31 +99,49 @@ namespace TSA_V
} }
} }
private int pointHight = 14; private int pointHight = 14;
private void btnLook_Click(object sender, EventArgs e) //private void btnLook_Click(object sender, EventArgs e)
{ //{
LoadBoard(); // LoadBoard();
this.panel1.Refresh(); // this.panel1.Refresh();
} //}
private void LoadBoard() private void LoadBoard()
{ {
if (!LoadOk)
{
return;
}
try
{
LoadOk = false;
if (cmbBoardList.Text != "" && cmbBoardList.SelectedIndex >= 0) if (cmbBoardList.Text != "" && cmbBoardList.SelectedIndex >= 0)
{ {
BoardInfo board = (BoardInfo)cmbBoardList.SelectedItem; BoardInfo board = (BoardInfo)cmbBoardList.SelectedItem;
groupBox2.Text = "【"+board.boardName+"】"; groupBox2.Text = "【" + board.boardName + "】";
txtBomName.Text = board.bomName; txtBomName.Text = board.bomName;
txtLength.Text = board.boardLength.ToString(); txtLength.Text = board.boardLength.ToString();
txtWidth.Text = board.boardWidth.ToString(); txtWidth.Text = board.boardWidth.ToString();
txtPointCount.Text = board.smtList.Count.ToString(); txtPointCount.Text = board.smtList.Count.ToString();
txtMianji.Text = (board.boardLength * board.boardWidth).ToString(); txtMianji.Text = (board.boardLength * board.boardWidth).ToString();
loadPictureBoxSize(board);
LoadPoint(board); LoadPoint(board);
loadPictureBoxSize(board);
FrmProjectorScreen.instance.ShowPoint(false, board.smtList.ToArray()); FrmProjectorScreen.instance.ShowPoint(false, board.smtList.ToArray());
} }
} }
catch (Exception ex)
{
}
finally
{
LoadOk = true;
}
}
int preId = -1; int preId = -1;
private void LoadPoint(BoardInfo board) private void LoadPoint(BoardInfo board)
{ {
...@@ -156,6 +177,7 @@ namespace TSA_V ...@@ -156,6 +177,7 @@ namespace TSA_V
i++; i++;
} }
} }
private void btnNew_Click(object sender, EventArgs e) private void btnNew_Click(object sender, EventArgs e)
...@@ -237,14 +259,12 @@ namespace TSA_V ...@@ -237,14 +259,12 @@ namespace TSA_V
display.ShowName = false ; display.ShowName = false ;
display.ImageNormal = true ; display.ImageNormal = true ;
display.LoadPoint(width, height, pointList); display.LoadPoint(width, height, pointList);
} }
private void FrmBoardList_Shown(object sender, EventArgs e) private void FrmBoardList_Shown(object sender, EventArgs e)
{ {
//SetSkin(this); //SetSkin(this);
LoadBoard(); //LoadBoard();
if ((BoardManager.boardList.Count <= 0) && (LoadCSVLibrary.CSVReaderBomManager.allComMap.Count <= 0)) if ((BoardManager.boardList.Count <= 0) && (LoadCSVLibrary.CSVReaderBomManager.allComMap.Count <= 0))
{ {
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ImportComList, "请先导入元器件库!")); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ImportComList, "请先导入元器件库!"));
...@@ -355,6 +375,8 @@ namespace TSA_V ...@@ -355,6 +375,8 @@ namespace TSA_V
private void listPoint_SelectedIndexChanged(object sender, EventArgs e) private void listPoint_SelectedIndexChanged(object sender, EventArgs e)
{ {
if (LoadOk)
{
if (listPoint.SelectedItems != null && listPoint.SelectedItems.Count > 0) if (listPoint.SelectedItems != null && listPoint.SelectedItems.Count > 0)
{ {
int index = listPoint.SelectedItems[0].Index; int index = listPoint.SelectedItems[0].Index;
...@@ -363,4 +385,5 @@ namespace TSA_V ...@@ -363,4 +385,5 @@ namespace TSA_V
} }
} }
} }
}
} }
...@@ -65,7 +65,7 @@ namespace TSA_V ...@@ -65,7 +65,7 @@ namespace TSA_V
LogUtil.info("点击 轨道调宽:【" + w + "】【" + p + "】"); LogUtil.info("点击 轨道调宽:【" + w + "】【" + p + "】");
if (!LWidthManager.CanStartChWidth()) if (!LWidthManager.CanStartChWidth())
{ {
MessageBox.Show("启动调宽失败" ); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWFail, "启动调宽失败"));
return; return;
} }
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
...@@ -74,11 +74,11 @@ namespace TSA_V ...@@ -74,11 +74,11 @@ namespace TSA_V
LogUtil.info("调宽" + w + "=" + p + "结束:" + result); LogUtil.info("调宽" + w + "=" + p + "结束:" + result);
if (String.IsNullOrEmpty(result)) if (String.IsNullOrEmpty(result))
{ {
MessageBox.Show("调宽" + w + "=" + p + "完成" ); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWOk, "调宽{0}={1}完成", w, p));
} }
else else
{ {
MessageBox.Show("调宽" + w + "=" + p + "结束:" + result); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWEnd, "调宽{0}={1}结束:{2}", w, p, result));
} }
}); });
} }
......
...@@ -839,7 +839,7 @@ ...@@ -839,7 +839,7 @@
<value>WRITE POSITION NAME</value> <value>WRITE POSITION NAME</value>
</data> </data>
<data name="CheckFile" xml:space="preserve"> <data name="CheckFile" xml:space="preserve">
<value>TWO DIFFERENT COMPONENTS IN POSITION【{0}】. PLEASE CHECK</value> <value>BOTH [{0}] AND [{1}] ARE CONFIGURED IN LOCATION [{2}], CONFIRM TO IMPORT?</value>
</data> </data>
<data name="SureImport" xml:space="preserve"> <data name="SureImport" xml:space="preserve">
<value>COMPONENT【{0}】IN TWO POSITION【{1}】AND【{2}】.  CONFIRM TO IMPORT?</value> <value>COMPONENT【{0}】IN TWO POSITION【{1}】AND【{2}】.  CONFIRM TO IMPORT?</value>
...@@ -1367,7 +1367,7 @@ ...@@ -1367,7 +1367,7 @@
<value>Length</value> <value>Length</value>
</data> </data>
<data name="LineTimeOutMsg" xml:space="preserve"> <data name="LineTimeOutMsg" xml:space="preserve">
<value>Waiting [{0}] timeout waiting [{1}] seconds in pipeline rotation</value> <value>Pipeline rotation {0}-{1}, waiting for [{2}] timeout [{3}] seconds</value>
</data> </data>
<data name="RNodeGoHome" xml:space="preserve"> <data name="RNodeGoHome" xml:space="preserve">
<value>The rotation axis [{0}] is complete</value> <value>The rotation axis [{0}] is complete</value>
...@@ -1382,7 +1382,7 @@ ...@@ -1382,7 +1382,7 @@
<value>Received emergency stop signal, stop all movement, equipment disconnection</value> <value>Received emergency stop signal, stop all movement, equipment disconnection</value>
</data> </data>
<data name="TimeOutMsg" xml:space="preserve"> <data name="TimeOutMsg" xml:space="preserve">
<value>Reset waiting [{0}] timeout, waiting: {1} score</value> <value>Reset wait for [{0}] timeout {1} minutes</value>
</data> </data>
<data name="WaitTimeOutMsg" xml:space="preserve"> <data name="WaitTimeOutMsg" xml:space="preserve">
<value>In assembly, waiting for [{0}] timeout has waited for [{1}] seconds</value> <value>In assembly, waiting for [{0}] timeout has waited for [{1}] seconds</value>
...@@ -2364,4 +2364,32 @@ ...@@ -2364,4 +2364,32 @@
</data> </data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> Disable the side brake cylinder </value> </data> <data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> Disable the side brake cylinder </value> </data>
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> Disable bottom cylinder </value> </data> <data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> Disable bottom cylinder </value> </data>
<data name="ChangeWEnd" xml:space="preserve">
<value>Adjust width {0}={1} End: {2}</value>
</data>
<data name="ChangeWFail" xml:space="preserve">
<value>Failed to start widening</value>
</data>
<data name="ChangeWOk" xml:space="preserve">
<value>Adjust width {0}={1} completed</value>
</data>
<data name="HomeMoveTimeout" xml:space="preserve">
<value>Timeout waiting for the origin to complete</value>
</data>
<data name="InChangeW" xml:space="preserve">
<value>It is already being broadened</value>
</data>
<data name="SureChangeWidth" xml:space="preserve">
<value>Current width [{0}], target width [{1}], whether to start adjusting the width?</value>
</data>
<data name="UserStop" xml:space="preserve">
<value>Users to suspend</value>
</data>
<data name="WaitChangeWOk" xml:space="preserve">
<value>Waiting for the target location {0} timed out</value>
</data>
<data name="WidthInvalid" xml:space="preserve">
<value>The width of the invalid</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -838,7 +838,7 @@ ...@@ -838,7 +838,7 @@
<value>请先输入元器件库名称</value> <value>请先输入元器件库名称</value>
</data> </data>
<data name="CheckFile" xml:space="preserve"> <data name="CheckFile" xml:space="preserve">
<value>两个不同的元器件中都配置在库位【{0}】中,请检查文件</value> <value>两个元器件【{0}】和【{1}】都配置在位置【{2}】中,是否确定导入?</value>
</data> </data>
<data name="SureImport" xml:space="preserve"> <data name="SureImport" xml:space="preserve">
<value>元器件【{0}】配置了两个位置【{1}】和【{2}】,是否确定导入?</value> <value>元器件【{0}】配置了两个位置【{1}】和【{2}】,是否确定导入?</value>
...@@ -1351,7 +1351,7 @@ ...@@ -1351,7 +1351,7 @@
<value>长度→</value> <value>长度→</value>
</data> </data>
<data name="LineTimeOutMsg" xml:space="preserve"> <data name="LineTimeOutMsg" xml:space="preserve">
<value>流水线转动中,等待【{0}】超时 已等待[{1}]秒</value> <value>流水线转动{0}-{1},等待【{2}】超时[{3}]秒</value>
</data> </data>
<data name="RNodeGoHome" xml:space="preserve"> <data name="RNodeGoHome" xml:space="preserve">
<value>旋转轴[{0}]原点返回完成</value> <value>旋转轴[{0}]原点返回完成</value>
...@@ -1366,7 +1366,7 @@ ...@@ -1366,7 +1366,7 @@
<value>收到急停信号,停止所有运动,设备断开连接</value> <value>收到急停信号,停止所有运动,设备断开连接</value>
</data> </data>
<data name="TimeOutMsg" xml:space="preserve"> <data name="TimeOutMsg" xml:space="preserve">
<value>重置等待[{0}]超时,已等待:{1}分</value> <value>重置等待[{0}]超时{1}分</value>
</data> </data>
<data name="WaitTimeOutMsg" xml:space="preserve"> <data name="WaitTimeOutMsg" xml:space="preserve">
<value>组装中,等待【{0}】超时 已等待[{1}]秒</value> <value>组装中,等待【{0}】超时 已等待[{1}]秒</value>
...@@ -2376,6 +2376,37 @@ ...@@ -2376,6 +2376,37 @@
<data name="ItemText_Disable" xml:space="preserve"> <data name="ItemText_Disable" xml:space="preserve">
<value>禁用</value> <value>禁用</value>
</data> </data>
<data name = "FrmDeviceConfig_chbDisSideCylinder_Text" xml:space = "preserve"> <value> 禁用侧挡气缸 </value> </data> <data name="FrmDeviceConfig_chbDisSideCylinder_Text" xml:space="preserve">
<data name = "FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space = "preserve"> <value> 禁用底部气缸 </value> </data> <value> 禁用侧挡气缸 </value>
</data>
<data name="FrmDeviceConfig_chbDisBottonCylinder_Text" xml:space="preserve">
<value> 禁用底部气缸 </value>
</data>
<data name="ChangeWEnd" xml:space="preserve">
<value>调宽{0}={1}结束:{2}</value>
</data>
<data name="ChangeWFail" xml:space="preserve">
<value>启动调宽失败</value>
</data>
<data name="ChangeWOk" xml:space="preserve">
<value>调宽{0}={1}完成</value>
</data>
<data name="HomeMoveTimeout" xml:space="preserve">
<value>等待原点完成超时</value>
</data>
<data name="InChangeW" xml:space="preserve">
<value>已在调宽中</value>
</data>
<data name="SureChangeWidth" xml:space="preserve">
<value>当前宽度[{0}],目标宽度[{1}],是否开始调宽?</value>
</data>
<data name="UserStop" xml:space="preserve">
<value>用户中止</value>
</data>
<data name="WaitChangeWOk" xml:space="preserve">
<value>等待目标位置{0}超时</value>
</data>
<data name="WidthInvalid" xml:space="preserve">
<value>宽度无效</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -692,6 +692,24 @@ namespace TSA_V ...@@ -692,6 +692,24 @@ namespace TSA_V
/// 请输入线体宽度 /// 请输入线体宽度
/// </summary> /// </summary>
public static string WriteLineWidth = "WriteLineWidth"; public static string WriteLineWidth = "WriteLineWidth";
/// <summary>
/// 当前宽度[{0}],目标宽度[{1}],是否开始调宽?
/// </summary>
public static string SureChangeWidth = "SureChangeWidth";
/// <summary>
/// 启动调宽失败
/// </summary>
public static string ChangeWFail = "ChangeWFail";
/// <summary>
/// 调宽{0}={1}完成
/// </summary>
public static string ChangeWOk = "ChangeWOk";
/// <summary>
/// 调宽{0}={1}结束:{2}
/// </summary>
public static string ChangeWEnd = "ChangeWEnd";
} }
} }
...@@ -259,14 +259,7 @@ namespace TSA_V ...@@ -259,14 +259,7 @@ namespace TSA_V
cmbWriteIO.Items.Clear(); cmbWriteIO.Items.Clear();
cmbWriteIO.DataSource = new List<ConfigIO>(IOManager.DOList.Values); cmbWriteIO.DataSource = new List<ConfigIO>(IOManager.DOList.Values);
cmbWriteIO.ValueMember = "ProName"; cmbWriteIO.ValueMember = "ProName";
if (ResourceCulture.CurrLanguage.Equals(ResourceCulture.English)) cmbWriteIO.DisplayMember = "DisplayStr";
{
cmbWriteIO.DisplayMember = "DisplayUSStr";
}
else
{
cmbWriteIO.DisplayMember = "DisplayCnStr";
}
cmbWriteIO.SelectedIndex = 0; cmbWriteIO.SelectedIndex = 0;
} }
......
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
this.lblWait.Image = ((System.Drawing.Image)(resources.GetObject("lblWait.Image"))); this.lblWait.Image = ((System.Drawing.Image)(resources.GetObject("lblWait.Image")));
this.lblWait.Location = new System.Drawing.Point(101, 32); this.lblWait.Location = new System.Drawing.Point(101, 32);
this.lblWait.Name = "lblWait"; this.lblWait.Name = "lblWait";
this.lblWait.Size = new System.Drawing.Size(331, 151); this.lblWait.Size = new System.Drawing.Size(331, 161);
this.lblWait.TabIndex = 278; this.lblWait.TabIndex = 278;
this.lblWait.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lblWait.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
......
...@@ -102,11 +102,20 @@ namespace TSA_V ...@@ -102,11 +102,20 @@ namespace TSA_V
if (!code.Equals("")) if (!code.Equals(""))
{ {
int index = -1; int index = -1;
List<BoardInfo> list = (from m in BoardManager.boardList where m.boardCode.StartsWith(code) select m).ToList<BoardInfo>(); List<BoardInfo> list = (from m in BoardManager.boardList where (!String.IsNullOrEmpty(m.boardCode)) && m.boardCode.StartsWith(code) select m).ToList<BoardInfo>();
if (list.Count <= 0) if (list.Count <= 0)
{ {
list = (from m in BoardManager.boardList where code.StartsWith(m.boardCode) select m).ToList<BoardInfo>(); list = (from m in BoardManager.boardList where (!String.IsNullOrEmpty(m.boardCode)) && m.boardCode.Contains(code) select m).ToList<BoardInfo>();
} }
if (list.Count <= 0)
{
list = (from m in BoardManager.boardList where (!String.IsNullOrEmpty(m.boardCode)) && code.StartsWith(m.boardCode) select m).ToList<BoardInfo>();
}
if (list.Count <= 0)
{
list = (from m in BoardManager.boardList where (!String.IsNullOrEmpty(m.boardCode)) && code.Contains(m.boardCode) select m).ToList<BoardInfo>();
}
if (list.Count > 0) if (list.Count > 0)
{ {
foreach (BoardInfo board in BoardManager.boardList) foreach (BoardInfo board in BoardManager.boardList)
...@@ -202,8 +211,8 @@ namespace TSA_V ...@@ -202,8 +211,8 @@ namespace TSA_V
int p = LWidthManager.GetWidthPosition(w); int p = LWidthManager.GetWidthPosition(w);
LogUtil.info(" 选择程序[" + BoardManager.CurrBoard.boardName + "]后,开始轨道调宽:【" + w + "】【" + p + "】"); LogUtil.info(" 选择程序[" + BoardManager.CurrBoard.boardName + "]后,开始轨道调宽:【" + w + "】【" + p + "】");
string msg = ResourceCulture.GetString(ResourceCulture.SureChangeWidth, "当前宽度[{0}],目标宽度[{1}],是否开始调宽?",LWidthManager.Line_LastWidth,w);
DialogResult result = MessageBox.Show("当前宽度["+LWidthManager.Line_LastWidth+"],目标宽度["+ w + "],是否开始调宽", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); DialogResult result = MessageBox.Show(msg, "", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
if (!result.Equals(DialogResult.OK)) if (!result.Equals(DialogResult.OK))
{ {
return; return;
...@@ -211,7 +220,7 @@ namespace TSA_V ...@@ -211,7 +220,7 @@ namespace TSA_V
if (!LWidthManager.CanStartChWidth()) if (!LWidthManager.CanStartChWidth())
{ {
MessageBox.Show("启动调宽失败"); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWFail, "启动调宽失败"));
return; return;
} }
...@@ -224,11 +233,11 @@ namespace TSA_V ...@@ -224,11 +233,11 @@ namespace TSA_V
LogUtil.info("调宽" + w + "=" + p + "结束:" + ok); LogUtil.info("调宽" + w + "=" + p + "结束:" + ok);
if (String.IsNullOrEmpty(ok)) if (String.IsNullOrEmpty(ok))
{ {
MessageBox.Show("调宽" + w + "=" + p + "完成"); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWOk, "调宽{0}={1}完成",w,p));
} }
else else
{ {
MessageBox.Show("调宽" + w + "=" + p + "结束:" + ok); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChangeWEnd,"调宽{0}={1}结束:{2}",w,p, ok));
} }
//Thread.Sleep(5000); //Thread.Sleep(5000);
......
...@@ -400,7 +400,7 @@ ...@@ -400,7 +400,7 @@
this.panPoint.Controls.Add(this.picPoint); this.panPoint.Controls.Add(this.picPoint);
this.panPoint.Location = new System.Drawing.Point(6, 17); this.panPoint.Location = new System.Drawing.Point(6, 17);
this.panPoint.Name = "panPoint"; this.panPoint.Name = "panPoint";
this.panPoint.Size = new System.Drawing.Size(539, 436); this.panPoint.Size = new System.Drawing.Size(541, 437);
this.panPoint.TabIndex = 3; this.panPoint.TabIndex = 3;
// //
// picPoint // picPoint
...@@ -410,7 +410,7 @@ ...@@ -410,7 +410,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.picPoint.Location = new System.Drawing.Point(0, 0); this.picPoint.Location = new System.Drawing.Point(0, 0);
this.picPoint.Name = "picPoint"; this.picPoint.Name = "picPoint";
this.picPoint.Size = new System.Drawing.Size(503, 390); this.picPoint.Size = new System.Drawing.Size(505, 391);
this.picPoint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.picPoint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picPoint.TabIndex = 2; this.picPoint.TabIndex = 2;
this.picPoint.TabStop = false; this.picPoint.TabStop = false;
......
...@@ -82,6 +82,7 @@ namespace TSA_V ...@@ -82,6 +82,7 @@ namespace TSA_V
TSAVBean.InputCodeEvent += TSAVBean_InputCodeEvent; TSAVBean.InputCodeEvent += TSAVBean_InputCodeEvent;
IsSet = true; IsSet = true;
} }
timerShowForm.Start();
isInitOk = true; isInitOk = true;
// string ip = ConfigAppSettings.GetValue(Setting_Init.StatusServerIp); // string ip = ConfigAppSettings.GetValue(Setting_Init.StatusServerIp);
// bool result = StatusClient.instance.Connect(); // bool result = StatusClient.instance.Connect();
...@@ -564,6 +565,8 @@ namespace TSA_V ...@@ -564,6 +565,8 @@ namespace TSA_V
} }
private void timerShowForm_Tick(object sender, EventArgs e) private void timerShowForm_Tick(object sender, EventArgs e)
{ {
try
{
if (smtPoint != null && smtPoint.PositionX > 0 && smtPoint.PositionY > 0) if (smtPoint != null && smtPoint.PositionX > 0 && smtPoint.PositionY > 0)
{ {
//ShowMsg(); //ShowMsg();
...@@ -578,16 +581,22 @@ namespace TSA_V ...@@ -578,16 +581,22 @@ namespace TSA_V
color = Color.Red; color = Color.Red;
preIsShow = true; preIsShow = true;
} }
int pontX = Convert.ToInt32(picPoint.Width * defaultXxishu); int pontX = Convert.ToInt32(picPoint.Width * defaultXxishu);
int pontY = Convert.ToInt32(picPoint.Height * defaultYxishu); int pontY = Convert.ToInt32(picPoint.Height * defaultYxishu);
Graphics g = picPoint.CreateGraphics(); Graphics g = picPoint.CreateGraphics();
g.DrawLine(new Pen(Color.FromArgb(255, color), lineWidth), pontX - lineWidth / 2, pontY - lineLength, pontX - lineWidth / 2, pontY + lineLength - lineWidth / 2); g.DrawLine(new Pen(Color.FromArgb(255, color), lineWidth), pontX - lineWidth / 2, pontY - lineLength, pontX - lineWidth / 2, pontY + lineLength - lineWidth / 2);
g.DrawLine(new Pen(Color.FromArgb(255, color), lineWidth), pontX - lineLength, pontY - lineWidth / 2, pontX + lineLength - lineWidth / 2, pontY - lineWidth / 2); g.DrawLine(new Pen(Color.FromArgb(255, color), lineWidth), pontX - lineLength, pontY - lineWidth / 2, pontX + lineLength - lineWidth / 2, pontY - lineWidth / 2);
g.Flush(); g.Flush();
g.Dispose(); g.Dispose();
preIsShow = false; //preIsShow = false;
}
}
catch (Exception ex)
{
LogUtil.error(Name + " timerShowForm_Tick 出错:" + ex.ToString());
} }
} }
private int preIndex = -1; private int preIndex = -1;
...@@ -681,15 +690,6 @@ namespace TSA_V ...@@ -681,15 +690,6 @@ namespace TSA_V
private void btnStop_Click(object sender, EventArgs e) private void btnStop_Click(object sender, EventArgs e)
{ {
//Task.Factory.StartNew(delegate
//{
// if (TSAVBean.Status > TSAVStatus.Reset)
// {
// TSAVBean.StopWork();
// }
// //OpInfo op = OpInfo.GetOpInfo(BoardManager.CurrBoard);
// //bool result = DB.db.AddHistory(op, out int id);
//});
this.Close(); this.Close();
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!