From 6caff8e3b06535a9652a791454135cf0e6ac110e Mon Sep 17 00:00:00 2001 From: kingno <30263@KINGNO> Date: 星期一, 23 六月 2025 09:59:46 +0800 Subject: [PATCH] 新增篮具码,界面 --- src/Bro.M141.Process/M141Config.cs | 44 ++++++++++++++++++++++++++++++++++++++------ 1 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/Bro.M141.Process/M141Config.cs b/src/Bro.M141.Process/M141Config.cs index 3eb2a41..ad9ed79 100644 --- a/src/Bro.M141.Process/M141Config.cs +++ b/src/Bro.M141.Process/M141Config.cs @@ -19,17 +19,18 @@ { 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>(); - - - - - @@ -72,10 +73,41 @@ [Category("妫�娴嬪紓甯告寚绀�")] [Description("閫夋嫨鏌愪釜Spec锛屽叾琛ㄧず妫�娴嬭繃绋嬩腑寮傚父")] [DisplayName("寮傚父鎸囩ず鏍囧噯")] - [TypeConverter(typeof(SpecCodeSelectorConverter))] + [TypeConverter(typeof(SpecCodeSelectorConverter))] public string CheckErrorSpecCode { get; set; } = ""; + [Category("鐗瑰畾缂洪櫡閰嶇疆")] + [Description("S3鍜孲5鍏卞悓鍒ゆ柇缂洪櫡")] + [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("浜у搧娴嬮噺鐐逛綅闆嗗悎")] [DisplayName("浜у搧娴嬮噺鐐逛綅闆嗗悎")] -- Gitblit v1.8.0