using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sinvo.EplanHpD.Plugin.WPFUI.Datas { /// /// TODO: 品牌类型,线材逻辑不同应拆分为不同的服务实现 /// public static class Brands { public const string UNKNOWN = "未知"; public const string ANCHUAN = "安川"; public const string HUICHUAN = "汇川"; public const string SANLING = "三菱"; public const string SANLING_HK_KT = "HK-KT"; public static BrandData GetBrandData(string brandName) { if(!BrandDataList.ContainsKey(brandName)) { return null; } return BrandDataList[brandName]; } /// /// /// public static Dictionary BrandDataList = new Dictionary { /* string ModelNo = "MR-"; if (model.Motor.Brand == Brands.ANCHUAN) { ModelNo = "JZSP-"; } else if((model.Motor.Brand == Brands.HUICHUAN)) { ModelNo = "S6-L-"; } */ {ANCHUAN, new BrandData{ Name = ANCHUAN, ComplexLine = false, SheetName = ANCHUAN, Prefix = "JZSP-", MotorPrefix = "SGMX", Suffix = "-E" } }, {HUICHUAN, new BrandData{ Name = HUICHUAN, ComplexLine = false, SheetName = HUICHUAN, Prefix = "S6-L-", MotorPrefix = "MS1H", Suffix = "" } }, {SANLING_HK_KT, new BrandData{ Name = SANLING_HK_KT, ComplexLine = true, SheetName = SANLING_HK_KT, Prefix = "MR-", MotorPrefix = "HK-KT", Suffix = "" } }, }; } }