Commit 309220de LN

PointDisplayType=1时,投影文字显示partNum,否则显示点名称

1 个父辈 a7800ec3
......@@ -173,5 +173,6 @@ namespace TSA_V.Common
public static string WorkSingleStart = "WorkSingleStart";
public static string PointDisplayType = "PointDisplayType";
}
}
......@@ -264,6 +264,16 @@ namespace TSA_V.DeviceLibrary
return pointName + spilt + "1" + spilt + "2" + spilt + PositionX + spilt + PositionY + spilt + "CRD" + spilt + NodePositionX + spilt + NodePositionY;
}
public string GetDisplayStr()
{
string text = pointName;
if (BoardManager.PointDisplayType.Equals(1))
{
text = PartNum;
}
return text;
}
/// <summary>
/// 点类型,1=点,2=+,3=|,3=-,4=方形,5=圆圈
/// </summary>
......
......@@ -15,6 +15,7 @@ namespace TSA_V.DeviceLibrary
{
public class BoardManager
{
public static int PointDisplayType = ConfigAppSettings.GetIntValue(Setting_Init.PointDisplayType);
private static int MaxId = 0;
/// <summary>
/// 板子列表
......
......@@ -110,6 +110,8 @@
<add key ="SideCylinderMoveFirst" value ="1"/>
<!--是否启用工作区信号触发开始工作-->
<add key ="WorkSingleStart" value ="0"/>
<!--点位描述显示类型-->
<add key ="PointDisplayType" value="1"/>
</appSettings>
<log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -96,8 +96,9 @@ namespace TSA_V
isFinishLoad = true;
if (dgvList.Rows.Count > 0)
{
int index = dgvList.Rows.Count - 1;
dgvList.Rows[0].Selected = true;
// int index = dgvList.Rows.Count - 1;
// dgvList.Rows[0].Selected = true;
UpdateSelPoint(0);
}
}
private void LanguagePro()
......@@ -165,6 +166,7 @@ namespace TSA_V
{
dgvList.Columns[i].ReadOnly = true ;
}
dgvList.Columns[i].Selected = false;
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
......
......@@ -517,7 +517,7 @@
<value>WIDTH↑</value>
</data>
<data name="FrmBoardInfo_label14_Text" xml:space="preserve">
<value>TYPE</value>
<value>BARCODE</value>
</data>
<data name="FrmBoardInfo_label3_Text" xml:space="preserve">
<value>LENGTH→</value>
......
......@@ -337,7 +337,7 @@
<value>数量:</value>
</data>
<data name="FrmPutCom_label2_Text" xml:space="preserve">
<value>料盘编码:</value>
<value>物料编码:</value>
</data>
<data name="FrmAddCom_Text" xml:space="preserve">
<value>新增元器件库</value>
......@@ -517,7 +517,7 @@
<value>宽度 ↑</value>
</data>
<data name="FrmBoardInfo_label14_Text" xml:space="preserve">
<value>类型</value>
<value>条码</value>
</data>
<data name="FrmBoardInfo_label3_Text" xml:space="preserve">
<value>长度→</value>
......
......@@ -130,7 +130,7 @@ namespace TSA_V
//写字
if (index.Equals(selectIndex) || ShowName)
{
grfx.DrawString(weld.pointName, new Font("Arial ", 9, FontStyle.Bold), brushes, x - lineLength / 2 + 2, y + lineLength / 2 + 2);
grfx.DrawString(weld.GetDisplayStr(), new Font("Arial ", 9, FontStyle.Bold), brushes, x - lineLength / 2 + 2, y + lineLength / 2 + 2);
}
index++;
}
......@@ -193,7 +193,7 @@ namespace TSA_V
grfx.DrawLine(new Pen(Color.Red, 4), x, y - lineLength, x, y + lineLength);
grfx.DrawLine(new Pen(Color.Red, 4), x - lineLength, y, x + lineLength, y);
isFindCurrPoint = true; ;
g.DrawString(weld.pointName, new Font("Arial ", 8, FontStyle.Bold), Brushes.Red, x - lineLength / 2 + 5, y + lineLength / 2 + 2);
g.DrawString(weld.GetDisplayStr(), new Font("Arial ", 8, FontStyle.Bold), Brushes.Red, x - lineLength / 2 + 5, y + lineLength / 2 + 2);
}
else
{
......
......@@ -105,7 +105,7 @@ namespace UserFromControl
//写字
if (index.Equals(selectIndex) || ShowName)
{
grfx.DrawString(weld.pointName, new Font("Arial ", 9, FontStyle.Bold), brushes, x - lineLength / 2 + 2, y + lineLength / 2 + 2);
grfx.DrawString(weld.GetDisplayStr(), new Font("Arial ", 9, FontStyle.Bold), brushes, x - lineLength / 2 + 2, y + lineLength / 2 + 2);
}
index++;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!