| | |
| | | using System.Drawing.Printing; |
| | | using System.Reflection; |
| | | using System.Windows.Forms.Design; |
| | | using static Bro.Common.Helper.EnumHelper; |
| | | |
| | | namespace Bro.M141.Process |
| | | { |
| | | public class M141Config : ProcessConfigBase |
| | | { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [Category("打印机配置")] |
| | | [Description("打印机配置集合")] |
| | | [DisplayName("打印机配置集合")] |
| | | [TypeConverter(typeof(CollectionCountConvert))] |
| | | [Editor(typeof(ComplexCollectionEditor<Printer>), typeof(UITypeEditor))] |
| | | public List<Printer> Printers { get; set; } = new List<Printer>(); |
| | | |
| | | |
| | | |
| | | [Category("产品显示界面配置")] |
| | |
| | | [Category("检测异常指示")] |
| | | [Description("选择某个Spec,其表示检测过程中异常")] |
| | | [DisplayName("异常指示标准")] |
| | | [TypeConverter(typeof(SpecCodeSelectorConverter))] |
| | | [TypeConverter(typeof(SpecCodeSelectorConverter))] |
| | | public string CheckErrorSpecCode { get; set; } = ""; |
| | | |
| | | |
| | | [Category("特定缺陷配置")] |
| | | [Description("S3和S5共同判断缺陷")] |
| | | [DisplayName("缺陷名称")] |
| | | [TypeConverter(typeof(GlobalDefectNameConverter))] |
| | | public string defectname { get; set; } = ""; |
| | | |
| | | private class GlobalDefectNameConverter : StringConverter |
| | | { |
| | | public override bool GetStandardValuesExclusive(ITypeDescriptorContext? context) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | public override bool GetStandardValuesSupported(ITypeDescriptorContext? context) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | public override StandardValuesCollection? GetStandardValues(ITypeDescriptorContext? context) |
| | | { |
| | | using (var scope = GlobalVar.Container.BeginLifetimeScope()) |
| | | { |
| | | var config = scope.Resolve<IProcessConfig>(); |
| | | |
| | | return new StandardValuesCollection((config as IDefectSwitcher).DefectSwitchCollection.Select(u => u.DefectName).ToList()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | [Category("位置度设置")] |
| | |
| | | [Description("应对单次检测项需要多次拍照时,记录图片的索引号,从0开始")] |
| | | public int ImageIndex { get; set; } = 0; |
| | | |
| | | [Category("启用配置")] |
| | | [DisplayName("固定检测项")] |
| | | [Description("true:该检测项是固定检测项目,必须执行 false:该检测是可变检测项目,流程中决定是否检测,默认不检测")] |
| | | public bool IsFixed { get; set; } = true; |
| | | |
| | | [Category("取像设置")] |
| | | [DisplayName("相机选择")] |
| | | [Description("选择该检测项对应的相机")] |
| | |
| | | [DisplayName("OK图片保存开关")] |
| | | public bool OKImageSwitch { get; set; } = false; |
| | | |
| | | |
| | | [Category("图片保存设置")] |
| | | [Description("该站检测图片保存时,保存的图片顺序后缀")] |
| | | [DisplayName("图片保存顺序后缀")] |
| | | public string ImageSaveSeq { get; set; } = "1"; |
| | | |
| | | public string GetDisplayText() |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | [Device("OfflineDemo", "离线测试", DeviceAttributeType.OperationConfig)] |
| | | public class OfflineDemoOperationConfig : OperationConfigBase |
| | | { |
| | | [Category("图片目录")] |
| | | [Description("图片目录")] |
| | | [DisplayName("图片目录")] |
| | | [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))] |
| | | public string ImageFolder { get; set; } |
| | | |
| | | |
| | | |
| | | [Category("检测功能")] |
| | | [Description("图片在批量测试过程中最终图片结果会存储较慢需要设置延时确保图片不被资源自动释放")] |
| | | [DisplayName("图片存图延时")] |
| | | public int SaveImageTime { get; set; } = 0; |
| | | |
| | | |
| | | |
| | | [Category("检测功能")] |
| | | [Description("true:启动OK测试 false:启动NG测试")] |
| | | [DisplayName("是否测试OK图片")] |
| | | public bool IsOK { get; set; } = true; |
| | | |
| | | } |
| | | |
| | | public class RealTimeAdjustDataDetail : IComplexDisplay |
| | | { |
| | | [Category("点位设置")] |