Commit 57ff2c2d LN

增加工作区检测信号开始工作选项。修改组装信息保存的bug

1 个父辈 5e6b7453
...@@ -171,5 +171,7 @@ namespace TSA_V.Common ...@@ -171,5 +171,7 @@ namespace TSA_V.Common
public static string IsCycleDebug = "IsCycleDebug"; public static string IsCycleDebug = "IsCycleDebug";
public static string SideCylinderMoveFirst = "SideCylinderMoveFirst"; public static string SideCylinderMoveFirst = "SideCylinderMoveFirst";
public static string WorkSingleStart = "WorkSingleStart";
} }
} }
...@@ -119,26 +119,7 @@ namespace TSA_V.LoadCSVLibrary ...@@ -119,26 +119,7 @@ namespace TSA_V.LoadCSVLibrary
} }
return result; return result;
} }
/// <summary>
/// 根据Key获得一个位置信息
/// </summary>
public static T GetPositon(string positionNum)
{
if (positionNum == null)
{
return null;
}
PostionBase result = null;
if (allPositionMap.ContainsKey(positionNum))
{
result = allPositionMap[positionNum];
return (T)result;
}
else
{
return null;
}
}
public static bool SavePostion(string filePath, T position) public static bool SavePostion(string filePath, T position)
{ {
...@@ -266,18 +247,6 @@ namespace TSA_V.LoadCSVLibrary ...@@ -266,18 +247,6 @@ namespace TSA_V.LoadCSVLibrary
AddCSVFile(filePath); AddCSVFile(filePath);
} }
//public static T GetPositonByComId(int comId)
//{
// foreach (T p in allPositionMap.Values)
// {
// if (p.ComponentId.Equals(comId))
// {
// return p;
// }
// }
// return null;
//}
public static T GetPositonByNum(string positionNum) public static T GetPositonByNum(string positionNum)
{ {
foreach (T p in allPositionMap.Values) foreach (T p in allPositionMap.Values)
...@@ -287,6 +256,13 @@ namespace TSA_V.LoadCSVLibrary ...@@ -287,6 +256,13 @@ namespace TSA_V.LoadCSVLibrary
return p; return p;
} }
} }
foreach (T p in allPositionMap.Values)
{
if (p.PositionNum.ToString().Equals(positionNum))
{
return p;
}
}
return null; return null;
} }
} }
......
...@@ -27,6 +27,7 @@ namespace TSA_V.DeviceLibrary ...@@ -27,6 +27,7 @@ namespace TSA_V.DeviceLibrary
public static bool OnlyGuoBan = false; public static bool OnlyGuoBan = false;
public static bool WorkSingleStart = false;
private static void StartLineCheck() private static void StartLineCheck()
{ {
if (WarnMsg.Contains("超时") || WarnMsg.ToLower().Contains("timeout")) if (WarnMsg.Contains("超时") || WarnMsg.ToLower().Contains("timeout"))
...@@ -52,17 +53,42 @@ namespace TSA_V.DeviceLibrary ...@@ -52,17 +53,42 @@ namespace TSA_V.DeviceLibrary
IOManager.IOMove(IOManager.SMEMA_Down, IO_VALUE.LOW); IOManager.IOMove(IOManager.SMEMA_Down, IO_VALUE.LOW);
if (OnlyGuoBan) if (OnlyGuoBan)
{ {
LogUtil.info("开始流水线转动:挡停气缸下降,侧挡气缸后退,底部气缸下降"); LogUtil.info("线体入口检测到电路板:挡停气缸下降,侧挡气缸后退,底部气缸下降");
BottomCylinderDown(true ); BottomCylinderDown(true );
CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true ); CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true );
SideCyliderBack(true ); SideCyliderBack(true );
} }
else else
{ {
LogUtil.info("开始流水线转动:挡停气缸上升,侧挡气缸后退,底部气缸下降"); LogUtil.info("线体入口检测到电路板:挡停气缸上升,侧挡气缸后退,底部气缸下降");
CylinderReset(true); CylinderReset(true);
} }
} }
} else if (WorkSingleStart)
{
if ( (IOManager.IOValue(IOManager.LineWorkCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IOManager.LineOutCheck).Equals(IO_VALUE.LOW)))
{
if (LineStep.moveType.Equals(0))
{
StartWorkTime = DateTime.Now;
LineStep.NewMove();
LineStep.NextStep(StepEnum.LS01_StopUp);
IOManager.IOMove(IOManager.SMEMA_Up, IO_VALUE.LOW);
IOManager.IOMove(IOManager.SMEMA_Down, IO_VALUE.LOW);
if (OnlyGuoBan)
{
LogUtil.info("线体工作区检测到电路板:挡停气缸下降,侧挡气缸后退,底部气缸下降");
BottomCylinderDown(true);
CylinderMove(IOManager.StopCylinder_Up, IOManager.StopCylinder_Down, true);
SideCyliderBack(true);
}
else
{
LogUtil.info("线体工作区检测到电路板:挡停气缸上升,侧挡气缸后退,底部气缸下降");
CylinderReset(true);
}
}
}
} }
//检测到出口信号,开始倒转 //检测到出口信号,开始倒转
//else if (IOManager.IOValue(IOManager.LineOutCheck).Equals(IO_VALUE.HIGH) && LoopTest) //else if (IOManager.IOValue(IOManager.LineOutCheck).Equals(IO_VALUE.HIGH) && LoopTest)
......
...@@ -108,6 +108,8 @@ ...@@ -108,6 +108,8 @@
<add key="NeedPCBCode" value="0" /> <add key="NeedPCBCode" value="0" />
<!--是否调整气缸顺序,配置1时,侧挡气缸前进,底部气缸在上升--> <!--是否调整气缸顺序,配置1时,侧挡气缸前进,底部气缸在上升-->
<add key ="SideCylinderMoveFirst" value ="1"/> <add key ="SideCylinderMoveFirst" value ="1"/>
<!--是否启用工作区信号触发开始工作-->
<add key ="WorkSingleStart" value ="0"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender"> <appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -45,9 +45,7 @@ ...@@ -45,9 +45,7 @@
this.label3 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label();
this.txtNum = new System.Windows.Forms.TextBox(); this.txtNum = new System.Windows.Forms.TextBox();
this.chbNeedSoldering = new System.Windows.Forms.CheckBox(); this.chbNeedSoldering = new System.Windows.Forms.CheckBox();
this.cmbPositionNumList = new System.Windows.Forms.ComboBox();
this.txtY = new System.Windows.Forms.TextBox(); this.txtY = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox(); this.txtName = new System.Windows.Forms.TextBox();
...@@ -118,9 +116,7 @@ ...@@ -118,9 +116,7 @@
this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtNum); this.groupBox1.Controls.Add(this.txtNum);
this.groupBox1.Controls.Add(this.chbNeedSoldering); this.groupBox1.Controls.Add(this.chbNeedSoldering);
this.groupBox1.Controls.Add(this.cmbPositionNumList);
this.groupBox1.Controls.Add(this.txtY); this.groupBox1.Controls.Add(this.txtY);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txtName); this.groupBox1.Controls.Add(this.txtName);
...@@ -235,17 +231,6 @@ ...@@ -235,17 +231,6 @@
this.chbNeedSoldering.UseVisualStyleBackColor = true; this.chbNeedSoldering.UseVisualStyleBackColor = true;
this.chbNeedSoldering.Visible = false; this.chbNeedSoldering.Visible = false;
// //
// cmbPositionNumList
//
this.cmbPositionNumList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbPositionNumList.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbPositionNumList.FormattingEnabled = true;
this.cmbPositionNumList.Location = new System.Drawing.Point(434, 24);
this.cmbPositionNumList.Name = "cmbPositionNumList";
this.cmbPositionNumList.Size = new System.Drawing.Size(48, 24);
this.cmbPositionNumList.TabIndex = 63;
this.cmbPositionNumList.Visible = false;
//
// txtY // txtY
// //
this.txtY.Enabled = false; this.txtY.Enabled = false;
...@@ -255,16 +240,6 @@ ...@@ -255,16 +240,6 @@
this.txtY.Size = new System.Drawing.Size(89, 23); this.txtY.Size = new System.Drawing.Size(89, 23);
this.txtY.TabIndex = 77; this.txtY.TabIndex = 77;
// //
// label5
//
this.label5.Location = new System.Drawing.Point(344, 26);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(85, 22);
this.label5.TabIndex = 62;
this.label5.Text = "元器件位置:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.label5.Visible = false;
//
// label4 // label4
// //
this.label4.Enabled = false; this.label4.Enabled = false;
...@@ -373,8 +348,6 @@ ...@@ -373,8 +348,6 @@
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtX; private System.Windows.Forms.TextBox txtX;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.ComboBox cmbPositionNumList;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtNum; private System.Windows.Forms.TextBox txtNum;
private System.Windows.Forms.Button btnSaveAndNext; private System.Windows.Forms.Button btnSaveAndNext;
private System.Windows.Forms.CheckBox chbNeedCheck; private System.Windows.Forms.CheckBox chbNeedCheck;
......
...@@ -32,10 +32,10 @@ namespace TSA_V ...@@ -32,10 +32,10 @@ namespace TSA_V
this.Text = "新增组装信息"; this.Text = "新增组装信息";
this.txtNum.Enabled = true; this.txtNum.Enabled = true;
this.txtName.Text = name; this.txtName.Text = name;
if (cmbPositionNumList.Items.Count > 0) //if (cmbPositionNumList.Items.Count > 0)
{ //{
cmbPositionNumList.SelectedIndex = 0; // cmbPositionNumList.SelectedIndex = 0;
} //}
//this.txtRobotX.Text = nodex.ToString(); //this.txtRobotX.Text = nodex.ToString();
//txtRobotY.Text = nodey.ToString(); //txtRobotY.Text = nodey.ToString();
xyMoveControl1.ShowPointEvent += XyMoveControl1_ShowPointEvent; xyMoveControl1.ShowPointEvent += XyMoveControl1_ShowPointEvent;
...@@ -58,10 +58,10 @@ namespace TSA_V ...@@ -58,10 +58,10 @@ namespace TSA_V
private void loadPositionList() private void loadPositionList()
{ {
cmbPositionNumList.DataSource = null; //cmbPositionNumList.DataSource = null;
cmbPositionNumList.DataSource = allPosition; //cmbPositionNumList.DataSource = allPosition;
cmbPositionNumList.DisplayMember = "PositionNum"; //cmbPositionNumList.DisplayMember = "PositionNum";
cmbPositionNumList.ValueMember = "PositionNum"; //cmbPositionNumList.ValueMember = "PositionNum";
} }
public List<SMTPointInfo> PointList = new List<SMTPointInfo>(); public List<SMTPointInfo> PointList = new List<SMTPointInfo>();
...@@ -91,18 +91,30 @@ namespace TSA_V ...@@ -91,18 +91,30 @@ namespace TSA_V
this.txtName.Text = smtPointInfo.pointName; this.txtName.Text = smtPointInfo.pointName;
int index = -1; int index = -1;
int selPosIndex = -1;
foreach (TSAVPosition p in allPosition) foreach (TSAVPosition p in allPosition)
{ {
index++; index++;
if (p.PositionNum.Equals(smtPointInfo.PositionNum)) if (p.PositionNum.Equals(smtPointInfo.PositionNum))
{ {
selPosIndex = index;
break; break;
} }
} }
if (index >= 0) index = -1; selPosIndex = -1;
foreach (TSAVPosition p in allPosition)
{
index++;
if (p.PositionNo.ToString().Equals(smtPointInfo.PositionNum))
{ {
this.cmbPositionNumList.SelectedIndex = index; selPosIndex = index;
break;
}
} }
//if (selPosIndex >= 0)
//{
// this.cmbPositionNumList.SelectedIndex = selPosIndex;
//}
//this.txtRobotX.Text = smpPointInfo.NodePositionX.ToString(); //this.txtRobotX.Text = smpPointInfo.NodePositionX.ToString();
//txtRobotY.Text = smpPointInfo.NodePositionY.ToString(); //txtRobotY.Text = smpPointInfo.NodePositionY.ToString();
xyMoveControl1.XValue = smtPointInfo.NodePositionX; xyMoveControl1.XValue = smtPointInfo.NodePositionX;
...@@ -163,12 +175,12 @@ namespace TSA_V ...@@ -163,12 +175,12 @@ namespace TSA_V
} }
private bool saveInfo() private bool saveInfo()
{ {
if (cmbPositionNumList.SelectedIndex < 0) //if (cmbPositionNumList.SelectedIndex < 0)
{ //{
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChoiceComPosition, "请选择元器件所在位置!")); // MessageBox.Show(ResourceCulture.GetString(ResourceCulture.ChoiceComPosition, "请选择元器件所在位置!"));
cmbPositionNumList.Focus(); // cmbPositionNumList.Focus();
return false; // return false;
} //}
string name = FormUtil.getValue(txtName); string name = FormUtil.getValue(txtName);
if (name.Equals("")) if (name.Equals(""))
{ {
...@@ -211,8 +223,8 @@ namespace TSA_V ...@@ -211,8 +223,8 @@ namespace TSA_V
MessageBox.Show(ResourceCulture.GetString(ResourceCulture.WriteRightTime,"请输入正确的焊接时间!")); MessageBox.Show(ResourceCulture.GetString(ResourceCulture.WriteRightTime,"请输入正确的焊接时间!"));
return false; return false;
} }
TSAVPosition position = (TSAVPosition)cmbPositionNumList.SelectedItem; //TSAVPosition position = (TSAVPosition)cmbPositionNumList.SelectedItem;
smtPointInfo.PositionNum = position.PositionNum; //smtPointInfo.PositionNum = position.PositionNum;
// this.DialogResult = DialogResult.OK; // this.DialogResult = DialogResult.OK;
if (this.PointList.Count > 0 && CurrIndex >= 0) if (this.PointList.Count > 0 && CurrIndex >= 0)
{ {
......
...@@ -2411,4 +2411,5 @@ ...@@ -2411,4 +2411,5 @@
<value>ANNOUNCEMENTS</value> <value>ANNOUNCEMENTS</value>
</data> </data>
<data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value>Line width:</value> </data> <data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value>Line width:</value> </data>
<data name = "FrmBoardSelect_chbWorkSingleStart_Text" xml:space = "preserve"> <value> Enable workspace detection to start working </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2425,4 +2425,6 @@ ...@@ -2425,4 +2425,6 @@
<value>注意事项</value> <value>注意事项</value>
</data> </data>
<data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value> 线体宽度: </value> </data> <data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value> 线体宽度: </value> </data>
<data name = "FrmBoardSelect_chbWorkSingleStart_Text" xml:space = "preserve"> <value> 启用工作区检测开始工作 </value> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
this.btnChangeW = new System.Windows.Forms.Button(); this.btnChangeW = new System.Windows.Forms.Button();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblWait = new System.Windows.Forms.Label(); this.lblWait = new System.Windows.Forms.Label();
this.chbWorkSingleStart = new System.Windows.Forms.CheckBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// label1 // label1
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
// //
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnNext.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(340, 249); this.btnNext.Location = new System.Drawing.Point(340, 309);
this.btnNext.Name = "btnNext"; this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45); this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 273; this.btnNext.TabIndex = 273;
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
// //
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnBack.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(88, 249); this.btnBack.Location = new System.Drawing.Point(88, 309);
this.btnBack.Name = "btnBack"; this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45); this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.TabIndex = 272; this.btnBack.TabIndex = 272;
...@@ -89,7 +90,7 @@ ...@@ -89,7 +90,7 @@
// //
this.lblBoardMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblBoardMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBoardMsg.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); this.lblBoardMsg.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.lblBoardMsg.Location = new System.Drawing.Point(12, 177); this.lblBoardMsg.Location = new System.Drawing.Point(12, 237);
this.lblBoardMsg.Name = "lblBoardMsg"; this.lblBoardMsg.Name = "lblBoardMsg";
this.lblBoardMsg.Size = new System.Drawing.Size(510, 69); this.lblBoardMsg.Size = new System.Drawing.Size(510, 69);
this.lblBoardMsg.TabIndex = 5; this.lblBoardMsg.TabIndex = 5;
...@@ -111,18 +112,19 @@ ...@@ -111,18 +112,19 @@
// //
this.chbGuoban.AutoSize = true; this.chbGuoban.AutoSize = true;
this.chbGuoban.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbGuoban.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbGuoban.Location = new System.Drawing.Point(214, 159); this.chbGuoban.Location = new System.Drawing.Point(151, 162);
this.chbGuoban.Name = "chbGuoban"; this.chbGuoban.Name = "chbGuoban";
this.chbGuoban.Size = new System.Drawing.Size(126, 24); this.chbGuoban.Size = new System.Drawing.Size(126, 24);
this.chbGuoban.TabIndex = 276; this.chbGuoban.TabIndex = 276;
this.chbGuoban.Text = "流水线过板模式"; this.chbGuoban.Text = "流水线过板模式";
this.chbGuoban.UseVisualStyleBackColor = true; this.chbGuoban.UseVisualStyleBackColor = true;
this.chbGuoban.CheckedChanged += new System.EventHandler(this.chbGuoban_CheckedChanged);
// //
// btnChangeW // btnChangeW
// //
this.btnChangeW.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnChangeW.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnChangeW.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnChangeW.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnChangeW.Location = new System.Drawing.Point(214, 249); this.btnChangeW.Location = new System.Drawing.Point(214, 309);
this.btnChangeW.Name = "btnChangeW"; this.btnChangeW.Name = "btnChangeW";
this.btnChangeW.Size = new System.Drawing.Size(120, 45); this.btnChangeW.Size = new System.Drawing.Size(120, 45);
this.btnChangeW.TabIndex = 277; this.btnChangeW.TabIndex = 277;
...@@ -141,15 +143,26 @@ ...@@ -141,15 +143,26 @@
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, 161); this.lblWait.Size = new System.Drawing.Size(331, 202);
this.lblWait.TabIndex = 278; this.lblWait.TabIndex = 278;
this.lblWait.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.lblWait.TextAlign = System.Drawing.ContentAlignment.TopCenter;
// //
// chbWorkSingleStart
//
this.chbWorkSingleStart.AutoSize = true;
this.chbWorkSingleStart.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbWorkSingleStart.Location = new System.Drawing.Point(151, 210);
this.chbWorkSingleStart.Name = "chbWorkSingleStart";
this.chbWorkSingleStart.Size = new System.Drawing.Size(182, 24);
this.chbWorkSingleStart.TabIndex = 279;
this.chbWorkSingleStart.Text = "启用工作区检测开始工作";
this.chbWorkSingleStart.UseVisualStyleBackColor = true;
//
// FrmBoardSelect // FrmBoardSelect
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(534, 320); this.ClientSize = new System.Drawing.Size(534, 378);
this.Controls.Add(this.lblWait); this.Controls.Add(this.lblWait);
this.Controls.Add(this.btnChangeW); this.Controls.Add(this.btnChangeW);
this.Controls.Add(this.chbGuoban); this.Controls.Add(this.chbGuoban);
...@@ -159,6 +172,7 @@ ...@@ -159,6 +172,7 @@
this.Controls.Add(this.btnBack); this.Controls.Add(this.btnBack);
this.Controls.Add(this.lblBoardMsg); this.Controls.Add(this.lblBoardMsg);
this.Controls.Add(this.cmbBoardList); this.Controls.Add(this.cmbBoardList);
this.Controls.Add(this.chbWorkSingleStart);
this.Name = "FrmBoardSelect"; this.Name = "FrmBoardSelect";
this.Text = "请选择程序"; this.Text = "请选择程序";
this.Load += new System.EventHandler(this.FrmBoardSelect_Load); this.Load += new System.EventHandler(this.FrmBoardSelect_Load);
...@@ -180,5 +194,6 @@ ...@@ -180,5 +194,6 @@
private System.Windows.Forms.Button btnChangeW; private System.Windows.Forms.Button btnChangeW;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label lblWait; private System.Windows.Forms.Label lblWait;
private System.Windows.Forms.CheckBox chbWorkSingleStart;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -173,6 +173,16 @@ namespace TSA_V ...@@ -173,6 +173,16 @@ namespace TSA_V
{ {
TSAVBean.OnlyGuoBan = chbGuoban.Checked; TSAVBean.OnlyGuoBan = chbGuoban.Checked;
LogUtil.info("选择程序,是否流水线过板=" + TSAVBean.OnlyGuoBan); LogUtil.info("选择程序,是否流水线过板=" + TSAVBean.OnlyGuoBan);
if (TSAVBean.OnlyGuoBan)
{
TSAVBean.WorkSingleStart = false;
}
else
{
TSAVBean.WorkSingleStart = chbWorkSingleStart.Checked;
LogUtil.info("选择程序,启用工作区信号检测开始工作=" + TSAVBean.OnlyGuoBan);
ConfigAppSettings.SaveValue(Setting_Init.WorkSingleStart, TSAVBean.WorkSingleStart);
}
if (WorkType.Equals(1)) if (WorkType.Equals(1))
{ {
if (BoardManager.CurrBoard.GetSmtList().Count <= 0) if (BoardManager.CurrBoard.GetSmtList().Count <= 0)
...@@ -182,24 +192,7 @@ namespace TSA_V ...@@ -182,24 +192,7 @@ namespace TSA_V
} }
return true; return true;
} }
//else if (WorkType.Equals(2))
//{
// if (BoardManager.CurrBoard.GetSolderingSMTList().Count <= 0)
// {
// MessageBox.Show("电路板【" + BoardManager.CurrBoard.boardName + "】没有配置焊接信息,请选择其他程序!");
// return false;
// }
// return true;
//}
//else if (WorkType.Equals(3))
//{
// if (BoardManager.CurrBoard.GetCheckSMTList().Count <= 0)
// {
// MessageBox.Show("电路板【" + BoardManager.CurrBoard.boardName + "】没有配置检测信息,请选择其他程序!");
// return false;
// }
// return true;
//}
} }
return false; return false;
} }
...@@ -280,5 +273,18 @@ namespace TSA_V ...@@ -280,5 +273,18 @@ namespace TSA_V
} }
} }
} }
private void chbGuoban_CheckedChanged(object sender, EventArgs e)
{
if (chbGuoban.Checked)
{
chbWorkSingleStart.Checked = false;
chbWorkSingleStart.Visible = false;
}
else
{
chbWorkSingleStart.Visible = true;
}
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!