|
using GalaSoft.MvvmLight.Messaging;
namespace SchoolSample
{
/// <summary>
/// Interaction logic for FilterTextWindow.xaml
/// </summary>
public partial class FilterTextWindow
{
private NotificationMessageAction<string> _notification;
public FilterTextWindow(NotificationMessageAction<string> notification)
{
InitializeComponent();
_notification = notification;
// set the filter field title
textBlockTitle.Text = notification.Notification;
}
private void buttonOK_Click(object sender, System.Windows.RoutedEventArgs e)
{
if (!string.IsNullOrWhiteSpace(textBoxTitle.Text) && _notification != null)
{
_notification.Execute(textBoxTitle.Text);
DialogResult = true;
}
}
private void buttonCancel_Click(object sender, System.Windows.RoutedEventArgs e)
{
DialogResult = false;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Weidong has been an information system professional since 1990. He has a Master's degree in Computer Science, and is currently a MCSD .NET