using DataEntity.Share; using System; using System.Windows; using System.Windows.Forms; using System.Windows.Input; using XCommon.Log; using KeyEventArgs = System.Windows.Input.KeyEventArgs; namespace XHandler.View.Dialog { /// /// 消息窗体 /// public partial class MessageDialog : Window { #region 构造函数 public MessageDialog(string msg) { InitializeComponent(); textblockMsg.Text = msg; this.Owner = (Window)Shared.Main; } #endregion #region 初始化 private void Window_Loaded(object sender, RoutedEventArgs e) { try { } catch (Exception ex) { LoggerHelper.ErrorLog("ERROR:", ex); } } #endregion #region 关闭页面 private void btnClose_Click(object sender, RoutedEventArgs e) { this.Close(); } #endregion #region 拖动窗体 /// /// 拖动窗体 /// /// /// private void Grid_MouseDown(object sender, MouseButtonEventArgs e) { if (e.ChangedButton == MouseButton.Left) { this.DragMove(); } } #endregion #region ESC关闭画面 /// /// ESC关闭画面 /// /// /// private void Window_PreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Escape) { this.Close(); } } #endregion } }