public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation; FpmlSerializedCSharp.SimpleRangeEventCal serial_SimpleRangeEventCal = serial_EventCalculation.SimpleRangeEventCal_; FpmlSerializedCSharp.Range1D serial_range1D = serial_SimpleRangeEventCal.Range1D_; this.range1DViewModel_.setFromSerial(serial_range1D); FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_SimpleRangeEventCal.ReferenceCalculationInfo_; this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo); FpmlSerializedCSharp.DateInformation serial_dateInformation = serial_SimpleRangeEventCal.DateInformation_; string dateInformationtype = serial_dateInformation.Type_.ValueStr; this.dateInformationViewModel_ = DateInformationViewModel.CreateDateInformation(dateInformationtype); this.dateInformationViewModel_.setFromSerial(serial_dateInformation); FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_SimpleRangeEventCal.JointSimpleCalculation_; string jointSimpleCalculationtype = serial_jointSimpleCalculation.Type_.ValueStr; this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype); this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation); //this.view_ = new SimpleRangeEventCalView(); this.view_.DataContext = this; }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculationInfo serial_EventCalculationInfo = serial_Class as FpmlSerializedCSharp.EventCalculationInfo; FpmlSerializedCSharp.PreConditionEvent serial_preConditionEvent = serial_EventCalculationInfo.PreConditionEvent_; this.preConditionEventViewModel_.setFromSerial(serial_preConditionEvent); List <FpmlSerializedCSharp.EventCalculation> serial_eventCalculation = serial_EventCalculationInfo.EventCalculation_; this.eventCalculationViewModel_ = new ObservableCollection <EventCalculationViewModel>(); foreach (var item in serial_eventCalculation) { string type = item.Type_.ValueStr; EventCalculationViewModel viewModel = EventCalculationViewModel.CreateEventCalculation(type); viewModel.setFromSerial(item); this.eventCalculationViewModel_.Add(viewModel); } FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_EventCalculationInfo.JointSimpleCalculation_; string jointSimpleCalculationtype = serial_jointSimpleCalculation.Type_.ValueStr; this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype); this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation); this.pastEventOcc_ = serial_EventCalculationInfo.PastEventOcc_.ValueStr; FpmlSerializedCSharp.RefVariable_eventOcc serial_refVariable_eventOcc = serial_EventCalculationInfo.RefVariable_eventOcc_; this.refVariable_eventOccViewModel_.setFromSerial(serial_refVariable_eventOcc); //this.view_ = new EventCalculationInfoView(); //this.view_.DataContext = this; }
public static JointSimpleCalculationViewModel CreateJointSimpleCalculation(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.JointSimpleCalculation serial_JointSimpleCalculation = serial_Class as FpmlSerializedCSharp.JointSimpleCalculation; string typeStr = serial_JointSimpleCalculation.Type_.ValueStr; return(JointSimpleCalculationViewModel.CreateJointSimpleCalculation(typeStr)); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation; FpmlSerializedCSharp.DualBarrierEventCal serial_DualBarrierEventCal = serial_EventCalculation.DualBarrierEventCal_; List <FpmlSerializedCSharp.DateInformation> serial_dateInformation = serial_DualBarrierEventCal.DateInformation_; this.dateInformationViewModel_ = new ObservableCollection <DateInformationViewModel>(); foreach (var item in serial_dateInformation) { string type = item.Type_.ValueStr; DateInformationViewModel viewModel = DateInformationViewModel.CreateDateInformation(type); viewModel.setFromSerial(item); this.dateInformationViewModel_.Add(viewModel); } this.upperTrigger_ = new ObservableCollection <string>(); foreach (var item in serial_DualBarrierEventCal.UpperTrigger_) { this.upperTrigger_.Add(item.ValueStr); } this.lowerTrigger_ = new ObservableCollection <string>(); foreach (var item in serial_DualBarrierEventCal.LowerTrigger_) { this.lowerTrigger_.Add(item.ValueStr); } List <FpmlSerializedCSharp.ReferenceCalculationInfo> serial_referenceCalculationInfo = serial_DualBarrierEventCal.ReferenceCalculationInfo_; this.referenceCalculationInfoViewModel_ = new ObservableCollection <ReferenceCalculationInfoViewModel>(); foreach (var item in serial_referenceCalculationInfo) { //string type = item.Type_.ValueStr; ReferenceCalculationInfoViewModel viewModel = new ReferenceCalculationInfoViewModel(); viewModel.setFromSerial(item); this.referenceCalculationInfoViewModel_.Add(viewModel); } FpmlSerializedCSharp.JointSimpleCalculation serial_jointSimpleCalculation = serial_DualBarrierEventCal.JointSimpleCalculation_; string jointSimpleCalculationtype = serial_jointSimpleCalculation.Type_.ValueStr; this.jointSimpleCalculationViewModel_ = JointSimpleCalculationViewModel.CreateJointSimpleCalculation(jointSimpleCalculationtype); this.jointSimpleCalculationViewModel_.setFromSerial(serial_jointSimpleCalculation); //this.view_ = new DualBarrierEventCalView(); this.view_.DataContext = this; }