Commit 842be756 贾鹏旭

1.多料盘位置放一种同一种物料

2.程序运行中当前物料为0时,获取元器件库其他位置相同物料
3.新建程序上传excel,重新解析规则
1 个父辈 0b9c6bfc
......@@ -175,5 +175,15 @@ namespace TSA_V.Common
public static string OfflineMode = "OfflineMode";
public static string PointDisplayType = "PointDisplayType";
/// <summary>
/// 运行中断程序名称
/// </summary>
public static string ProcedureName = "ProcedureName";
/// <summary>
/// 位号
/// </summary>
public static string TagNumber = "TagNumber";
}
}
......@@ -242,5 +242,13 @@ namespace TSA_V.Common
LogUtil.error(LOGGER, "SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace);
}
}
public static void UpdateAppSetting(string key, string value)
{
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
configuration.AppSettings.Settings[key].Value = value;
configuration.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection("appSettings");
}
}
}
......@@ -181,18 +181,54 @@ namespace TSA_V.LoadCSVLibrary
Dictionary<string, string> pnposlist = new Dictionary<string, string>();
HashSet<string> usedposlist = new HashSet<string>();
List< ComponetInfo > componetlist = new List< ComponetInfo >();
foreach (var com in comList) {
if (string.IsNullOrWhiteSpace(com.PositionNum))
continue;
com.PositionNum = GetPositionNum(com.PositionNum);
if (!string.IsNullOrEmpty(com.PositionNum))
string[] strarr= GetPositionNum(com.PositionNum);
string[] intarr = com.ComCount.Split(';');
if (strarr.Length!=+intarr.Length)
{
MessageBox.Show($"{com.PN}的数量分组{intarr.Length}和位置分组{strarr.Length},不统一!");
break;
}
int i = index;
int j = 0;
foreach (var item in strarr)
{
usedposlist.Add(com.PositionNum);
pnposlist[com.PN] = com.PositionNum;
ComponetInfo componet = new ComponetInfo();
componet.Id = comList.Count + i;
componet.PositionX=com.PositionX;
componet.PositionNum = item;
componet.PN=com.PN;
componet.Text=com.Text;
componet.ComCount= intarr[j];
componet.ComponentDes=com.ComponentDes;
componet.Notes=com.Notes;
componet.TagNo=com.TagNo;
componetlist.Add(componet);
i++;
j++;
if (!string.IsNullOrEmpty(com.PositionNum))
{
usedposlist.Add(com.PositionNum);
pnposlist[com.PN] = com.PositionNum;
}
}
//com.PositionNum = GetPositionNum(com.PositionNum);
//if (!string.IsNullOrEmpty(com.PositionNum))
//{
// usedposlist.Add(com.PositionNum);
// pnposlist[com.PN] = com.PositionNum;
//}
}
foreach (var com in comList) {
comList.AddRange(componetlist);
List<ComponetInfo> componedate = comList.Where(m => !m.PositionNum.Contains(";")).ToList();
foreach (var com in componedate)
{
if (string.IsNullOrWhiteSpace(com.PositionNum) && !string.IsNullOrWhiteSpace(com.PN))
{
......@@ -218,17 +254,28 @@ namespace TSA_V.LoadCSVLibrary
//}
}
return comList;
return componedate;
}
public static string GetPositionNum(string configPosition )
public static string[] GetPositionNum(string configPosition )
{
TSAVPosition p = CSVPositionReader<TSAVPosition>.GetPositonByNum(configPosition);
if (p != null)
string[] strings=configPosition.Split(';');
string[] strarr=new string[strings.Length];
int i = 0;
foreach (var item in strings)
{
return p.PositionNum;
TSAVPosition p = CSVPositionReader<TSAVPosition>.GetPositonByNum(item);
if (p != null)
{
// return p.PositionNum;
strarr[i] = p.PositionNum;
}
else
{
strarr[i] = "";
}
i++;
}
return "";
return strarr;
}
......@@ -495,7 +542,7 @@ namespace TSA_V.LoadCSVLibrary
{
if (comList[i].IsSameCom(smtPoint))
{
comList[i].ComCount = count;
comList[i].ComCount = count.ToString();
updateOk = true;
break;
}
......@@ -507,7 +554,7 @@ namespace TSA_V.LoadCSVLibrary
{
if (comList[i].PN.Equals(smtPoint.PN))
{
comList[i].ComCount = count;
comList[i].ComCount = count.ToString();
updateOk = true;
break;
}
......@@ -557,10 +604,10 @@ namespace TSA_V.LoadCSVLibrary
List<ComponetInfo> list = (from m in useComponets where m.Id.Equals(obj.Id) select m).ToList();
if (list.Count > 0)
{
obj.ComCount = obj.ComCount - list.Count;
if (obj.ComCount < 0)
obj.ComCount = (int.Parse(obj.ComCount) - list.Count).ToString();
if (int.Parse(obj.ComCount) < 0)
{
obj.ComCount = 0;
obj.ComCount = "0";
}
}
newList.Add(obj);
......
......@@ -42,7 +42,7 @@ namespace TSA_V.LoadCSVLibrary
///数量
/// </summary>
[CSVAttribute("Count", true,"数量", "Quantity")]
public int ComCount { get; set; }
public string ComCount { get; set; }
/// <summary>
///位置
......@@ -116,7 +116,7 @@ namespace TSA_V.LoadCSVLibrary
return true;
}
}
else if (this.TagNo.Equals(point.TagNo))
else if (this.TagNo.Equals(point.TagNo)&&this.PositionNum.Equals(point.PositionNum))
{
return true;
}
......
using PUSICANLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using TSA_V.Common;
using TSA_V.DeviceLibrary.manager;
......@@ -200,7 +201,41 @@ namespace TSA_V.DeviceLibrary
TSAVPosition position = null;
if (com != null)
{
position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
#region 2023-10-31添加
//如果当前位置元器件数量为空时,查询当前元器件库相同物料编号的元器件使用
if (int.Parse(com.ComCount) <= 0)
{
var smtpoint = needWorkSmtList.Where(a => a.PN == com.PN).ToList();
foreach (var item in smtpoint)
{
var componeinfo = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, item);
if (componeinfo != null && int.Parse(componeinfo.ComCount) > 0)
{
position = CSVPositionReader<TSAVPosition>.GetPositonByNum(componeinfo.PositionNum);
if (position != null)
{
com = componeinfo;
currPoint = item;
break;
}
}
}
}
else
{
position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
}
//记录运行过程的位号
ConfigAppSettings.UpdateAppSetting(Setting_Init.ProcedureName, currBoard.boardName);
ConfigAppSettings.UpdateAppSetting(Setting_Init.TagNumber, currIndex.ToString());
if (currPoint.pointNum == 1)//第一个位号不需要记录
{
ConfigAppSettings.UpdateAppSetting(Setting_Init.ProcedureName, "");
ConfigAppSettings.UpdateAppSetting(Setting_Init.TagNumber, "");
}
#endregion
//position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
useComponets.Add(com);
}
else
......@@ -212,7 +247,7 @@ namespace TSA_V.DeviceLibrary
LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.PN + "】未找到对应的元器件");
}
else
{
{
this.currPosition = position;
XYMove();
//插件机工作
......
......@@ -124,6 +124,9 @@
<add key="DisableBottomCylinder" value="1" />
<add key="SMF_Serverurl" value ="http://localhost:8800/"/>
<add key="SMF_CID" value ="NEOSTATION001"/>
<!--记录程序运行步骤-->
<add key="ProcedureName" value="12343" />
<add key="TagNumber" value ="3"/>
</appSettings>
<log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......

using AccAOI;
using log4net;
using MetroFramework.Forms;
using TSA_V.Common;
using TSA_V.DeviceLibrary;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Drawing2D;
using PUSICANLibrary;
using TSA_V;
using TSA_V.LoadCSVLibrary;
using AccAOI;
using System.Runtime.ExceptionServices;
using System.Windows.Forms;
using TSA_V.Common;
using TSA_V.DeviceLibrary;
using TSA_V.LoadCSVLibrary;
namespace TSA_V
{
......@@ -33,10 +23,10 @@ namespace TSA_V
PointDisplay display = new PointDisplay();
private bool isFinishLoad = false;
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private FrmBoardInfo()
{
InitializeComponent(); display.SetPic(picBoard, panBoard);
InitializeComponent(); display.SetPic(picBoard, panBoard);
CheckForIllegalCrossThreadCalls = false;
}
public void SetBoard(BoardInfo board)
......@@ -68,7 +58,7 @@ namespace TSA_V
if (isNew == false)
if (isNew == false)
{
AOIManager.LoadAOIFile(cmbAOIFile, updateBoardInfo.AOIProName);
LoadBoardInfo();
......@@ -99,8 +89,8 @@ 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);
}
}
......@@ -124,10 +114,10 @@ namespace TSA_V
int rowIndex = dgvList.SelectedRows[0].Index;
string partNum = dgvList.Rows[rowIndex].Cells[this.Column_PartNum.Name].Value.ToString();
string name = dgvList.Rows[rowIndex].Cells[this.Column_Name.Name].Value.ToString();
记录为组装坐标ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.ItemTextUpdateP, "更新为【{0}-{1}】的位置", partNum, name);
记录为组装坐标ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.ItemTextUpdateP, "更新为【{0}-{1}】的位置", partNum, name);
}
else
{
{
记录为组装坐标ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.ItemText_UpdateN, "更新为组装位置");
}
......@@ -188,22 +178,19 @@ namespace TSA_V
txtLineWidth.Visible = false;
lbllinews.Visible = false;
}
int count = dgvList.Columns.Count;
for(int i = 0; i < count; i++)
for (int i = 0; i < count; i++)
{
if (i.Equals(Column_disable.Index))
{
{
dgvList.Columns[i].ReadOnly = false;
}
else
{
dgvList.Columns[i].ReadOnly = true ;
{
dgvList.Columns[i].ReadOnly = true;
}
dgvList.Columns[i].Selected = false;
}
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
......@@ -272,7 +259,7 @@ namespace TSA_V
dgvList.Rows[rowIndex].Selected = true;
}
}
private double CurrBeiLu = 1;
private void LoadBoardInfo()
......@@ -298,7 +285,7 @@ namespace TSA_V
}
}
}
private DataGridViewRow setPointInfo(DataGridViewRow view, SMTPointInfo point)
{
......@@ -314,7 +301,7 @@ namespace TSA_V
view.Cells[4].Value = point.PositionY.ToString();
view.Cells[5].Value = point.NodePositionX.ToString();
view.Cells[6].Value = point.NodePositionY.ToString();
view.Cells[7].Value = point.PositionNum.ToString();
view.Cells[7].Value = point.PositionNum.ToString();
view.Cells[8].Value = point.NeedSoldering;
view.Cells[9].Value = point.WeldTemp;
view.Cells[10].Value = point.WeldTime;
......@@ -393,7 +380,7 @@ namespace TSA_V
private void FrmBoardInfo_FormClosing(object sender, FormClosingEventArgs e)
{
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ClearPoint();
timer1.Stop();
TSAVBean.IsCanStepMove = false;
this.Visible = false;
......@@ -440,11 +427,11 @@ namespace TSA_V
try
{
isFinishLoad = false;
if ( rowIndex >= dgvList.Rows.Count - 1)
if (rowIndex >= dgvList.Rows.Count - 1)
{
return;
}
DataGridViewRow row = dgvList.Rows[rowIndex];
DataGridViewRow row = dgvList.Rows[rowIndex];
dgvList.Rows.Remove(dgvList.Rows[rowIndex]);
if (rowIndex >= dgvList.Rows.Count - 1)
......@@ -476,7 +463,7 @@ namespace TSA_V
{
return;
}
DataGridViewRow row = dgvList.Rows[rowIndex];
DataGridViewRow row = dgvList.Rows[rowIndex];
dgvList.Rows.Remove(dgvList.Rows[rowIndex]);
dgvList.Rows.Insert(rowIndex - 1, row);
dgvList.Rows[rowIndex - 1].Selected = true;
......@@ -486,7 +473,7 @@ namespace TSA_V
LogUtil.error("行上升出错:" + ex.ToString());
}
finally
{
{
isFinishLoad = true;
}
}
......@@ -512,7 +499,7 @@ namespace TSA_V
else
{
FrmProjectorScreen.instance.ClearPoint();
FrmProjectorScreen.instance.ShowPoint(new ProjectorPInfo((int)x, (int)y,type,sizeX,sizeY,penWidth,showText));
FrmProjectorScreen.instance.ShowPoint(new ProjectorPInfo((int)x, (int)y, type, sizeX, sizeY, penWidth, showText));
}
}
......@@ -522,7 +509,7 @@ namespace TSA_V
int y_colIndex = dgvList.Columns[Column_NodeY.Name].Index;
dgvList.Rows[rowIndex].Cells[this.Column_NodeX.Name].Value = FrmProjectorScreen.instance.LastX;
dgvList.Rows[rowIndex].Cells[this.Column_NodeY.Name].Value =FrmProjectorScreen.instance.LastY;
dgvList.Rows[rowIndex].Cells[this.Column_NodeY.Name].Value = FrmProjectorScreen.instance.LastY;
dgvList.UpdateCellValue(x_colIndex, rowIndex);
dgvList.UpdateCellValue(y_colIndex, rowIndex);
......@@ -563,11 +550,11 @@ namespace TSA_V
board.boardName = FormUtil.getValue(txtBoardName);
board.boardLength = FormUtil.GetIntValue(txtBoardW);
board.boardWidth = FormUtil.GetIntValue(txtBoardL);
board.LineWidth = FormUtil.GetIntValue(txtLineWidth);
board.boardCode = FormUtil.getValue(txtCode);
board.LineWidth = FormUtil.GetIntValue(txtLineWidth);
board.boardCode = FormUtil.getValue(txtCode);
board.orgType = orgType;
if (cmbAOIFile.SelectedIndex == 0)
board.AOIProName = "";
if (cmbAOIFile.SelectedIndex == 0)
board.AOIProName = "";
else
board.AOIProName = cmbAOIFile.Text;
if (board.boardName.Equals(""))
......@@ -729,7 +716,7 @@ namespace TSA_V
point.PointSizeY = Convert.ToInt32(row.Cells[this.Column_PointSizeY.Name].Value.ToString());
point.PointType = Convert.ToInt32(row.Cells[this.Column_PointType.Name].Value.ToString());
point.PenWidth = Convert.ToInt32(row.Cells[this.Column_PenWidth.Name].Value.ToString());
point.ShowText = (row.Cells[this.Column_ShowText.Name].Value.ToString());
point.ShowText = (row.Cells[this.Column_ShowText.Name].Value.ToString());
point.Disable = Convert.ToBoolean(row.Cells[this.Column_disable.Name].Value.ToString());
}
catch (Exception ex)
......@@ -818,7 +805,7 @@ namespace TSA_V
display.LoadPoint(width, height, pointList);
imageXiShu = display.imageXiShu;
}
private void txtBoardLength_TextChanged(object sender, EventArgs e)
{
if (isFinishLoad && this.txtBoardW.Text.Trim() != "" && this.txtBoardL.Text.Trim() != "")
......@@ -840,7 +827,7 @@ namespace TSA_V
//SetSkin(this);
loadPictureBoxSize();
LanguageProcess();
LanguagePro();
LanguagePro();
isShownOk = true;
}
private void NextProcess(int currIndex, SMTPointInfo smt = null)
......@@ -855,9 +842,10 @@ namespace TSA_V
}
dgvList.Rows[currIndex].Selected = true;
}
}catch(Exception ex)
}
catch (Exception ex)
{
LogUtil.error("NextProcess出错:"+ex.ToString());
LogUtil.error("NextProcess出错:" + ex.ToString());
}
}
private void showDetail(int rowIndex)
......@@ -872,7 +860,7 @@ namespace TSA_V
}
List<SMTPointInfo> allPoint = allPointInfo();
FrmPointInfo fwpi = new FrmPointInfo( updateBoardInfo, allPoint, rowIndex,NextProcess);
FrmPointInfo fwpi = new FrmPointInfo(updateBoardInfo, allPoint, rowIndex, NextProcess);
fwpi.AoiProgramName = cmbAOIFile.Text;
fwpi.PicImage = picBoard.Image;
DialogResult result = fwpi.ShowDialog();
......@@ -900,14 +888,14 @@ namespace TSA_V
}
}
private void AddNewPoint(double x, double y, double nodeX, double nodeY)
{
SMTPointInfo smtInfo = new SMTPointInfo();
string name = "P" + (dgvList.Rows.Count + 1);
FrmPointInfo fwpi = new FrmPointInfo( updateBoardInfo, name, x, y, nodeX, nodeY);
FrmPointInfo fwpi = new FrmPointInfo(updateBoardInfo, name, x, y, nodeX, nodeY);
fwpi.AoiProgramName = cmbAOIFile.Text;
fwpi.PicImage = picBoard.Image;
DialogResult result = fwpi.ShowDialog();
......@@ -1039,7 +1027,7 @@ namespace TSA_V
dgvList.Rows[selectionIdx].Selected = true;
dgvList.CurrentCell = dgvList.Rows[selectionIdx].Cells[0];
selectionIdx = -1;
}
}
}
catch (Exception ex)
{
......@@ -1051,7 +1039,7 @@ namespace TSA_V
{
if (e.Button == MouseButtons.Right)
{
if (e.RowIndex >= 0 && e.ColumnIndex>=0)
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
this.dgvList.ClearSelection();
dgvList.Rows[e.RowIndex].Selected = true;
......@@ -1151,8 +1139,8 @@ namespace TSA_V
btnSetBasePoint_Click(null, null);
}
private DateTime preProTime = DateTime.Now;
private void picBoard_MouseMove(object sender, MouseEventArgs e)
{
......@@ -1194,12 +1182,12 @@ namespace TSA_V
dgvList.UpdateCellValue(x_colIndex, rowIndex);
dgvList.UpdateCellValue(y_colIndex, rowIndex);
int newIndex = rowIndex + 1;
int newIndex = rowIndex + 1;
if (dgvList.Rows.Count > newIndex)
{
dgvList.Rows[newIndex].Selected = true;
}
// loadPictureBoxSize();
// loadPictureBoxSize();
}
}
......@@ -1213,11 +1201,11 @@ namespace TSA_V
string partNum = dgvList.Rows[rowIndex].Cells[this.Column_PartNum.Name].Value.ToString();
string name = dgvList.Rows[rowIndex].Cells[this.Column_Name.Name].Value.ToString();
记录为组装坐标ToolStripMenuItem.Text = ResourceCulture.GetString(ResourceCulture.ItemTextUpdateP, "更新为【{0}-{1}】的位置", partNum, name);
UpdateSelPoint(rowIndex);
}
}
}
}
private int preIndex = -1;
private void 更新为组装坐标ToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -1256,7 +1244,7 @@ namespace TSA_V
dgvList.UpdateCellValue(y_colIndex, index);
dgvList.Rows[index].Selected = true;
}
}
}
private void btnSort_Click(object sender, EventArgs e)
......@@ -1334,26 +1322,26 @@ namespace TSA_V
dgvList.Rows[i].Cells[this.Column_Y.Name].Value = pointList[i].PositionY;
}
updateBoardInfo.smtList = pointList;
LogUtil.info("程序【{0}】的组装位置将修正完成,偏移量X[{1}],Y[{2}] ");
loadPictureBoxSize(pointList);
//重新加载
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.UpdateOk, "图片坐标修正完成!"));
txtXUpdate.Text = 0.ToString();
txtYUpdate.Text = 0.ToString();
}
}
}
}
private void btnCheck_Click(object sender, EventArgs e)
{
{
btnCheck.Enabled = false;
LogUtil.info("=======根据校准点进行校准,至少需要两个校准点----------------------------------------------------");
NCalibrationProcess();
NCalibrationProcess();
btnCheck.Enabled = true;
}
private void SetListCurrCell(int index)
{
try
......@@ -1365,7 +1353,7 @@ namespace TSA_V
}
}
private void chbShowName_CheckedChanged(object sender, EventArgs e)
{
loadPictureBoxSize();
......@@ -1395,7 +1383,7 @@ namespace TSA_V
frm.ShowDialog();
AOIManager.LoadAOIFile(cmbAOIFile,cmbAOIFile.Text);
AOIManager.LoadAOIFile(cmbAOIFile, cmbAOIFile.Text);
}
catch (Exception ex)
{
......@@ -1413,7 +1401,7 @@ namespace TSA_V
int cout = dgvList.Rows.Count;
for (int i = 0; i < cout; i++)
{
dgvList.Rows[i].Cells[this.Column_disable.Name].Value = false;
dgvList.Rows[i].Cells[this.Column_disable.Name].Value = false;
}
}
......@@ -1501,9 +1489,8 @@ namespace TSA_V
int cout = dgvList.Rows.Count;
for (int i = 0; i < cout; i++)
{
dgvList.Rows[i].Cells[this.Column_disable.Name].Value = true ;
}
dgvList.Rows[i].Cells[this.Column_disable.Name].Value = true;
}
}
}
}
......@@ -160,7 +160,7 @@ namespace TSA_V
int newCount = (int)numCount.Value;
ComponetInfo com = comList[currIndex];
com.ComCount = newCount;
com.ComCount = newCount.ToString();
CSVBomManager.UpdateComponet(bomName, com);
}
private void btnNext_Click(object sender, EventArgs e)
......
......@@ -159,7 +159,7 @@ namespace TSA_V
obj.PN = FormUtil.getValue(txtName);
obj.ComponentDes = FormUtil.getValue(txtDes);
obj.ComCount = FormUtil.GetIntValue(txtCount);
obj.ComCount = FormUtil.GetIntValue(txtCount).ToString();
obj.Notes = FormUtil.getValue(txtNotes);
obj.TagNo = FormUtil.getValue(txtPartNum);
obj.Id = FormUtil.GetIntValue(txtId);
......@@ -173,7 +173,7 @@ namespace TSA_V
return;
}
if (obj.ComCount<=0)
if (int.Parse(obj.ComCount)<=0)
{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.WriteComNum,"请输入元器件数量!"));
txtCount.Focus();
......@@ -226,7 +226,7 @@ namespace TSA_V
obj.TagNo = FormUtil.getValue(txtPartNum);
obj.PN = FormUtil.getValue(txtName);
obj.ComponentDes = FormUtil.getValue(txtDes);
obj.ComCount = FormUtil.GetIntValue(txtCount);
obj.ComCount = FormUtil.GetIntValue(txtCount).ToString();
obj.Notes = FormUtil.getValue(txtNotes);
obj.PositionNum = position.PositionNum;
//if (obj.TagNo.Equals(""))
......@@ -258,7 +258,7 @@ namespace TSA_V
return;
}
if (obj.ComCount <= 0)
if (int.Parse(obj.ComCount) <= 0)
{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.WriteComNum, "请输入元器件数量!"));
txtCount.Focus();
......@@ -316,7 +316,7 @@ namespace TSA_V
point.ComponentDes = row.Cells[this.Column_description.Name].Value.ToString();
point.Notes = row.Cells[this.Column_Notes.Name].Value.ToString();
point.PositionNum = row.Cells[this.Column_Position.Name].Value.ToString();
point.ComCount = Convert.ToInt32(row.Cells[this.Column_Count.Name].Value.ToString());
point.ComCount = row.Cells[this.Column_Count.Name].Value.ToString();
point.Id = Convert.ToInt32(row.Cells[this.Column_ID.Name].Value.ToString());
}
......@@ -373,11 +373,11 @@ namespace TSA_V
int selPosIndex = -1;
int index = -1;
string posNum = CSVBomManager.GetPositionNum(obj.PositionNum);
string[] posNum = CSVBomManager.GetPositionNum(obj.PositionNum);
foreach (TSAVPosition p in allPosition)
{
index++;
if (p.PositionNum.Equals(posNum))
if (p.PositionNum.Equals(posNum[0]))
{
selPosIndex = index;
break;
......
......@@ -213,7 +213,7 @@ namespace TSA_V
{
if (obj.PositionNum.Equals(com.PositionNum))
{
obj.ComCount = newCount;
obj.ComCount = newCount.ToString();
}
}
......
......@@ -98,6 +98,7 @@
<HintPath>..\dll\packages\OpenCvSharp3-AnyCPU.4.0.0.20181129\lib\net40\OpenCvSharp.UserInterface.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.3\lib\net46\System.Data.SQLite.dll</HintPath>
......
......@@ -38,6 +38,7 @@ namespace TSA_V
if (!IOBase.NoLine)
timer1.Start();
IsInitOk = true;
CheckIfHaveincomplete();
}
private void LoadCom()
{
......@@ -376,5 +377,23 @@ namespace TSA_V
//停止调宽
LWidthManager.StopChangeWidth();
}
private void CheckIfHaveincomplete()
{
string ProcedureName = ConfigAppSettings.GetValue(Setting_Init.ProcedureName);
string TagNumber = ConfigAppSettings.GetValue(Setting_Init.TagNumber);
if (!string.IsNullOrEmpty(ProcedureName)&&!string.IsNullOrEmpty(TagNumber))
{
cmbBoardList.Text = ProcedureName;
BoardInfo board = (BoardInfo)cmbBoardList.SelectedItem;
BoardManager.CurrBoard = board;
FrmWork fw = new FrmWork();
this.Hide();
this.Close();
fw.ShowDialog();
}
}
}
}
......@@ -36,6 +36,7 @@
this.btnCodeTest = new System.Windows.Forms.Button();
this.btnWorkInfo = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.lblGuoBan = new System.Windows.Forms.Label();
this.lblPause = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
......@@ -43,7 +44,6 @@
this.txtAuToTime = new System.Windows.Forms.TextBox();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.lblGuoBan = new System.Windows.Forms.Label();
this.btnTest = new System.Windows.Forms.Button();
this.btnStart = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
......@@ -124,9 +124,10 @@
this.btnIo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.btnIo.FlatAppearance.BorderSize = 0;
this.btnIo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnIo.Location = new System.Drawing.Point(1170, 548);
this.btnIo.Location = new System.Drawing.Point(1560, 685);
this.btnIo.Margin = new System.Windows.Forms.Padding(4);
this.btnIo.Name = "btnIo";
this.btnIo.Size = new System.Drawing.Size(51, 30);
this.btnIo.Size = new System.Drawing.Size(68, 38);
this.btnIo.TabIndex = 280;
this.btnIo.UseVisualStyleBackColor = false;
this.btnIo.Click += new System.EventHandler(this.btnIo_Click);
......@@ -137,9 +138,10 @@
this.btnCodeTest.BackColor = System.Drawing.SystemColors.Control;
this.btnCodeTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCodeTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCodeTest.Location = new System.Drawing.Point(233, 487);
this.btnCodeTest.Location = new System.Drawing.Point(311, 609);
this.btnCodeTest.Margin = new System.Windows.Forms.Padding(4);
this.btnCodeTest.Name = "btnCodeTest";
this.btnCodeTest.Size = new System.Drawing.Size(120, 60);
this.btnCodeTest.Size = new System.Drawing.Size(160, 75);
this.btnCodeTest.TabIndex = 279;
this.btnCodeTest.Text = "条码测试";
this.btnCodeTest.UseVisualStyleBackColor = false;
......@@ -152,9 +154,10 @@
this.btnWorkInfo.BackColor = System.Drawing.SystemColors.Control;
this.btnWorkInfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnWorkInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWorkInfo.Location = new System.Drawing.Point(477, 487);
this.btnWorkInfo.Location = new System.Drawing.Point(636, 609);
this.btnWorkInfo.Margin = new System.Windows.Forms.Padding(4);
this.btnWorkInfo.Name = "btnWorkInfo";
this.btnWorkInfo.Size = new System.Drawing.Size(120, 60);
this.btnWorkInfo.Size = new System.Drawing.Size(160, 75);
this.btnWorkInfo.TabIndex = 278;
this.btnWorkInfo.Text = "工作统计";
this.btnWorkInfo.UseVisualStyleBackColor = false;
......@@ -171,20 +174,37 @@
this.groupBox3.Controls.Add(this.radioButton2);
this.groupBox3.Controls.Add(this.radioButton1);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(12, 3);
this.groupBox3.Location = new System.Drawing.Point(16, 4);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(641, 96);
this.groupBox3.Padding = new System.Windows.Forms.Padding(4);
this.groupBox3.Size = new System.Drawing.Size(855, 120);
this.groupBox3.TabIndex = 277;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "工作方式";
//
// lblGuoBan
//
this.lblGuoBan.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblGuoBan.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblGuoBan.Location = new System.Drawing.Point(15, 21);
this.lblGuoBan.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblGuoBan.Name = "lblGuoBan";
this.lblGuoBan.Size = new System.Drawing.Size(824, 89);
this.lblGuoBan.TabIndex = 285;
this.lblGuoBan.Text = "过板模式";
this.lblGuoBan.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblPause
//
this.lblPause.AutoSize = true;
this.lblPause.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPause.Location = new System.Drawing.Point(179, 61);
this.lblPause.Location = new System.Drawing.Point(239, 76);
this.lblPause.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPause.Name = "lblPause";
this.lblPause.Size = new System.Drawing.Size(74, 21);
this.lblPause.Size = new System.Drawing.Size(92, 27);
this.lblPause.TabIndex = 284;
this.lblPause.Text = "暂停工作";
this.lblPause.Visible = false;
......@@ -193,18 +213,20 @@
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(584, 21);
this.label8.Location = new System.Drawing.Point(779, 26);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(23, 20);
this.label8.Size = new System.Drawing.Size(28, 24);
this.label8.TabIndex = 283;
this.label8.Text = "秒";
//
// label7
//
this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(302, 21);
this.label7.Location = new System.Drawing.Point(403, 26);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(222, 21);
this.label7.Size = new System.Drawing.Size(296, 26);
this.label7.TabIndex = 282;
this.label7.Text = "间隔时间:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -213,9 +235,10 @@
//
this.btnUpdateAutoTime.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdateAutoTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdateAutoTime.Location = new System.Drawing.Point(497, 52);
this.btnUpdateAutoTime.Location = new System.Drawing.Point(663, 65);
this.btnUpdateAutoTime.Margin = new System.Windows.Forms.Padding(4);
this.btnUpdateAutoTime.Name = "btnUpdateAutoTime";
this.btnUpdateAutoTime.Size = new System.Drawing.Size(71, 32);
this.btnUpdateAutoTime.Size = new System.Drawing.Size(95, 40);
this.btnUpdateAutoTime.TabIndex = 281;
this.btnUpdateAutoTime.Text = "更新";
this.btnUpdateAutoTime.UseVisualStyleBackColor = false;
......@@ -225,19 +248,21 @@
// txtAuToTime
//
this.txtAuToTime.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtAuToTime.Location = new System.Drawing.Point(529, 17);
this.txtAuToTime.Location = new System.Drawing.Point(705, 21);
this.txtAuToTime.Margin = new System.Windows.Forms.Padding(4);
this.txtAuToTime.MaxLength = 5;
this.txtAuToTime.Name = "txtAuToTime";
this.txtAuToTime.Size = new System.Drawing.Size(47, 29);
this.txtAuToTime.Size = new System.Drawing.Size(61, 34);
this.txtAuToTime.TabIndex = 2;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton2.Location = new System.Drawing.Point(44, 59);
this.radioButton2.Location = new System.Drawing.Point(59, 74);
this.radioButton2.Margin = new System.Windows.Forms.Padding(4);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(92, 25);
this.radioButton2.Size = new System.Drawing.Size(113, 31);
this.radioButton2.TabIndex = 1;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "自动工作";
......@@ -248,37 +273,26 @@
//
this.radioButton1.AutoSize = true;
this.radioButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.radioButton1.Location = new System.Drawing.Point(44, 21);
this.radioButton1.Location = new System.Drawing.Point(59, 26);
this.radioButton1.Margin = new System.Windows.Forms.Padding(4);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(92, 25);
this.radioButton1.Size = new System.Drawing.Size(113, 31);
this.radioButton1.TabIndex = 0;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "脚踏工作";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// lblGuoBan
//
this.lblGuoBan.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblGuoBan.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblGuoBan.Location = new System.Drawing.Point(11, 17);
this.lblGuoBan.Name = "lblGuoBan";
this.lblGuoBan.Size = new System.Drawing.Size(618, 71);
this.lblGuoBan.TabIndex = 285;
this.lblGuoBan.Text = "过板模式";
this.lblGuoBan.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnTest
//
this.btnTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnTest.BackColor = System.Drawing.SystemColors.Control;
this.btnTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTest.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTest.Location = new System.Drawing.Point(477, 487);
this.btnTest.Location = new System.Drawing.Point(636, 609);
this.btnTest.Margin = new System.Windows.Forms.Padding(4);
this.btnTest.Name = "btnTest";
this.btnTest.Size = new System.Drawing.Size(120, 60);
this.btnTest.Size = new System.Drawing.Size(160, 75);
this.btnTest.TabIndex = 272;
this.btnTest.Text = "测试";
this.btnTest.UseVisualStyleBackColor = false;
......@@ -291,9 +305,10 @@
this.btnStart.BackColor = System.Drawing.SystemColors.Control;
this.btnStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStart.Location = new System.Drawing.Point(599, 487);
this.btnStart.Location = new System.Drawing.Point(799, 609);
this.btnStart.Margin = new System.Windows.Forms.Padding(4);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(120, 60);
this.btnStart.Size = new System.Drawing.Size(160, 75);
this.btnStart.TabIndex = 266;
this.btnStart.Text = "启动";
this.btnStart.UseVisualStyleBackColor = false;
......@@ -321,9 +336,11 @@
this.groupBox1.Controls.Add(this.lblComName);
this.groupBox1.Controls.Add(this.lblPointName);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(12, 103);
this.groupBox1.Location = new System.Drawing.Point(16, 129);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(641, 220);
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(855, 296);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "组装信息:";
......@@ -333,9 +350,10 @@
this.lblStart.AutoSize = true;
this.lblStart.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStart.ForeColor = System.Drawing.Color.Olive;
this.lblStart.Location = new System.Drawing.Point(71, 194);
this.lblStart.Location = new System.Drawing.Point(95, 266);
this.lblStart.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblStart.Name = "lblStart";
this.lblStart.Size = new System.Drawing.Size(314, 22);
this.lblStart.Size = new System.Drawing.Size(392, 27);
this.lblStart.TabIndex = 283;
this.lblStart.Text = "注意:新程序已开始,已到达第一个组装点";
this.lblStart.Visible = false;
......@@ -345,9 +363,10 @@
this.lblLast.AutoSize = true;
this.lblLast.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLast.ForeColor = System.Drawing.Color.Olive;
this.lblLast.Location = new System.Drawing.Point(71, 194);
this.lblLast.Location = new System.Drawing.Point(95, 266);
this.lblLast.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblLast.Name = "lblLast";
this.lblLast.Size = new System.Drawing.Size(282, 22);
this.lblLast.Size = new System.Drawing.Size(352, 27);
this.lblLast.TabIndex = 282;
this.lblLast.Text = "注意:当前最后一步,即将开始新程序";
this.lblLast.Visible = false;
......@@ -356,9 +375,10 @@
//
this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.Location = new System.Drawing.Point(453, 74);
this.btnCancel.Location = new System.Drawing.Point(604, 92);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(68, 43);
this.btnCancel.Size = new System.Drawing.Size(91, 54);
this.btnCancel.TabIndex = 281;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = false;
......@@ -369,9 +389,10 @@
//
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(379, 74);
this.btnSave.Location = new System.Drawing.Point(505, 92);
this.btnSave.Margin = new System.Windows.Forms.Padding(4);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(68, 43);
this.btnSave.Size = new System.Drawing.Size(91, 54);
this.btnSave.TabIndex = 280;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = false;
......@@ -383,19 +404,21 @@
this.lblComNotices.AutoSize = true;
this.lblComNotices.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblComNotices.ForeColor = System.Drawing.Color.Red;
this.lblComNotices.Location = new System.Drawing.Point(193, 165);
this.lblComNotices.Location = new System.Drawing.Point(257, 206);
this.lblComNotices.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblComNotices.Name = "lblComNotices";
this.lblComNotices.Size = new System.Drawing.Size(37, 19);
this.lblComNotices.Size = new System.Drawing.Size(48, 25);
this.lblComNotices.TabIndex = 279;
this.lblComNotices.Text = "暂无";
//
// txtCount
//
this.txtCount.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtCount.Location = new System.Drawing.Point(404, 30);
this.txtCount.Location = new System.Drawing.Point(539, 38);
this.txtCount.Margin = new System.Windows.Forms.Padding(4);
this.txtCount.MaxLength = 6;
this.txtCount.Name = "txtCount";
this.txtCount.Size = new System.Drawing.Size(88, 29);
this.txtCount.Size = new System.Drawing.Size(116, 34);
this.txtCount.TabIndex = 278;
this.txtCount.Visible = false;
//
......@@ -404,9 +427,10 @@
this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.label6.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label6.Location = new System.Drawing.Point(43, 20);
this.label6.Location = new System.Drawing.Point(57, 25);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(128, 19);
this.label6.Size = new System.Drawing.Size(171, 24);
this.label6.TabIndex = 277;
this.label6.Text = "编号:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -416,9 +440,10 @@
this.lblPartNum.AutoSize = true;
this.lblPartNum.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPartNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblPartNum.Location = new System.Drawing.Point(193, 20);
this.lblPartNum.Location = new System.Drawing.Point(257, 25);
this.lblPartNum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPartNum.Name = "lblPartNum";
this.lblPartNum.Size = new System.Drawing.Size(37, 19);
this.lblPartNum.Size = new System.Drawing.Size(48, 25);
this.lblPartNum.TabIndex = 276;
this.lblPartNum.Text = "暂无";
//
......@@ -426,9 +451,10 @@
//
this.btnUpateCount.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpateCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpateCount.Location = new System.Drawing.Point(393, 74);
this.btnUpateCount.Location = new System.Drawing.Point(524, 92);
this.btnUpateCount.Margin = new System.Windows.Forms.Padding(4);
this.btnUpateCount.Name = "btnUpateCount";
this.btnUpateCount.Size = new System.Drawing.Size(117, 43);
this.btnUpateCount.Size = new System.Drawing.Size(156, 54);
this.btnUpateCount.TabIndex = 275;
this.btnUpateCount.Text = "编辑数量";
this.btnUpateCount.UseVisualStyleBackColor = false;
......@@ -439,9 +465,10 @@
this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.label5.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Location = new System.Drawing.Point(43, 78);
this.label5.Location = new System.Drawing.Point(57, 98);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(128, 19);
this.label5.Size = new System.Drawing.Size(171, 24);
this.label5.TabIndex = 274;
this.label5.Text = "剩余数量:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -451,9 +478,10 @@
this.lblCount.AutoSize = true;
this.lblCount.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblCount.Location = new System.Drawing.Point(193, 78);
this.lblCount.Location = new System.Drawing.Point(257, 98);
this.lblCount.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblCount.Name = "lblCount";
this.lblCount.Size = new System.Drawing.Size(37, 19);
this.lblCount.Size = new System.Drawing.Size(48, 25);
this.lblCount.TabIndex = 273;
this.lblCount.Text = "暂无";
//
......@@ -462,9 +490,10 @@
this.lblPositionNum.AutoSize = true;
this.lblPositionNum.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPositionNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblPositionNum.Location = new System.Drawing.Point(193, 107);
this.lblPositionNum.Location = new System.Drawing.Point(257, 134);
this.lblPositionNum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPositionNum.Name = "lblPositionNum";
this.lblPositionNum.Size = new System.Drawing.Size(42, 22);
this.lblPositionNum.Size = new System.Drawing.Size(52, 27);
this.lblPositionNum.TabIndex = 8;
this.lblPositionNum.Text = "暂无";
//
......@@ -473,9 +502,10 @@
this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label4.Location = new System.Drawing.Point(43, 107);
this.label4.Location = new System.Drawing.Point(57, 134);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(128, 19);
this.label4.Size = new System.Drawing.Size(171, 24);
this.label4.TabIndex = 7;
this.label4.Text = "位置:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -485,9 +515,10 @@
this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label1.Location = new System.Drawing.Point(43, 136);
this.label1.Location = new System.Drawing.Point(57, 170);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(128, 19);
this.label1.Size = new System.Drawing.Size(171, 24);
this.label1.TabIndex = 6;
this.label1.Text = "描述:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -497,9 +528,10 @@
this.lblComDes.AutoSize = true;
this.lblComDes.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblComDes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblComDes.Location = new System.Drawing.Point(193, 136);
this.lblComDes.Location = new System.Drawing.Point(257, 170);
this.lblComDes.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblComDes.Name = "lblComDes";
this.lblComDes.Size = new System.Drawing.Size(37, 19);
this.lblComDes.Size = new System.Drawing.Size(48, 25);
this.lblComDes.TabIndex = 3;
this.lblComDes.Text = "暂无";
//
......@@ -508,9 +540,10 @@
this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.ForeColor = System.Drawing.Color.Red;
this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label2.Location = new System.Drawing.Point(43, 165);
this.label2.Location = new System.Drawing.Point(57, 206);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(128, 19);
this.label2.Size = new System.Drawing.Size(171, 24);
this.label2.TabIndex = 5;
this.label2.Text = "注意事项:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -520,9 +553,10 @@
this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label3.Location = new System.Drawing.Point(43, 49);
this.label3.Location = new System.Drawing.Point(57, 61);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(128, 19);
this.label3.Size = new System.Drawing.Size(171, 24);
this.label3.TabIndex = 4;
this.label3.Text = "名称:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -532,9 +566,10 @@
this.lblComName.AutoSize = true;
this.lblComName.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblComName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblComName.Location = new System.Drawing.Point(410, 165);
this.lblComName.Location = new System.Drawing.Point(547, 206);
this.lblComName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblComName.Name = "lblComName";
this.lblComName.Size = new System.Drawing.Size(37, 19);
this.lblComName.Size = new System.Drawing.Size(48, 25);
this.lblComName.TabIndex = 2;
this.lblComName.Text = "暂无";
this.lblComName.Visible = false;
......@@ -544,9 +579,10 @@
this.lblPointName.AutoSize = true;
this.lblPointName.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblPointName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblPointName.Location = new System.Drawing.Point(193, 49);
this.lblPointName.Location = new System.Drawing.Point(257, 61);
this.lblPointName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPointName.Name = "lblPointName";
this.lblPointName.Size = new System.Drawing.Size(42, 22);
this.lblPointName.Size = new System.Drawing.Size(52, 27);
this.lblPointName.TabIndex = 1;
this.lblPointName.Text = "暂无";
//
......@@ -556,9 +592,11 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.panPoint);
this.groupBox2.Location = new System.Drawing.Point(659, 3);
this.groupBox2.Location = new System.Drawing.Point(879, 4);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(552, 460);
this.groupBox2.Padding = new System.Windows.Forms.Padding(4);
this.groupBox2.Size = new System.Drawing.Size(736, 599);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "局部图";
......@@ -569,9 +607,10 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panPoint.Controls.Add(this.picPoint);
this.panPoint.Location = new System.Drawing.Point(6, 17);
this.panPoint.Location = new System.Drawing.Point(8, 21);
this.panPoint.Margin = new System.Windows.Forms.Padding(4);
this.panPoint.Name = "panPoint";
this.panPoint.Size = new System.Drawing.Size(541, 437);
this.panPoint.Size = new System.Drawing.Size(721, 569);
this.panPoint.TabIndex = 3;
//
// picPoint
......@@ -580,8 +619,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.picPoint.Location = new System.Drawing.Point(0, 0);
this.picPoint.Margin = new System.Windows.Forms.Padding(4);
this.picPoint.Name = "picPoint";
this.picPoint.Size = new System.Drawing.Size(505, 391);
this.picPoint.Size = new System.Drawing.Size(673, 512);
this.picPoint.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picPoint.TabIndex = 2;
this.picPoint.TabStop = false;
......@@ -592,9 +632,11 @@
| System.Windows.Forms.AnchorStyles.Left)));
this.gbBoardInfo.Controls.Add(this.panBoard);
this.gbBoardInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbBoardInfo.Location = new System.Drawing.Point(12, 327);
this.gbBoardInfo.Location = new System.Drawing.Point(16, 433);
this.gbBoardInfo.Margin = new System.Windows.Forms.Padding(4);
this.gbBoardInfo.Name = "gbBoardInfo";
this.gbBoardInfo.Size = new System.Drawing.Size(641, 136);
this.gbBoardInfo.Padding = new System.Windows.Forms.Padding(4);
this.gbBoardInfo.Size = new System.Drawing.Size(855, 170);
this.gbBoardInfo.TabIndex = 0;
this.gbBoardInfo.TabStop = false;
this.gbBoardInfo.Text = "全局图(粉色表示已完成;橘色表示未开始;红色表示实时位置)";
......@@ -605,9 +647,10 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Location = new System.Drawing.Point(6, 18);
this.panBoard.Location = new System.Drawing.Point(8, 22);
this.panBoard.Margin = new System.Windows.Forms.Padding(4);
this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(630, 111);
this.panBoard.Size = new System.Drawing.Size(840, 139);
this.panBoard.TabIndex = 3;
//
// picBoard
......@@ -615,9 +658,10 @@
this.picBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.picBoard.Location = new System.Drawing.Point(1, 3);
this.picBoard.Location = new System.Drawing.Point(1, 4);
this.picBoard.Margin = new System.Windows.Forms.Padding(4);
this.picBoard.Name = "picBoard";
this.picBoard.Size = new System.Drawing.Size(627, 43);
this.picBoard.Size = new System.Drawing.Size(836, 54);
this.picBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.picBoard.TabIndex = 1;
this.picBoard.TabStop = false;
......@@ -628,9 +672,10 @@
this.btnCamera.BackColor = System.Drawing.SystemColors.Control;
this.btnCamera.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCamera.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCamera.Location = new System.Drawing.Point(355, 487);
this.btnCamera.Location = new System.Drawing.Point(473, 609);
this.btnCamera.Margin = new System.Windows.Forms.Padding(4);
this.btnCamera.Name = "btnCamera";
this.btnCamera.Size = new System.Drawing.Size(120, 60);
this.btnCamera.Size = new System.Drawing.Size(160, 75);
this.btnCamera.TabIndex = 274;
this.btnCamera.Text = "AOI检测";
this.btnCamera.UseVisualStyleBackColor = false;
......@@ -642,9 +687,10 @@
this.btnStartWorking.BackColor = System.Drawing.SystemColors.Control;
this.btnStartWorking.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStartWorking.Font = new System.Drawing.Font("微软雅黑", 10.5F);
this.btnStartWorking.Location = new System.Drawing.Point(721, 487);
this.btnStartWorking.Location = new System.Drawing.Point(961, 609);
this.btnStartWorking.Margin = new System.Windows.Forms.Padding(4);
this.btnStartWorking.Name = "btnStartWorking";
this.btnStartWorking.Size = new System.Drawing.Size(120, 60);
this.btnStartWorking.Size = new System.Drawing.Size(160, 75);
this.btnStartWorking.TabIndex = 263;
this.btnStartWorking.Text = "开始工作";
this.btnStartWorking.UseVisualStyleBackColor = false;
......@@ -656,9 +702,10 @@
this.btnGoHome.BackColor = System.Drawing.SystemColors.Control;
this.btnGoHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGoHome.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGoHome.Location = new System.Drawing.Point(599, 487);
this.btnGoHome.Location = new System.Drawing.Point(799, 609);
this.btnGoHome.Margin = new System.Windows.Forms.Padding(4);
this.btnGoHome.Name = "btnGoHome";
this.btnGoHome.Size = new System.Drawing.Size(120, 60);
this.btnGoHome.Size = new System.Drawing.Size(160, 75);
this.btnGoHome.TabIndex = 273;
this.btnGoHome.Text = "复位";
this.btnGoHome.UseVisualStyleBackColor = false;
......@@ -670,9 +717,10 @@
this.btnPrePoint.BackColor = System.Drawing.SystemColors.Control;
this.btnPrePoint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnPrePoint.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPrePoint.Location = new System.Drawing.Point(843, 487);
this.btnPrePoint.Location = new System.Drawing.Point(1124, 609);
this.btnPrePoint.Margin = new System.Windows.Forms.Padding(4);
this.btnPrePoint.Name = "btnPrePoint";
this.btnPrePoint.Size = new System.Drawing.Size(120, 60);
this.btnPrePoint.Size = new System.Drawing.Size(160, 75);
this.btnPrePoint.TabIndex = 272;
this.btnPrePoint.Text = "上一步";
this.btnPrePoint.UseVisualStyleBackColor = false;
......@@ -684,9 +732,10 @@
this.btnNextPoint.BackColor = System.Drawing.SystemColors.Control;
this.btnNextPoint.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNextPoint.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNextPoint.Location = new System.Drawing.Point(965, 487);
this.btnNextPoint.Location = new System.Drawing.Point(1287, 609);
this.btnNextPoint.Margin = new System.Windows.Forms.Padding(4);
this.btnNextPoint.Name = "btnNextPoint";
this.btnNextPoint.Size = new System.Drawing.Size(120, 60);
this.btnNextPoint.Size = new System.Drawing.Size(160, 75);
this.btnNextPoint.TabIndex = 271;
this.btnNextPoint.Text = "下一步";
this.btnNextPoint.UseVisualStyleBackColor = false;
......@@ -698,9 +747,10 @@
this.btnStop.BackColor = System.Drawing.SystemColors.Control;
this.btnStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStop.Location = new System.Drawing.Point(1087, 487);
this.btnStop.Location = new System.Drawing.Point(1449, 609);
this.btnStop.Margin = new System.Windows.Forms.Padding(4);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(120, 60);
this.btnStop.Size = new System.Drawing.Size(160, 75);
this.btnStop.TabIndex = 270;
this.btnStop.Text = "结束";
this.btnStop.UseVisualStyleBackColor = false;
......@@ -708,6 +758,7 @@
//
// menuStrip1
//
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.插件机ToolStripMenuItem,
this.样品配置ToolStripMenuItem,
......@@ -716,7 +767,7 @@
this.系统ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1105, 25);
this.menuStrip1.Size = new System.Drawing.Size(1473, 31);
this.menuStrip1.TabIndex = 3;
this.menuStrip1.Text = "menuStrip1";
this.menuStrip1.Visible = false;
......@@ -728,25 +779,25 @@
this.停止ToolStripMenuItem,
this.复位ToolStripMenuItem});
this.插件机ToolStripMenuItem.Name = "插件机ToolStripMenuItem";
this.插件机ToolStripMenuItem.Size = new System.Drawing.Size(56, 21);
this.插件机ToolStripMenuItem.Size = new System.Drawing.Size(68, 27);
this.插件机ToolStripMenuItem.Text = "插件机";
//
// 启动ToolStripMenuItem
//
this.启动ToolStripMenuItem.Name = "启动ToolStripMenuItem";
this.启动ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.启动ToolStripMenuItem.Size = new System.Drawing.Size(122, 26);
this.启动ToolStripMenuItem.Text = "启动";
//
// 停止ToolStripMenuItem
//
this.停止ToolStripMenuItem.Name = "停止ToolStripMenuItem";
this.停止ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.停止ToolStripMenuItem.Size = new System.Drawing.Size(122, 26);
this.停止ToolStripMenuItem.Text = "停止";
//
// 复位ToolStripMenuItem
//
this.复位ToolStripMenuItem.Name = "复位ToolStripMenuItem";
this.复位ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.复位ToolStripMenuItem.Size = new System.Drawing.Size(122, 26);
this.复位ToolStripMenuItem.Text = "复位";
//
// 样品配置ToolStripMenuItem
......@@ -754,13 +805,13 @@
this.样品配置ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.样品编辑ToolStripMenuItem});
this.样品配置ToolStripMenuItem.Name = "样品配置ToolStripMenuItem";
this.样品配置ToolStripMenuItem.Size = new System.Drawing.Size(68, 21);
this.样品配置ToolStripMenuItem.Size = new System.Drawing.Size(83, 27);
this.样品配置ToolStripMenuItem.Text = "样品配置";
//
// 样品编辑ToolStripMenuItem
//
this.样品编辑ToolStripMenuItem.Name = "样品编辑ToolStripMenuItem";
this.样品编辑ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.样品编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 26);
this.样品编辑ToolStripMenuItem.Text = "样品编辑";
//
// 元器件配置ToolStripMenuItem
......@@ -768,13 +819,13 @@
this.元器件配置ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.元器件编辑ToolStripMenuItem});
this.元器件配置ToolStripMenuItem.Name = "元器件配置ToolStripMenuItem";
this.元器件配置ToolStripMenuItem.Size = new System.Drawing.Size(80, 21);
this.元器件配置ToolStripMenuItem.Size = new System.Drawing.Size(98, 27);
this.元器件配置ToolStripMenuItem.Text = "元器件配置";
//
// 元器件编辑ToolStripMenuItem
//
this.元器件编辑ToolStripMenuItem.Name = "元器件编辑ToolStripMenuItem";
this.元器件编辑ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.元器件编辑ToolStripMenuItem.Size = new System.Drawing.Size(167, 26);
this.元器件编辑ToolStripMenuItem.Text = "元器件编辑";
//
// 料格配置ToolStripMenuItem
......@@ -782,13 +833,13 @@
this.料格配置ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.料格编辑ToolStripMenuItem});
this.料格配置ToolStripMenuItem.Name = "料格配置ToolStripMenuItem";
this.料格配置ToolStripMenuItem.Size = new System.Drawing.Size(68, 21);
this.料格配置ToolStripMenuItem.Size = new System.Drawing.Size(83, 27);
this.料格配置ToolStripMenuItem.Text = "料格配置";
//
// 料格编辑ToolStripMenuItem
//
this.料格编辑ToolStripMenuItem.Name = "料格编辑ToolStripMenuItem";
this.料格编辑ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.料格编辑ToolStripMenuItem.Size = new System.Drawing.Size(152, 26);
this.料格编辑ToolStripMenuItem.Text = "料格编辑";
//
// 系统ToolStripMenuItem
......@@ -796,13 +847,13 @@
this.系统ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.退出ToolStripMenuItem});
this.系统ToolStripMenuItem.Name = "系统ToolStripMenuItem";
this.系统ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.系统ToolStripMenuItem.Size = new System.Drawing.Size(53, 27);
this.系统ToolStripMenuItem.Text = "系统";
//
// 退出ToolStripMenuItem
//
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(100, 22);
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(122, 26);
this.退出ToolStripMenuItem.Text = "退出";
//
// lblNotices
......@@ -810,9 +861,10 @@
this.lblNotices.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblNotices.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblNotices.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblNotices.Location = new System.Drawing.Point(15, 547);
this.lblNotices.Location = new System.Drawing.Point(20, 684);
this.lblNotices.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblNotices.Name = "lblNotices";
this.lblNotices.Size = new System.Drawing.Size(568, 23);
this.lblNotices.Size = new System.Drawing.Size(757, 29);
this.lblNotices.TabIndex = 276;
//
// lblBoardPoint
......@@ -820,18 +872,20 @@
this.lblBoardPoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lblBoardPoint.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBoardPoint.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblBoardPoint.Location = new System.Drawing.Point(15, 520);
this.lblBoardPoint.Location = new System.Drawing.Point(20, 650);
this.lblBoardPoint.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblBoardPoint.Name = "lblBoardPoint";
this.lblBoardPoint.Size = new System.Drawing.Size(568, 23);
this.lblBoardPoint.Size = new System.Drawing.Size(757, 29);
this.lblBoardPoint.TabIndex = 272;
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.panel1.Controls.Add(this.lblMsg);
this.panel1.Location = new System.Drawing.Point(12, 470);
this.panel1.Location = new System.Drawing.Point(16, 611);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(568, 46);
this.panel1.Size = new System.Drawing.Size(757, 58);
this.panel1.TabIndex = 269;
//
// lblMsg
......@@ -839,17 +893,18 @@
this.lblMsg.AutoSize = true;
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.ForeColor = System.Drawing.Color.Red;
this.lblMsg.Location = new System.Drawing.Point(4, 5);
this.lblMsg.Location = new System.Drawing.Point(5, 6);
this.lblMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(68, 17);
this.lblMsg.Size = new System.Drawing.Size(84, 20);
this.lblMsg.TabIndex = 3;
this.lblMsg.Text = "未开始工作";
//
// FrmWork
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1223, 579);
this.ClientSize = new System.Drawing.Size(1631, 724);
this.Controls.Add(this.btnIo);
this.Controls.Add(this.btnCodeTest);
this.Controls.Add(this.btnWorkInfo);
......@@ -872,6 +927,7 @@
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(5);
this.Name = "FrmWork";
this.Text = "TSA_V工作";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
......
......@@ -17,6 +17,8 @@ using AOI;
using System.Threading.Tasks;
using System.Net.Http;
using TSA_V.DeviceLibrary.manager;
using System.Linq;
using System.Configuration;
namespace TSA_V
{
......@@ -27,11 +29,13 @@ namespace TSA_V
InitializeComponent();
}
private bool isInitOk = false;
private BoardInfo board = BoardManager.CurrBoard;
private PointDisplay display = new PointDisplay();
private List<SMTPointInfo> workSmtList = new List<SMTPointInfo>();
private void FrmWelding_Load(object sender, EventArgs e)
{
btnCamera.Visible = TSAVBean.IsNeedAOI;
TSAVBean.Work.WorkType = 1;
LanguageProcess();
......@@ -63,7 +67,15 @@ namespace TSA_V
smtPoint = new SMTPointInfo();
timerShowForm.Stop();
if (workSmtList.Count > 0)
int TagNumber = ConfigAppSettings.GetIntValue(Setting_Init.TagNumber);
if (workSmtList.Count > 0&&TagNumber!=0)
{
//int TagNumber =ConfigAppSettings.GetIntValue(Setting_Init.TagNumber);
var workSmt = workSmtList.Where(a => a.pointNum == TagNumber).FirstOrDefault();
smtPoint = workSmt;
preIndex = TagNumber-1;//索引从0开始
}
else
{
smtPoint = workSmtList[0];
}
......@@ -571,25 +583,74 @@ namespace TSA_V
lblPositionNum.Text = smtPoint.PositionNum;
lblPartNum.Text = smtPoint.TagNo;
lblPointName.Text = smtPoint.PN;
ComponetInfo com = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, smtPoint);
#region 2023-10-31修改
ComponetInfo com = null;
com=CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, smtPoint);
if (com != null)
{
TSAVPosition position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
if (position != null)
TSAVPosition position = null;
if (int.Parse(com.ComCount) <= 0)
{
lblComDes.Text = com.ComponentDes;
this.lblComName.Text = com.PN;
lblCount.Text = com.ComCount.ToString();
txtCount.Text = com.ComCount.ToString();
var smtpoint=workSmtList.Where(a=>a.PN==com.PN).ToList();
foreach (var item in smtpoint)
{
var componeinfo = CSVBomManager.GetCom(BoardManager.CurrBoard.bomName, item);
if (componeinfo != null && int.Parse(componeinfo.ComCount) > 0)
{
position = CSVPositionReader<TSAVPosition>.GetPositonByNum(componeinfo.PositionNum);
if (position != null)
{
com = componeinfo;
break;
}
}
}
string str = $"{smtPoint.PositionNum}位置元器件{smtPoint.PN}数量不足,请及时补充;\n当前使用{com.PositionNum}位置的元器件{com.PN},数量为{com.ComCount}";
lblComNotices.Text = str;
//lblComNotices.Text = ResourceCulture.GetString("元器件数量不足,请及时补充;当前使用位置的元器件", $"{smtPoint.PositionNum}位置元器件{smtPoint.PN}数量不足,请及时补充;当前使用{com.PositionNum}位置的元器件{com.PN},数量为{com.ComCount}");
}
else
{
lblPositionNum.Text = position.PositionNum;
position = CSVPositionReader<TSAVPosition>.GetPositonByNum(com.PositionNum);
if (position != null)
{
lblPositionNum.Text = position.PositionNum;
}
lblComDes.Text = com.ComponentDes;
this.lblComName.Text = com.PN;
lblCount.Text = com.ComCount.ToString();
txtCount.Text = com.ComCount.ToString();
lblComNotices.Text = com.Notes.ToString();
}
//if (position != null)
//{
// lblPositionNum.Text = position.PositionNum;
//}
lblComDes.Text = com.ComponentDes;
this.lblComName.Text = com.PN;
lblCount.Text = com.ComCount.ToString();
txtCount.Text = com.ComCount.ToString();
lblComNotices.Text = com.Notes.ToString();
if (com.ComCount <= 0)
//lblComDes.Text = com.ComponentDes;
//this.lblComName.Text = com.PN;
//lblCount.Text = com.ComCount.ToString();
//txtCount.Text = com.ComCount.ToString();
//lblComNotices.Text = com.Notes.ToString();
//if (int.Parse(com.ComCount) <= 0)
//{
//lblComNotices.Text = ResourceCulture.GetString("元器件数量不足,请及时补充", "元器件数量不足,请及时补充");
//}
//记录运行过程的位号
ConfigAppSettings.UpdateAppSetting(Setting_Init.ProcedureName, board.boardName);
ConfigAppSettings.UpdateAppSetting(Setting_Init.TagNumber, smtPoint.pointNum.ToString());
if (smtPoint.pointNum==1)//第一个位号不需要记录
{
lblComNotices.Text = ResourceCulture.GetString("元器件数量不足,请及时补充", "元器件数量不足,请及时补充");
ConfigAppSettings.UpdateAppSetting(Setting_Init.ProcedureName, "");
ConfigAppSettings.UpdateAppSetting(Setting_Init.TagNumber, "");
}
#endregion
}
else
{
......@@ -676,6 +737,7 @@ namespace TSA_V
return;
}
preIndex = TSAVBean.Work.currIndex;
smtPoint = TSAVBean.Work.currPoint;
ShowMsg();
......@@ -839,7 +901,7 @@ namespace TSA_V
else if (leftCount <= 0)
{
lblStart.Visible = false;
lblLast.Visible = true;
lblLast.Visible = true;
}
else
{
......@@ -854,7 +916,7 @@ namespace TSA_V
else
{
lblBoardPoint.Text = ResourceCulture.GetString(ResourceCulture.PointInfoMsg2, "当前:第{0}步", (preIndex + 1).ToString());
}
}
Crop(Brushes.Red);
if (timerShowForm.Enabled.Equals(false))
{
......@@ -1022,6 +1084,6 @@ namespace TSA_V
{
FrmIoManager frmWorkIo = new FrmIoManager(true);
frmWorkIo.ShowDialog();
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!