| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using MuchInfo.Chart.Data.Models;
- using System.Collections.Generic;
- using System.Windows;
- namespace MuchInfo.Chart.FormulaEdit
- {
- /// <summary>
- /// ParamsSetPage.xaml 的交互逻辑
- /// </summary>
- public partial class ParamsSetPage : Window
- {
- public ParamsSetPage(List<ProgramModel> 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();
- }
- }
- }
- }
|