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 static DateInformationViewModel CreateDateInformation(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.DateInformation serial_DateInformation = serial_Class as FpmlSerializedCSharp.DateInformation; string typeStr = serial_DateInformation.Type_.ValueStr; return(DateInformationViewModel.CreateDateInformation(typeStr)); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation; FpmlSerializedCSharp.UpperBarrierEventCal serial_UpperBarrierEventCal = serial_EventCalculation.UpperBarrierEventCal_; List <FpmlSerializedCSharp.DateInformation> serial_dateInformation = serial_UpperBarrierEventCal.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_UpperBarrierEventCal.UpperTrigger_) { this.upperTrigger_.Add(item.ValueStr); } FpmlSerializedCSharp.ReferenceCalculationInfo serial_referenceCalculationInfo = serial_UpperBarrierEventCal.ReferenceCalculationInfo_; this.referenceCalculationInfoViewModel_.setFromSerial(serial_referenceCalculationInfo); //this.view_ = new UpperBarrierEventCalView(); this.view_.DataContext = this; }