diff --git a/Rs.SkyLine/Entitys/AlarmEntity.cs b/Rs.SkyLine/Entitys/AlarmEntity.cs new file mode 100644 index 0000000..1558a21 --- /dev/null +++ b/Rs.SkyLine/Entitys/AlarmEntity.cs @@ -0,0 +1,97 @@ +using NPOI.SS.UserModel; +using NPOI.XSSF.UserModel; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Rs.MotionPlat.Entitys +{ + public static class AlarmCollection + { + private static Dictionary alarmDic = new Dictionary(); + + static AlarmCollection() + { + + } + + public static void Load() + { + alarmDic.Clear(); + XSSFWorkbook book; + FileStream fs = File.Open("Dorxx 报警文本(中英韩).xlsx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); + book = new XSSFWorkbook(fs); + fs.Close(); + if(book!=null) + { + ISheet sheet = book.GetSheetAt(0); + if(sheet!=null) + { + int rowNum = sheet.LastRowNum; + if(rowNum>2) + { + for(int i=1;i0 && alarmDic.ContainsKey(_alarmID)) + return alarmDic[_alarmID]; + return null; + } + + public static string GetAlarm(int _alarmID) + { + AlarmEntity alarm = Get(_alarmID); + if(alarm!=null) + { + return alarm.CN + "\r\n\r\n" + alarm.EN + "\r\n\r\n" + alarm.KO; + } + return ""; + } + } + public class AlarmEntity + { + /// + /// 报警编号 + /// + public int AlartID { get; set; } + /// + /// 中文 + /// + public string CN { get; set; } + /// + /// 英文 + /// + public string EN { get; set; } + /// + /// 韩文 + /// + public string KO { get; set; } + } +} diff --git a/Rs.SkyLine/FormMain.cs b/Rs.SkyLine/FormMain.cs index 8ee40d9..47c54fe 100644 --- a/Rs.SkyLine/FormMain.cs +++ b/Rs.SkyLine/FormMain.cs @@ -429,5 +429,10 @@ namespace Rs.MotionPlat GlobalTray.GetTray(ETrayType.Empty2).Status = EStockTrayStatus.Empty.ToString(); } } + + private void button1_Click(object sender, EventArgs e) + { + MsgBox.ShowDialog(111, "取料失败!! \r\n周转吸嘴取治具{}号穴位的物料时失败 \r\nPickup fail !!\r\nNozzle of tester from site{} socket\r\nPickup fail !!\r\nSite{} socket 으로부터 Unit을 pickup할때 pickup fail이 발생하였습니다.", ETipButton.Yes); + } } } diff --git a/Rs.SkyLine/FormMain.designer.cs b/Rs.SkyLine/FormMain.designer.cs index 33f3d7f..0b5788f 100644 --- a/Rs.SkyLine/FormMain.designer.cs +++ b/Rs.SkyLine/FormMain.designer.cs @@ -161,6 +161,7 @@ this.hWindow_Final2 = new ChoiceTech.Halcon.Control.HWindow_Final(); this.groupBox35 = new System.Windows.Forms.GroupBox(); this.hWindow_Final4 = new ChoiceTech.Halcon.Control.HWindow_Final(); + this.button1 = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout(); this.panel3.SuspendLayout(); @@ -997,6 +998,7 @@ // // gboxNozzle2 // + this.gboxNozzle2.Controls.Add(this.button1); this.gboxNozzle2.Controls.Add(this.himgNozzle2); this.gboxNozzle2.Dock = System.Windows.Forms.DockStyle.Fill; this.gboxNozzle2.ForeColor = System.Drawing.Color.White; @@ -2153,6 +2155,16 @@ this.hWindow_Final4.Size = new System.Drawing.Size(85, 141); this.hWindow_Final4.TabIndex = 13; // + // button1 + // + this.button1.Location = new System.Drawing.Point(20, 113); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 13; + this.button1.Text = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // // FormMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -2366,5 +2378,6 @@ private ChoiceTech.Halcon.Control.HWindow_Final hWindow_Final2; private System.Windows.Forms.GroupBox groupBox35; private ChoiceTech.Halcon.Control.HWindow_Final hWindow_Final4; + private System.Windows.Forms.Button button1; } } \ No newline at end of file diff --git a/Rs.SkyLine/Rs.SkyLine.csproj b/Rs.SkyLine/Rs.SkyLine.csproj index 5e4d6a7..971a03d 100644 --- a/Rs.SkyLine/Rs.SkyLine.csproj +++ b/Rs.SkyLine/Rs.SkyLine.csproj @@ -42,6 +42,10 @@ False bin\Debug\HWindow_Tool.dll + + False + bin\Debug\ICSharpCode.SharpZipLib.dll + False bin\Debug\log4net.dll @@ -54,6 +58,22 @@ False bin\Debug\Newtonsoft.Json.dll + + False + bin\Debug\NPOI.dll + + + False + bin\Debug\NPOI.OOXML.dll + + + False + bin\Debug\NPOI.OpenXml4Net.dll + + + False + bin\Debug\NPOI.OpenXmlFormats.dll + False bin\Debug\Rs.Camera.dll @@ -135,6 +155,7 @@ +