Commit 2512d66f LN

1.负数未偏移问题。2.工作完成未统计。3.极性非自定义时不能输入。4.点位编辑保存后自动显示新投影。

1 个父辈 aceaf5c7
...@@ -211,6 +211,11 @@ namespace TSA_V.DeviceLibrary ...@@ -211,6 +211,11 @@ namespace TSA_V.DeviceLibrary
{ {
LogUtil.info(" 程序【" + currBoard.boardName + "】所有位置已走完 "); LogUtil.info(" 程序【" + currBoard.boardName + "】所有位置已走完 ");
ClosePrePos(); ClosePrePos();
if(IOBase.NoLine)
{
LogUtil.info(" 程序【" + currBoard.boardName + "】工作完成,无线体模式,记录工作次数");
WorkCountManager.AddWorkCount();
}
//if (TSAVBean.IsNeedSoldering) //if (TSAVBean.IsNeedSoldering)
//{ //{
// LogUtil.info(" 程序【" + currBoard.boardName + "】需要焊接,打开烙铁灯 "); // LogUtil.info(" 程序【" + currBoard.boardName + "】需要焊接,打开烙铁灯 ");
......
...@@ -31,7 +31,7 @@ namespace TSA_V.DeviceLibrary ...@@ -31,7 +31,7 @@ namespace TSA_V.DeviceLibrary
listener = new HttpListener(); listener = new HttpListener();
listener.Prefixes.Add($"http://localhost:{Setting_NInit.Hand_ServerPort}/"); // 监听的URL地址 listener.Prefixes.Add($"http://localhost:{Setting_NInit.Hand_ServerPort}/"); // 监听的URL地址
listener.Start(); listener.Start();
LogUtil.info("HTTP服务已启动,正在监听9876端口..."); LogUtil.info($"HTTP服务已启动,正在监听{Setting_NInit.Hand_ServerPort}端口...");
Task.Factory.StartNew(() => Task.Factory.StartNew(() =>
{ {
Run(); Run();
......
...@@ -878,8 +878,8 @@ namespace TSA_V ...@@ -878,8 +878,8 @@ namespace TSA_V
int index = dgvList.FirstDisplayedScrollingRowIndex; int index = dgvList.FirstDisplayedScrollingRowIndex;
DataGridViewRow row = dgvList.Rows[rowIndex]; DataGridViewRow row = dgvList.Rows[rowIndex];
SMTPointInfo smtInfo = getRowPointInfo(row); SMTPointInfo smtInfo = getRowPointInfo(row);
panBoard.AutoScrollPosition = new Point((int)(smtInfo.PositionX*display.imageXiShu-panBoard.Width/2),(int) (smtInfo.PositionY * display.imageXiShu-panBoard.Height/2)); panBoard.AutoScrollPosition = new Point((int)(smtInfo.PositionX * display.imageXiShu - panBoard.Width / 2), (int)(smtInfo.PositionY * display.imageXiShu - panBoard.Height / 2));
// panBoard.AutoScrollPosition = new Point((int)picBoard.Width, (int)picBoard.Height); // panBoard.AutoScrollPosition = new Point((int)picBoard.Width, (int)picBoard.Height);
if (isFinishLoad && this.txtBoardW.Text.Trim() != "" && this.txtBoardL.Text.Trim() != "") if (isFinishLoad && this.txtBoardW.Text.Trim() != "" && this.txtBoardL.Text.Trim() != "")
{ {
...@@ -894,7 +894,7 @@ namespace TSA_V ...@@ -894,7 +894,7 @@ namespace TSA_V
FrmPointInfo fwpi = new FrmPointInfo(updateBoardInfo, allPoint, rowIndex, NextProcess); FrmPointInfo fwpi = new FrmPointInfo(updateBoardInfo, allPoint, rowIndex, NextProcess);
fwpi.StartPosition = FormStartPosition.Manual; fwpi.StartPosition = FormStartPosition.Manual;
fwpi.Location= new Point(this.Location.X,this.Location.Y); fwpi.Location = new Point(this.Location.X, this.Location.Y);
fwpi.ShowPointEvent += Fwpi_ShowPointEvent; fwpi.ShowPointEvent += Fwpi_ShowPointEvent;
fwpi.AoiProgramName = cmbAOIFile.Text; fwpi.AoiProgramName = cmbAOIFile.Text;
fwpi.PicImage = picBoard.Image; fwpi.PicImage = picBoard.Image;
...@@ -913,6 +913,16 @@ namespace TSA_V ...@@ -913,6 +913,16 @@ namespace TSA_V
} }
rowIndex = fwpi.CurrIndex; rowIndex = fwpi.CurrIndex;
dgvList.Rows[rowIndex].Selected = true; dgvList.Rows[rowIndex].Selected = true;
if (allPoint.Count > 0)
{
SMTPointInfo updatePoint = getRowPointInfo(dgvList.Rows[rowIndex]);
if (updatePoint != null)
{
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(updatePoint.GetScreenShowPInfo());
}
}
//smtInfo = fwpi.smpPointInfo; //smtInfo = fwpi.smpPointInfo;
//setPointInfo(dgvList.Rows[rowIndex], smtInfo); //setPointInfo(dgvList.Rows[rowIndex], smtInfo);
if (isFinishLoad && this.txtBoardW.Text.Trim() != "" && this.txtBoardL.Text.Trim() != "") if (isFinishLoad && this.txtBoardW.Text.Trim() != "" && this.txtBoardL.Text.Trim() != "")
...@@ -920,7 +930,7 @@ namespace TSA_V ...@@ -920,7 +930,7 @@ namespace TSA_V
loadPictureBoxSize(); loadPictureBoxSize();
} }
SetListCurrCell(index); SetListCurrCell(index);
} }
} }
private void AddNewPoint(double x, double y, double nodeX, double nodeY) private void AddNewPoint(double x, double y, double nodeX, double nodeY)
......
...@@ -270,6 +270,7 @@ namespace TSA_V.frmBoard ...@@ -270,6 +270,7 @@ namespace TSA_V.frmBoard
{ {
pointList[i] =XYConvertManager.CalPointNodePosition(pointList[i], checkOKList); pointList[i] =XYConvertManager.CalPointNodePosition(pointList[i], checkOKList);
} }
currBoard.calInfo.CurrStep = 3;
currBoard.smtList = pointList; currBoard.smtList = pointList;
BoardManager.Update(currBoard); BoardManager.Update(currBoard);
FrmProjectorScreen.instance.ClearPoint(); FrmProjectorScreen.instance.ClearPoint();
......
...@@ -204,7 +204,7 @@ namespace TSA_V ...@@ -204,7 +204,7 @@ namespace TSA_V
txtXUpdate.Focus(); txtXUpdate.Focus();
return; return;
} }
if (xUpdate > 0 || yUpdate > 0) if (xUpdate != 0 || yUpdate != 0)
{ {
showMsg = ResourceCulture.GetString(ResourceCulture.PWSureUPdateXY, "程序【{0}】的组装位置将修正,偏移量X[{1}],Y[{2}],是否确定修正", updateBoardInfo.boardName, xUpdate, yUpdate); showMsg = ResourceCulture.GetString(ResourceCulture.PWSureUPdateXY, "程序【{0}】的组装位置将修正,偏移量X[{1}],Y[{2}],是否确定修正", updateBoardInfo.boardName, xUpdate, yUpdate);
} }
...@@ -226,7 +226,7 @@ namespace TSA_V ...@@ -226,7 +226,7 @@ namespace TSA_V
{ {
double oldX = point.PositionX; double oldX = point.PositionX;
double oldY = point.PositionY; double oldY = point.PositionY;
if (xUpdate > 0 || yUpdate > 0) if (xUpdate != 0 || yUpdate != 0)
{ {
point.PositionX += xUpdate; point.PositionX += xUpdate;
point.PositionY += yUpdate; point.PositionY += yUpdate;
......
...@@ -317,15 +317,15 @@ namespace TSA_V ...@@ -317,15 +317,15 @@ namespace TSA_V
smtPointInfo.PolarityAngle = actControl.PolarityAngle; smtPointInfo.PolarityAngle = actControl.PolarityAngle;
smtPointInfo.CheckOK = false ; smtPointInfo.CheckOK = false ;
if (boardInfo != null && boardInfo.calInfo != null && boardInfo.calInfo.CurrStep >= 3) if (boardInfo != null && boardInfo.calInfo != null && boardInfo.calInfo.CurrStep >= 2)
{ {
List<SMTPointInfo> checkOKList = boardInfo.getCalPoint(); List<SMTPointInfo> checkOKList = boardInfo.getCalPoint();
smtPointInfo = XYConvertManager.CalPointNodePosition(smtPointInfo, checkOKList); smtPointInfo = XYConvertManager.CalPointNodePosition(smtPointInfo, checkOKList);
} }
else else
{ {
smtPointInfo.NodePositionX = projectorControl.XValue; //smtPointInfo.NodePositionX = projectorControl.XValue;
smtPointInfo.NodePositionY = projectorControl.YValue; //smtPointInfo.NodePositionY = projectorControl.YValue;
} }
} }
......
...@@ -627,6 +627,7 @@ namespace UserFromControl ...@@ -627,6 +627,7 @@ namespace UserFromControl
lastPolaritiesType = cmbpolarities.SelectedIndex; lastPolaritiesType = cmbpolarities.SelectedIndex;
lastAngle =(int) numAngle.Value; lastAngle =(int) numAngle.Value;
lastAngle = ProjectorPInfo.getAngleByType(lastPolaritiesType, lastAngle); lastAngle = ProjectorPInfo.getAngleByType(lastPolaritiesType, lastAngle);
numAngle.Enabled = lastPolaritiesType.Equals(9);
numAngle.Value = lastAngle; numAngle.Value = lastAngle;
DrawPoint(lastType, lastPolaritiesType, lastAngle); DrawPoint(lastType, lastPolaritiesType, lastAngle);
ShowCurrPoint(); ShowCurrPoint();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!