using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace View { /// /// MessageBoxView.xaml 的交互逻辑 /// public partial class MessageBoxView : Window { public MessageBoxView(string title, string msg) { InitializeComponent(); Title = title; Message = msg; } public new string Title { get { return this.lblTitle.Text; } set { this.lblTitle.Text = value; } } public string Message { get { return this.lblMsg.Text; } set { this.lblMsg.Text = value; } } private void Yes_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.DialogResult = true; this.Close(); } private void No_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { this.DialogResult = false; this.Close(); } } }