public void Initialize(int code) { //TODO:记得给合适的系统 //调度系统 if ((code & ((int)SubsysId.SysSupernova)) != 0) { Subsystems.Add(new SpnvSubSystem(SubsysId.SysSupernova, Properties.Resources.IDS_SUBSYSTEM_SUPERNOVADISPATCH)); } //安防中心 //if ((code & ((int)SubsysId.SysSupernova)) != 0) // Subsystems.Add(new SpnvSubSystem(SubsysId.SysSupernova, Properties.Resources.IDS_SUBSYSTEM_SECURITY)); if ((code & ((int)SubsysId.SysPa)) != 0) { Subsystems.Add(new PASubSystem(SubsysId.SysPa, Properties.Resources.IDS_SUBSYSTEM_DAVINCI)); } if ((code & ((int)SubsysId.SysIps)) != 0) { Subsystems.Add(new IPSSubsystem(SubsysId.SysIps, Properties.Resources.IDS_SUBSYSTEM_WIPOS)); } foreach (Subsystem sys in _systems) { sys.ConfigMgr = ConfigMgr; sys.SIPUAMgr = SIPUA; sys.LeftHandset = HandsetMgr.HandsetLeft; sys.RightHandset = HandsetMgr.HandsetRight; } }
protected override void InitializeSubsystems() { Subsystems.Add(new BattleSystem()); }
public void LoadFrom(SubsystemsManager model) { _subsystems = model; Subsystems.Clear(); foreach (var subsystem in model.subsystems) { SubsystemViewModel vm; // need to factor this into an item factory switch (subsystem.SystemType) { case SubsystemTypeEnum.AccessoriesManager: vm = new AccessoriesManagerViewModel(); break; case SubsystemTypeEnum.AttachementsManager: vm = new AttachementsManagerViewModel(); break; case SubsystemTypeEnum.BMS: vm = new BMSViewModel(); break; case SubsystemTypeEnum.CameraManager: vm = new CameraManagerViewModel(); break; case SubsystemTypeEnum.COMM: vm = new COMMViewModel(); break; case SubsystemTypeEnum.CSSM: vm = new CSSMViewModel(); break; case SubsystemTypeEnum.ECS: vm = new ECSViewModel(); break; case SubsystemTypeEnum.FCM: vm = new FCMViewModel(); break; case SubsystemTypeEnum.Legacy: vm = null; break; case SubsystemTypeEnum.LENR: vm = new LENRViewModel(); break; case SubsystemTypeEnum.LSS: vm = new LSSViewModel(); break; case SubsystemTypeEnum.MES: vm = new MESViewModel(); break; case SubsystemTypeEnum.MFD: vm = new MFDViewModel(); break; case SubsystemTypeEnum.MTS: vm = new MTSViewModel(); break; case SubsystemTypeEnum.NAS: vm = new NASViewModel(); break; case SubsystemTypeEnum.RCM: vm = new RCMViewModel(); break; case SubsystemTypeEnum.RCS: vm = new RCSViewModel(); break; case SubsystemTypeEnum.RMS: vm = new RMSViewModel(); break; case SubsystemTypeEnum.TMS: vm = new TMSViewModel(); break; case SubsystemTypeEnum.VMS: vm = new VMSViewModel(); break; default: vm = new SubsystemViewModel(); break; } if (vm != null) { vm.LoadFrom(subsystem); Subsystems.Add(vm); } } }