EditMemo.xaml.cs 1018 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace MeterVision.Dlg
  15. {
  16. /// <summary>
  17. /// EditMemo.xaml 的交互逻辑
  18. /// </summary>
  19. public partial class EditMemo : Window
  20. {
  21. public string Memo { get; private set; }
  22. public EditMemo(string memo)
  23. {
  24. InitializeComponent();
  25. Memo = memo;
  26. txtMemo.Text = memo;
  27. }
  28. private void BtnOk_Click(object sender, RoutedEventArgs e)
  29. {
  30. Memo = txtMemo.Text.Trim();
  31. DialogResult = true;
  32. this.Close();
  33. }
  34. private void BtnCancel_Click(object sender, RoutedEventArgs e)
  35. {
  36. this.Close();
  37. }
  38. }
  39. }