using Muchinfo.MTPClient.Bank.ViewModels; using System; using System.Windows; namespace Muchinfo.MTPClient.Bank.Views { /// /// BankTerminationView.xaml 的交互逻辑 /// public partial class BankTerminationView : Window { public BankTerminationView() { InitializeComponent(); this.DataContext = new Muchinfo.MTPClient.Bank.ViewModels.BankTerminationViewModel(this); this.Closed += AmountManagerView_Closed; } void AmountManagerView_Closed(object sender, EventArgs e) { var viewmodel = this.DataContext as BankTerminationViewModel; if (viewmodel != null) { viewmodel.Cleanup(); } } } }