TipsWindow.xaml.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Shapes;
  13. namespace Muchinfo.MTPClient.Update
  14. {
  15. /// <summary>
  16. /// TipsWindow.xaml 的交互逻辑
  17. /// </summary>
  18. public partial class TipsWindow : Window
  19. {
  20. public TipsWindow(string tips)
  21. {
  22. InitializeComponent();
  23. this.ShowInTaskbar = false;
  24. this.Topmost = true;
  25. this.txt_content.Text = tips;
  26. this.MouseDown += Window_MouseDown;
  27. }
  28. private void Button_Click(object sender, RoutedEventArgs e)
  29. {
  30. this.DialogResult = true;
  31. }
  32. private void Button_Click_1(object sender, RoutedEventArgs e)
  33. {
  34. this.DialogResult = false;
  35. }
  36. private void Bnt_Close_OnClick(object sender, RoutedEventArgs e)
  37. {
  38. this.DialogResult = false;
  39. }
  40. private void Window_MouseDown(object sender, MouseButtonEventArgs e)
  41. {
  42. if (e.LeftButton == MouseButtonState.Pressed)
  43. DragMove();
  44. }
  45. }
  46. }