using MuchInfo.Chart.Data.Models; using System.Collections.Generic; using System.Windows; namespace MuchInfo.Chart.FormulaEdit { /// /// ParamsSetPage.xaml 的交互逻辑 /// public partial class ParamsSetPage : Window { public ParamsSetPage(List editModels) { InitializeComponent(); this.DataContext = new EditFormulaViewModel(editModels); } private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { var editFormula = this.DataContext as EditFormulaViewModel; if (editFormula != null) { editFormula.ChangeParam(); this.DialogResult = true; } } private void btnCancel_OnClick(object sender, RoutedEventArgs e) { // throw new System.NotImplementedException(); this.DialogResult = false; } private void btnEditFormula_OnClick(object sender, RoutedEventArgs e) { // throw new System.NotImplementedException(); var editFormula = this.DataContext as EditFormulaViewModel; if (editFormula != null) { editFormula.EditFormula(); //editFormula.OpenEditer(); } } } }