public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_underlyingInfo_para serial_Excel_underlyingInfo_para = serial_Class as FpmlSerializedCSharp.Excel_underlyingInfo_para; this.excel_type_ = serial_Excel_underlyingInfo_para.Excel_type_.ValueStr; this.krCode_ = serial_Excel_underlyingInfo_para.KrCode_.ValueStr; this.currency_ = serial_Excel_underlyingInfo_para.Currency_.ValueStr; this.underName_ = serial_Excel_underlyingInfo_para.UnderName_.ValueStr; this.basePrice_ = serial_Excel_underlyingInfo_para.BasePrice_.ValueStr; this.sub_type_ = serial_Excel_underlyingInfo_para.Sub_type_.ValueStr; this.rate_type_ = serial_Excel_underlyingInfo_para.Rate_type_.ValueStr; this.tenor_ = serial_Excel_underlyingInfo_para.Tenor_.ValueStr; this.legTenor_ = serial_Excel_underlyingInfo_para.LegTenor_.ValueStr; this.linkedCurve_ = serial_Excel_underlyingInfo_para.LinkedCurve_.ValueStr; FpmlSerializedCSharp.Excel_underlyingModel_para serial_excel_underlyingModel_para = serial_Excel_underlyingInfo_para.Excel_underlyingModel_para_; string excel_underlyingModel_paratype = serial_excel_underlyingModel_para.Excel_type_.ValueStr; this.excel_underlyingModel_paraViewModel_ = Excel_underlyingModel_paraViewModel.CreateExcel_underlyingModel_para(excel_underlyingModel_paratype); this.excel_underlyingModel_paraViewModel_.setFromSerial(serial_excel_underlyingModel_para); this.value_ = serial_Excel_underlyingInfo_para.Value_.ValueStr; this.description_ = serial_Excel_underlyingInfo_para.Description_.ValueStr; }
public void initializedModelVM(Excel_underlyingModel_paraViewModel excel_underlyingModel_paraViewModel) { this.initializedModelVM_ = excel_underlyingModel_paraViewModel.Clone(); this.selectedUnderlyingModelVM_ = excel_underlyingModel_paraViewModel.Clone(); this.modelCombo_.DataContext = this.selectedUnderlyingModelVM_; this.SelectedModelGrid_.Children.Clear(); this.SelectedModelGrid_.Children.Add(this.selectedUnderlyingModelVM_.view()); }
public static void initialize_UnderlyingModelComboStringList() { Excel_underlyingModel_paraViewModel.UnderlyingModelComboDisplayStrList_ = new ObservableCollection <Excel_underlyingModel_paraViewModel>(); Excel_underlyingModel_paraViewModel.UnderlyingModelComboDisplayStrList_.Add( Excel_underlyingModel_paraViewModel.CreateExcel_underlyingModel_para("excel_geometricBM")); Excel_underlyingModel_paraViewModel.UnderlyingModelComboDisplayStrList_.Add( Excel_underlyingModel_paraViewModel.CreateExcel_underlyingModel_para("excel_hullWhiteOneFactor")); Excel_underlyingModel_paraViewModel.UnderlyingModelComboDisplayStrList_.Add( Excel_underlyingModel_paraViewModel.CreateExcel_underlyingModel_para("excel_forwardModel")); }
public void buildParaSetting(Excel_underlyingInfoViewModel e_uivm, ParameterSettingManager paraSettingManager) { this.Excel_type_ = e_uivm.Excel_type_; this.KrCode_ = e_uivm.KrCode_; this.UnderNameTrans_ = e_uivm.NameTrans_; this.BasePrice_ = e_uivm.BasePrice_; this.Tenor_ = e_uivm.Tenor_; this.Sub_type_ = e_uivm.Sub_type_; this.LinkedCurve_ = e_uivm.LinkedCurveCode_; //this.CurrentValue_ = ? // model에서 setting 을 통해 set됨 this.excel_underlyingModel_paraViewModel_ = paraSettingManager.UnderlyingParaSetting_.underModel(e_uivm); }
//public Excel_underlyingModelEditorView(Excel_underlyingModel_paraViewModel excel_underlyingModel_paraViewModel) //{ // // TODO: Complete member initialization // this.selectedUnderlyingModelVM_ = excel_underlyingModel_paraViewModel; // InitializeComponent(); // //this.DataContextChanged += new DependencyPropertyChangedEventHandler(ViewModelChanged); // #region ComboBox Initialize // this.modelCombo_.ItemsSource = Excel_underlyingModel_paraViewModel.UnderlyingModelComboDisplayStrList_; // this.modelCombo_.DataContext = this.selectedUnderlyingModelVM_; // #endregion // this.modelCombo_.SelectionChanged += new SelectionChangedEventHandler(modelCombo__SelectionChanged); //} //private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e) //{ // this.modelCombo_.SelectedIndex = this.selectedUnderlyingModelVM_.SelectedIndex_; // //this.viewModel_ = this.DataContext as Excel_scheduleListViewModel; // //this.ScheduleDataGrid_.ItemsSource = this.viewModel_.Excel_scheduleViewModel_; //} private void modelCombo__SelectionChanged(object sender, SelectionChangedEventArgs e) { Excel_underlyingModel_paraViewModel item = this.modelCombo_.SelectedItem as Excel_underlyingModel_paraViewModel; if (this.initializedModelVM_.SelectedIndex_ != item.SelectedIndex_) { this.SelectedUnderlyingModelVM_ = item; this.modelCombo_.DataContext = this.selectedUnderlyingModelVM_; this.SelectedModelGrid_.Children.Clear(); this.SelectedModelGrid_.Children.Add(this.selectedUnderlyingModelVM_.view()); } else { this.SelectedUnderlyingModelVM_ = this.initializedModelVM_.Clone(); this.modelCombo_.DataContext = this.SelectedUnderlyingModelVM_; this.SelectedModelGrid_.Children.Clear(); this.SelectedModelGrid_.Children.Add(this.selectedUnderlyingModelVM_.view()); } //if (this.selectedUnderlyingModelVM_.SelectedIndex_ != item.SelectedIndex_) //{ //} //string modelType = item.Content.ToString(); //if (modelType == "GBM") //{ // this.selectedUnderlyingModelVM_ = new Excel_geometricBMViewModel(); //} //else if (modelType == "HullWhite_1") //{ // this.selectedUnderlyingModelVM_ = new Excel_hullWhiteOneFactorViewModel(); //} //else //{ // throw new NotImplementedException(); //} //this.SelectedModelGrid_.Children.Clear(); //this.SelectedModelGrid_.Children.Add(item.view()); }
public void setFromSerial(FpmlSerializedCSharp.ISerialized serial_Class) { FpmlSerializedCSharp.Excel_underlyingInfo_para serial_Excel_underlyingInfo_para = serial_Class as FpmlSerializedCSharp.Excel_underlyingInfo_para; this.excel_type_ = serial_Excel_underlyingInfo_para.Excel_type_.ValueStr; this.krCode_ = serial_Excel_underlyingInfo_para.KrCode_.ValueStr; this.underName_ = serial_Excel_underlyingInfo_para.UnderName_.ValueStr; this.model_ = serial_Excel_underlyingInfo_para.Model_.ValueStr; this.basePrice_ = serial_Excel_underlyingInfo_para.BasePrice_.ValueStr; FpmlSerializedCSharp.Excel_underlyingModel_para serial_excel_underlyingModel_para = serial_Excel_underlyingInfo_para.Excel_underlyingModel_para_; string excel_underlyingModel_paratype = serial_excel_underlyingModel_para.Excel_type_.ValueStr; this.excel_underlyingModel_paraViewModel_ = Excel_underlyingModel_paraViewModel.CreateExcel_underlyingModel_para(excel_underlyingModel_paratype); this.excel_underlyingModel_paraViewModel_.setFromSerial(serial_excel_underlyingModel_para); this.value_ = serial_Excel_underlyingInfo_para.Value_.ValueStr; this.description_ = serial_Excel_underlyingInfo_para.Description_.ValueStr; }