public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Instrument serial_Instrument = serial_Class as FpmlSerializedCSharp.Instrument; FpmlSerializedCSharp.Header serial_header = serial_Instrument.Header_; string headertype = serial_header.Excel_type_.ValueStr; this.headerViewModel_ = HeaderViewModel.CreateHeader(headertype); this.headerViewModel_.setFromSerial(serial_header); FpmlSerializedCSharp.InstPositionInfo serial_instPositionInfo = serial_Instrument.InstPositionInfo_; string instPositionInfotype = serial_instPositionInfo.Excel_type_.ValueStr; this.instPositionInfoViewModel_ = InstPositionInfoViewModel.CreateInstPositionInfo(instPositionInfotype); this.instPositionInfoViewModel_.setFromSerial(serial_instPositionInfo); FpmlSerializedCSharp.Excel_interface serial_excel_interface = serial_Instrument.Excel_interface_; string excel_interfacetype = serial_excel_interface.Excel_type_.ValueStr; this.excel_interfaceViewModel_ = Excel_interfaceViewModel.CreateExcel_interface(excel_interfacetype); this.excel_interfaceViewModel_.setFromSerial(serial_excel_interface); FpmlSerializedCSharp.InstrumentInfo serial_instrumentInfo = serial_Instrument.InstrumentInfo_; string instrumentInfotype = serial_instrumentInfo.Excel_type_.ValueStr; this.instrumentInfoViewModel_ = InstrumentInfoViewModel.CreateInstrumentInfo(instrumentInfotype); this.instrumentInfoViewModel_.setFromSerial(serial_instrumentInfo); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.InstrumentInfo serial_instInfo = serial_Class as FpmlSerializedCSharp.InstrumentInfo; FpmlSerializedCSharp.CreditInstrument serial_CreditInstrument = serial_instInfo.CreditInstrument_ as FpmlSerializedCSharp.CreditInstrument; FpmlSerializedCSharp.IssueInformation serial_issueInfo = serial_CreditInstrument.IssueInformation_; string issueInfotype = serial_issueInfo.Type_.ValueStr; this.issueInfoViewModel_ = IssueInformationViewModel.CreateIssueInformation(issueInfotype); this.issueInfoViewModel_.setFromSerial(serial_issueInfo); FpmlSerializedCSharp.UnderlyingInformation serial_underlyingInfo = serial_CreditInstrument.UnderlyingInformation_; string underlyingInfotype = serial_underlyingInfo.Type_.ValueStr; this.underlyingInfoViewModel_ = UnderlyingInfoViewModel.CreateUnderlyingInfo(underlyingInfotype); this.underlyingInfoViewModel_.setFromSerial(serial_underlyingInfo); FpmlSerializedCSharp.CreditPayoffInfo serial_creditPayoffInfo = serial_CreditInstrument.CreditPayoffInfo_; string creditPayoffInfotype = serial_creditPayoffInfo.Type_.ValueStr; this.creditPayoffInfoViewModel_ = CreditPayoffInfoViewModel.CreateCreditPayoffInfo(creditPayoffInfotype); this.creditPayoffInfoViewModel_.setFromSerial(serial_creditPayoffInfo); this.view_ = new CreditInstrumentView(); this.view_.DataContext = this; }
public static InstrumentViewModel CreateInstVM(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.InstrumentInfo instrumentInfo = serial_Class as FpmlSerializedCSharp.InstrumentInfo; string type = instrumentInfo.Type_.ValueStr; if (type == "standardInstrument") { return(new StandardInstViewModel()); } //else if (type == "creditInstrument") //{ // return new CreditInstrumentViewModel(); //} else { throw new NotImplementedException(); } }
protected override void loadInstrumentFromXml(XmlNode node) { //event를 받아서 할거라 constructor 로 올림 this.view_.DataContext = this; //string FpmlSerializedCSharp.Root serial_root = new FpmlSerializedCSharp.Root(node); FpmlSerializedCSharp.InstrumentInfo serial_instInfo = serial_root.Instrument_.InstrumentInfo_; //FpmlSerializedCSharp.InstPositionInfo serial_instPositionInfo = serial_root.Instrument_.InstPositionInfo_; InstrumentViewModel vm1 = InstrumentViewModel.CreateInstVM(serial_instInfo); vm1.setFromSerial(serial_instInfo); //InstPositionInfoViewModel vm2 = new InstPositionInfoViewModel(); //vm2.setFromSerial(serial_instPositionInfo); this.InstrumentViewModel_ = vm1; //this.InstPositionInfoViewModel_ = vm2; //InstrumentViewModel_.setFromXml(node); }
public override void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.InstrumentInfo serial_instInfo = serial_Class as FpmlSerializedCSharp.InstrumentInfo; FpmlSerializedCSharp.StandardInstrument serial_standInst = serial_instInfo.StandardInstrument_; try { } catch (Exception e) { ErrorManager.setError(e); } //잠시 벗겨놈 FpmlSerializedCSharp.IssueInformation serial_issueInfo = serial_standInst.IssueInformation_; string issueInfoType = serial_issueInfo.Type_.ValueStr; this.IssueInfoViewModel_ = IssueInformationViewModel.CreateIssueInformation(issueInfoType); this.IssueInfoViewModel_.setFromSerial(serial_issueInfo); FpmlSerializedCSharp.UnderlyingInformation serial_underInfo = serial_standInst.UnderlyingInformation_; string underInfoType = serial_underInfo.Type_.ValueStr; this.UnderlyingViewModel_ = UnderlyingInfoViewModel.CreateUnderlyingInfo(underInfoType); this.UnderlyingViewModel_.setFromSerial(serial_underInfo); FpmlSerializedCSharp.PayoffInfo serial_payoffInfo = serial_standInst.PayoffInfo_; string payoffInfoType = serial_payoffInfo.Type_.ValueStr; this.PayoffViewModel_ = PayoffInfoViewModel.CreatePayoffInfo(payoffInfoType); this.PayoffViewModel_.setFromSerial(serial_payoffInfo); this.payoffInfoType_ = this.PayoffViewModel_.Type_; this.view_ = new StandardInstView(); this.view_.DataContext = this; }
public static InstrumentViewModel CreateInstVM(XmlNode node) { FpmlSerializedCSharp.InstrumentInfo serial_instInfo = new FpmlSerializedCSharp.InstrumentInfo(node); return InstrumentViewModel.CreateInstVM(serial_instInfo); }
public static InstrumentViewModel CreateInstVM(XmlNode node) { FpmlSerializedCSharp.InstrumentInfo serial_instInfo = new FpmlSerializedCSharp.InstrumentInfo(node); return(InstrumentViewModel.CreateInstVM(serial_instInfo)); }