using Muchinfo.MTPClient.UI.ViewModels; using Muchinfo.WPF.Controls.Windows; namespace Muchinfo.MTPClient.UI.Views { /// /// 链路状态 /// public partial class LinkStateView : WindowBase { public LinkStateView() { InitializeComponent(); this.DataContext = new LinkStateViewModel(this); } private void view_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Escape) this.DialogResult = false; } private void view_Closed(object sender, System.EventArgs e) { var temp = this.DataContext as LinkStateViewModel; if (temp != null) temp.Cleanup(); } } }