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 EventCalculationViewModel CreateEventCalculation(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculation serial_EventCalculation = serial_Class as FpmlSerializedCSharp.EventCalculation; string typeStr = serial_EventCalculation.Type_.ValueStr; return(EventCalculationViewModel.CreateEventCalculation(typeStr)); }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.EventCalculationList serial_EventCalculationList = serial_Class as FpmlSerializedCSharp.EventCalculationList; List <FpmlSerializedCSharp.EventCalculation> serial_eventCalculation = serial_EventCalculationList.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); } //this.view_ = new EventCalculationListView(); //this.view_.DataContext = this; }