public static Underlying_paraViewModel CreateUnderlying_para(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Underlying_para serial_Underlying_para = serial_Class as FpmlSerializedCSharp.Underlying_para; string typeStr = serial_Underlying_para.Type_.ValueStr; return(Underlying_paraViewModel.CreateUnderlying_para(typeStr)); }
public void initializeParameter(IndexUnderInfoViewModel indexUnderInfoVM) { foreach (var item in indexUnderInfoVM.IndexUnderList_) { string typeStr = item.Type_; Underlying_paraViewModel vm = Underlying_paraViewModel.CreateUnderlying_para("geometricBM"); vm.KrCode_ = item.KRCode_; vm.UnderName_ = item.Name_; } this.correlationInfo_paraViewModel_ = new CorrelationInfo_paraViewModel(); this.correlationInfo_paraViewModel_.initializeParameter(indexUnderInfoVM); }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.UnderlyingInfo_para serial_UnderlyingInfo_para = serial_Class as FpmlSerializedCSharp.UnderlyingInfo_para; List <FpmlSerializedCSharp.Underlying_para> serial_underlying_para = serial_UnderlyingInfo_para.Underlying_para_; this.underlying_paraViewModel_ = new ObservableCollection <Underlying_paraViewModel>(); foreach (var item in serial_underlying_para) { string type = item.Type_.ValueStr; Underlying_paraViewModel viewModel = Underlying_paraViewModel.CreateUnderlying_para(type); viewModel.setFromSerial(item); this.underlying_paraViewModel_.Add(viewModel); } FpmlSerializedCSharp.CorrelationInfo_para serial_correlationInfo_para = serial_UnderlyingInfo_para.CorrelationInfo_para_; this.correlationInfo_paraViewModel_ = new CorrelationInfo_paraViewModel(); this.correlationInfo_paraViewModel_.setFromSerial(serial_correlationInfo_para); //this.view_ = new UnderlyingInfo_paraView(); this.view_.DataContext = this; }
public Underlying_paraViewModel makeIndexPara(FpmlSerializedCSharp.Index xml_index) { Underlying_paraViewModel vm; string processType = ""; if (xml_index.Type_.ValueStr == "stockIndex") { processType = "geometricBM"; vm = Underlying_paraViewModel.CreateUnderlying_para(processType); } else if (xml_index.Type_.ValueStr == "stockIndex") { processType = "geometricBM"; vm = Underlying_paraViewModel.CreateUnderlying_para(processType); } else { processType = "geometricBM"; vm = Underlying_paraViewModel.CreateUnderlying_para(processType); } return(vm); }