增加弹框的测试界面

master
lhiven 1 year ago
parent 8ba233a930
commit cacdcb4f19

@ -31,7 +31,7 @@ namespace Rs.MotionPlat.Entitys
ISheet sheet = book.GetSheetAt(0);
if(sheet!=null)
{
int rowNum = sheet.LastRowNum;
int rowNum = sheet.LastRowNum+1;
if(rowNum>2)
{
for(int i=1;i<rowNum; i++)

@ -103,8 +103,31 @@ namespace Rs.MotionPlat.Flow
/// <summary>
/// 治具产品未取出
/// </summary>
public const int = 1020;
/// <summary>
/// 周转盘产品未取出
/// </summary>
public const int = 1021;
/// <summary>
/// 料盘产品未取出
/// </summary>
public const int = 1022;
/// <summary>
/// 周转头粘料报警
/// </summary>
public const int = 1023;
/// <summary>
/// Empty1满料报警

@ -1601,7 +1601,8 @@ namespace Rs.MotionPlat.Flow
}
else
{
box = MsgBox.ShowDialog(AlarmConstID.ScanBarCodeFailAlarm, $"{vr.SlotIndex}穴位扫码失败", ETipButton.Retry | ETipButton.Cancel);
alarmInfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), vr.SlotIndex);
box = MsgBox.ShowDialog(AlarmConstID., alarmInfo, ETipButton.Retry | ETipButton.Cancel);
if (box.Button == ETipButton.Retry)
{
failNum = 1;

@ -34,6 +34,28 @@
this.btnTransiteNozzleExceptionGoSafePoint = new System.Windows.Forms.Button();
this.btnTurnoverTrayExceptionGoSafePoint = new System.Windows.Forms.Button();
this.btnTransitNozzlePress = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.button7 = new System.Windows.Forms.Button();
this.button8 = new System.Windows.Forms.Button();
this.button9 = new System.Windows.Forms.Button();
this.button10 = new System.Windows.Forms.Button();
this.button11 = new System.Windows.Forms.Button();
this.button12 = new System.Windows.Forms.Button();
this.button13 = new System.Windows.Forms.Button();
this.button14 = new System.Windows.Forms.Button();
this.button15 = new System.Windows.Forms.Button();
this.button16 = new System.Windows.Forms.Button();
this.button17 = new System.Windows.Forms.Button();
this.button18 = new System.Windows.Forms.Button();
this.button19 = new System.Windows.Forms.Button();
this.button20 = new System.Windows.Forms.Button();
this.button21 = new System.Windows.Forms.Button();
this.button22 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnTurnoverSlotException
@ -96,11 +118,253 @@
this.btnTransitNozzlePress.UseVisualStyleBackColor = true;
this.btnTransitNozzlePress.Click += new System.EventHandler(this.btnTransitNozzlePress_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(42, 236);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(197, 42);
this.button1.TabIndex = 1;
this.button1.Text = "料仓tray盘取料报警";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(262, 236);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(197, 42);
this.button2.TabIndex = 1;
this.button2.Text = "料仓tray盘放料时丢料报警";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(478, 236);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(197, 42);
this.button3.TabIndex = 1;
this.button3.Text = "排料头在周转盘取料失败报警";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(685, 236);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(197, 42);
this.button4.TabIndex = 1;
this.button4.Text = "排料投在周转盘放料时丢料报警";
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.Location = new System.Drawing.Point(888, 236);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(197, 42);
this.button5.TabIndex = 1;
this.button5.Text = "排料头放料到周转盘后周转盘真空吸报警";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.Location = new System.Drawing.Point(1105, 236);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(197, 42);
this.button6.TabIndex = 1;
this.button6.Text = "周转吸头在周转盘取料失败报警";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// button7
//
this.button7.Location = new System.Drawing.Point(42, 305);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(197, 42);
this.button7.TabIndex = 1;
this.button7.Text = "周转吸头在周转盘放料时丢料报警";
this.button7.UseVisualStyleBackColor = true;
this.button7.Click += new System.EventHandler(this.button7_Click);
//
// button8
//
this.button8.Location = new System.Drawing.Point(262, 305);
this.button8.Name = "button8";
this.button8.Size = new System.Drawing.Size(197, 42);
this.button8.TabIndex = 1;
this.button8.Text = "周转吸头放料到周转盘后周转盘真空吸报警";
this.button8.UseVisualStyleBackColor = true;
this.button8.Click += new System.EventHandler(this.button8_Click);
//
// button9
//
this.button9.Location = new System.Drawing.Point(478, 305);
this.button9.Name = "button9";
this.button9.Size = new System.Drawing.Size(197, 42);
this.button9.TabIndex = 1;
this.button9.Text = "周转吸头在测试治具取料失败报警";
this.button9.UseVisualStyleBackColor = true;
this.button9.Click += new System.EventHandler(this.button9_Click);
//
// button10
//
this.button10.Location = new System.Drawing.Point(685, 305);
this.button10.Name = "button10";
this.button10.Size = new System.Drawing.Size(197, 42);
this.button10.TabIndex = 1;
this.button10.Text = "周转吸头在测试治具放料时丢料报警";
this.button10.UseVisualStyleBackColor = true;
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// button11
//
this.button11.Location = new System.Drawing.Point(888, 305);
this.button11.Name = "button11";
this.button11.Size = new System.Drawing.Size(197, 42);
this.button11.TabIndex = 1;
this.button11.Text = "周转吸头放料到测试治具后测试治具光纤报警";
this.button11.UseVisualStyleBackColor = true;
this.button11.Click += new System.EventHandler(this.button11_Click);
//
// button12
//
this.button12.Location = new System.Drawing.Point(1105, 305);
this.button12.Name = "button12";
this.button12.Size = new System.Drawing.Size(197, 42);
this.button12.TabIndex = 1;
this.button12.Text = "周转吸头放料到测试治具后测试治具真空吸报警";
this.button12.UseVisualStyleBackColor = true;
this.button12.Click += new System.EventHandler(this.button12_Click);
//
// button13
//
this.button13.Location = new System.Drawing.Point(42, 373);
this.button13.Name = "button13";
this.button13.Size = new System.Drawing.Size(197, 42);
this.button13.TabIndex = 1;
this.button13.Text = "料仓满料报警";
this.button13.UseVisualStyleBackColor = true;
this.button13.Click += new System.EventHandler(this.button13_Click);
//
// button14
//
this.button14.Location = new System.Drawing.Point(1105, 373);
this.button14.Name = "button14";
this.button14.Size = new System.Drawing.Size(197, 42);
this.button14.TabIndex = 1;
this.button14.Text = "周转头粘料报警";
this.button14.UseVisualStyleBackColor = true;
this.button14.Click += new System.EventHandler(this.button14_Click);
//
// button15
//
this.button15.Location = new System.Drawing.Point(262, 373);
this.button15.Name = "button15";
this.button15.Size = new System.Drawing.Size(197, 42);
this.button15.TabIndex = 1;
this.button15.Text = "料仓缺料报警";
this.button15.UseVisualStyleBackColor = true;
this.button15.Click += new System.EventHandler(this.button15_Click);
//
// button16
//
this.button16.Location = new System.Drawing.Point(478, 373);
this.button16.Name = "button16";
this.button16.Size = new System.Drawing.Size(197, 42);
this.button16.TabIndex = 1;
this.button16.Text = "取料盘夹爪动位报警";
this.button16.UseVisualStyleBackColor = true;
this.button16.Click += new System.EventHandler(this.button16_Click);
//
// button17
//
this.button17.Location = new System.Drawing.Point(681, 373);
this.button17.Name = "button17";
this.button17.Size = new System.Drawing.Size(197, 42);
this.button17.TabIndex = 1;
this.button17.Text = "取料盘夹爪原位报警";
this.button17.UseVisualStyleBackColor = true;
this.button17.Click += new System.EventHandler(this.button17_Click);
//
// button18
//
this.button18.Location = new System.Drawing.Point(884, 373);
this.button18.Name = "button18";
this.button18.Size = new System.Drawing.Size(197, 42);
this.button18.TabIndex = 1;
this.button18.Text = "排料头粘料报警";
this.button18.UseVisualStyleBackColor = true;
this.button18.Click += new System.EventHandler(this.button18_Click);
//
// button19
//
this.button19.Location = new System.Drawing.Point(42, 432);
this.button19.Name = "button19";
this.button19.Size = new System.Drawing.Size(197, 42);
this.button19.TabIndex = 1;
this.button19.Text = "治具产品未取出";
this.button19.UseVisualStyleBackColor = true;
this.button19.Click += new System.EventHandler(this.button19_Click);
//
// button20
//
this.button20.Location = new System.Drawing.Point(262, 432);
this.button20.Name = "button20";
this.button20.Size = new System.Drawing.Size(197, 42);
this.button20.TabIndex = 1;
this.button20.Text = "周转盘产品未取出";
this.button20.UseVisualStyleBackColor = true;
this.button20.Click += new System.EventHandler(this.button20_Click);
//
// button21
//
this.button21.Location = new System.Drawing.Point(478, 432);
this.button21.Name = "button21";
this.button21.Size = new System.Drawing.Size(197, 42);
this.button21.TabIndex = 1;
this.button21.Text = "料盘产品未取出";
this.button21.UseVisualStyleBackColor = true;
this.button21.Click += new System.EventHandler(this.button21_Click);
//
// button22
//
this.button22.Location = new System.Drawing.Point(681, 432);
this.button22.Name = "button22";
this.button22.Size = new System.Drawing.Size(197, 42);
this.button22.TabIndex = 1;
this.button22.Text = "扫码失败";
this.button22.UseVisualStyleBackColor = true;
this.button22.Click += new System.EventHandler(this.button22_Click);
//
// TestFrm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1336, 854);
this.Controls.Add(this.button14);
this.Controls.Add(this.button12);
this.Controls.Add(this.button11);
this.Controls.Add(this.button10);
this.Controls.Add(this.button9);
this.Controls.Add(this.button18);
this.Controls.Add(this.button17);
this.Controls.Add(this.button16);
this.Controls.Add(this.button15);
this.Controls.Add(this.button22);
this.Controls.Add(this.button21);
this.Controls.Add(this.button20);
this.Controls.Add(this.button19);
this.Controls.Add(this.button13);
this.Controls.Add(this.button8);
this.Controls.Add(this.button7);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.btnTransitNozzlePress);
this.Controls.Add(this.btnTurnoverTrayExceptionGoSafePoint);
this.Controls.Add(this.btnTransiteNozzleExceptionGoSafePoint);
@ -121,5 +385,27 @@
private System.Windows.Forms.Button btnTransiteNozzleExceptionGoSafePoint;
private System.Windows.Forms.Button btnTurnoverTrayExceptionGoSafePoint;
private System.Windows.Forms.Button btnTransitNozzlePress;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Button button8;
private System.Windows.Forms.Button button9;
private System.Windows.Forms.Button button10;
private System.Windows.Forms.Button button11;
private System.Windows.Forms.Button button12;
private System.Windows.Forms.Button button13;
private System.Windows.Forms.Button button14;
private System.Windows.Forms.Button button15;
private System.Windows.Forms.Button button16;
private System.Windows.Forms.Button button17;
private System.Windows.Forms.Button button18;
private System.Windows.Forms.Button button19;
private System.Windows.Forms.Button button20;
private System.Windows.Forms.Button button21;
private System.Windows.Forms.Button button22;
}
}

@ -1,4 +1,7 @@
using Rs.MotionPlat.Flow.NgFlow;
using Rs.MotionPlat.Commom;
using Rs.MotionPlat.Entitys;
using Rs.MotionPlat.Flow;
using Rs.MotionPlat.Flow.NgFlow;
using Rs.MotionPlat.Flow.SafePosFlow;
using Rs.MotionPlat.Flow.SubFlow;
using System;
@ -10,6 +13,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static Rs.MotionPlat.Commom.SchedulingMessageBox;
namespace Rs.MotionPlat
{
@ -51,5 +55,153 @@ namespace Rs.MotionPlat
{
FiberWarningPressFlow.Instance.Press();
}
private void button1_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.tray),1,1);
ETipButton btnText = (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes);
Dictionary<ETipButton, string> buttonText = new Dictionary<ETipButton, string>();
buttonText.Add(ETipButton.Retry, "重试|Retry");
buttonText.Add(ETipButton.Skip, "跳过|Skip");
buttonText.Add(ETipButton.Yes, "移动到安全位|MoveToSafePos");
MsgBox.ShowDialog(AlarmConstID.tray, alarminfo, btnText, buttonText);
}
private void button2_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.tray), 1, "ok");
MsgBox.ShowDialog(AlarmConstID.tray, alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button3_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), 1, 1);
ETipButton btnText = (ETipButton.Retry | ETipButton.Skip | ETipButton.Yes);
Dictionary<ETipButton, string> buttonText = new Dictionary<ETipButton, string>();
buttonText.Add(ETipButton.Retry, "重试|Retry");
buttonText.Add(ETipButton.Skip, "跳过|Skip");
buttonText.Add(ETipButton.Yes, "移动到安全位|MoveToSafePos");
MsgBox.ShowDialog(AlarmConstID., alarminfo, btnText, buttonText);
}
private void button4_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), 1);
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button5_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), 1, 1);
Dictionary<ETipButton, string> buttons = new Dictionary<ETipButton, string>()
{
{ ETipButton.Retry,"重拍|Regrab" },
{ETipButton.Skip,"跳过|Skip" },
{ETipButton.Yes,"移动到安全位|MoveToSafePos" }
};
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Retry | ETipButton.Skip | ETipButton.Yes, buttons);
}
private void button6_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "1,2", "1,2");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
}
private void button7_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button8_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
}
private void button9_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID. , alarminfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
}
private void button10_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button11_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
}
private void button12_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,7");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetRetry_Skip_MoveToSafe_Button(), MessageButtonManager.GetRetry_Skip_MoveToSafe_ButtonText());
}
private void button13_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "OK");
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Ok);
}
private void button15_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "OK");
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Ok);
}
private void button16_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.));
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Retry);
}
private void button17_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.));
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Retry);
}
private void button18_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button14_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3,8");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button19_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button20_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button21_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, MessageButtonManager.GetSkip_MoveToSafe_Button(), MessageButtonManager.GetSkip_MoveToSafe_ButtonText());
}
private void button22_Click(object sender, EventArgs e)
{
string alarminfo = string.Format(AlarmCollection.GetAlarm(AlarmConstID.), "3");
MsgBox.ShowDialog(AlarmConstID., alarminfo, ETipButton.Retry| ETipButton.Cancel);
}
}
}

Loading…
Cancel
Save