using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Sinvo.EplanHpD.Plugin.WPFUI.Datas { /// /// TODO1: 品牌类型,线材逻辑不同应拆分为不同的服务实现 /// TODO2: 从配置文件中读取品牌数据 /// 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 { /* 安川电机 1. 线缆型号前缀:JZSP- 2. 电机型号前缀:SGMX 3. 型号后缀:-E 4. 电机带前段线的功率范围:0-750KW 5. 数据表中Sheet名称: 安川 */ {ANCHUAN, new BrandData { Name = ANCHUAN, ComplexLine = false, SheetName = ANCHUAN, Prefix = "JZSP-", MotorPrefix = "SGMX", Suffix = "-E", MotorCablePowerRangeStart = 0, MotorCablePowerRangeEnd = 750 } }, /* 汇川电机 1. 线缆型号前缀:S6-L- 2. 电机型号前缀:MS1H 3. 型号后缀:无 4. 电机带前段线的功率范围:无 5. 数据表中Sheet名称: 汇川 */ {HUICHUAN, new BrandData { Name = HUICHUAN, ComplexLine = false, SheetName = HUICHUAN, Prefix = "S6-L-", MotorPrefix = "MS1H", Suffix = "", MotorCablePowerRangeStart = 0, MotorCablePowerRangeEnd = 0 } }, /* 三菱电机 1. 线缆型号前缀:MR- 2. 电机型号前缀:HK-KT 3. 型号后缀:无 4. 电机带前段线的功率范围:无 5. 数据表中Sheet名称: HK_KT */ {SANLING_HK_KT, new BrandData { Name = SANLING_HK_KT, ComplexLine = true, SheetName = SANLING_HK_KT, Prefix = "MR-", MotorPrefix = "HK-KT", Suffix = "", MotorCablePowerRangeStart = 0, MotorCablePowerRangeEnd = 0 } }, }; } }