| | |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using Bro.M135.Common; |
| | | using Bro.M135.DBManager; |
| | | using HalconDotNet; |
| | | using Microsoft.VisualBasic; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using NPOI.Util; |
| | | using Sunny.UI; |
| | | using System.Data; |
| | | using System.Data.SqlTypes; |
| | |
| | | Dictionary<string, List<double>> dicdate = new Dictionary<string, List<double>>(); |
| | | ManualResetEvent set1 = new ManualResetEvent(false); |
| | | ManualResetEvent set2 = new ManualResetEvent(false); |
| | | |
| | | |
| | | public event Action<string> StartPrinter; |
| | | |
| | | [ProcessMethod("ImageCheck", "ImageCheckOperation", "通用图片检测操作", InvokeType.TestInvoke)] |
| | | public ResponseMessage ImageCheckOperation(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice) |
| | |
| | | |
| | | |
| | | |
| | | [ProcessMethod("printer", "printer", "打印机打印", InvokeType.TestInvoke)] |
| | | public ResponseMessage Printer(IOperationConfig config, IDevice invokeDevice, IDevice sourceDevice) |
| | | { |
| | | ResponseMessage msg = new ResponseMessage(); |
| | | |
| | | Plc2 = invokeDevice as PLCBase; |
| | | string message = ""; |
| | | StartPrinter.Invoke(message); |
| | | return msg; |
| | | } |
| | | |
| | | |
| | | public void PlcwritePrinter(int add,int value) |
| | | { |
| | | Plc2.WriteSingleAddress(add,value,out _); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | protected List<ISpec> GetSpecListFromConfigSelection(List<SpecSelector> specSelectors) |
| | | { |
| | |
| | | var spec = M141Config.SpecCollection.FirstOrDefault(s => s.Code == u.SpecCode); |
| | | if (spec != null) |
| | | { |
| | | var temp = spec.Copy<Spec>(); |
| | | var temp = spec.Copy(); |
| | | temp.ActualValue = null; |
| | | temp.MeasureResult = null; |
| | | temp.Source = ""; |
| | | specList.Add(temp); |
| | | } |
| | | }); |
| | |
| | | resultList.ForEach(u => u.SetResult()); |
| | | var defects = resultList.GetDefectDescList(); |
| | | |
| | | var ngSpecCodes = p.Details.SelectMany(u => u.SpecList ?? new List<Spec>()).Where(u => u.MeasureResult != true).Select(u => u.Code); |
| | | var ngSpecCodes = p.Details.SelectMany(u => u.SpecList ?? new List<ISpec>()).Where(u => u.MeasureResult != true).Select(u => u.Code); |
| | | var ngDefectDescList = p.Details.SelectMany(u => u.DefectList ?? new List<string>()).ToList(); |
| | | |
| | | defects.AddRange(ngSpecCodes); |