protected override void OnViewLoaded() { if (loaded) { return; } base.OnViewLoaded(); this.Piercer = bjParamService.LoadFromJson <Piercer>(); this.Piercer = this.Piercer ?? new Piercer(); this.PieDevice = new PiercerDevice(CanComm, this.Piercer); this.CentSys = bjParamService.LoadFromJson <CentrifugeSystem>(); this.CentSys = this.CentSys ?? new CentrifugeSystem(); this.CentDevice = new CentrifugeDevice(CanComm, CentSys); this.GelWare = bjParamService.LoadFromJson <GelWarehouse>(); this.GelWare = this.GelWare ?? new GelWarehouse(); this.GelWareDevice = new GelWarehouseDevice(CanComm, GelWare); this.Hand = bjParamService.LoadFromJson <MachineHand>(); this.Hand = this.Hand ?? new MachineHand(); this.Hand.CheckNull(); this.HandDevice = new MachineHandDevice(CanComm, Hand); this.CouMixer = bjParamService.LoadFromJson <CouveuseMixer>(); this.CouMixer = this.CouMixer ?? new CouveuseMixer(); this.CouMixer.checkNull(); this.CouMixerDevice = new CouveuseMixerDevice(CanComm, CouMixer); this.Param = bjParamService.LoadFromJson <OtherPart>(); this.Param = this.Param ?? new OtherPart(); this.OPDevice = new OtherPartDevice(CanComm, Param); this.Centrifuge = bjParamService.LoadFromJson <CentrifugeData>(); this.Centrifuge = this.Centrifuge ?? CentrifugeData.Create(); this.CentMrg = new CentrifugeMrg(CanComm, Centrifuge); }