| | |
| | | { |
| | | if (Subject.OutputImage is Mat) |
| | | { |
| | | TAlgorithm.Mat2HObject((Mat)Subject.OutputImage, out HObject image); |
| | | using (HImage image = TAlgorithm.Mat2HObject((Mat)Subject.OutputImage)) |
| | | { |
| | | recordImageHSmartWindowControl.ShowHoImage(image); |
| | | } |
| | | } |
| | | else if (Subject.OutputImage is Bitmap) |
| | | { |
| | | TAlgorithm.Bitmap2HObject((Bitmap)Subject.OutputImage, out HObject image); |
| | | using (HImage image = TAlgorithm.Bitmap2HObject((Bitmap)Subject.OutputImage)) |
| | | { |
| | | recordImageHSmartWindowControl.ShowHoImage(image); |
| | | } |
| | | } |
| | | else if (Subject.OutputImage is HObject) |
| | | { |
| | | recordImageHSmartWindowControl.ShowHoImage((HObject)Subject.OutputImage); |
| | | } |
| | | |
| | | } |
| | | //先判断子类再判断父类 |
| | | if (Subject.Record != null && Subject.Record is MsgRecord msgRecord) |
| | | { |
| | |
| | | recordImageHSmartWindowControl.DispObj(msgRecord.RecordObject_NG, false); |
| | | |
| | | for (int i = 0; i < msgRecord.Msg.Length; i++) |
| | | { |
| | | recordImageHSmartWindowControl.ShowMsg(msgRecord.Msg[i] |
| | | , 1 == msgRecord.Result[i] ? true : false, msgRecord.Column[i], msgRecord.Row[i]); |
| | | } |
| | | } |
| | | else if (Subject.Record != null && Subject.Record is ObjectRecord objRecord) |
| | | { |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_OK, true); |
| | | recordImageHSmartWindowControl.DispObj(objRecord.RecordObject_NG, false); |
| | | } |
| | | |
| | | GC.Collect(); |
| | | })); |
| | | } |