Nav apraksta

Alert.xaml.cs 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 WpfApplication19
  14. {
  15. /// <summary>
  16. /// Interaction logic for Alert.xaml
  17. /// </summary>
  18. public partial class Alert : Window
  19. {
  20. public Alert()
  21. {
  22. InitializeComponent();
  23. warningSound.Play();
  24. }
  25. public void SetAlertMsg(string msg){
  26. MainWarningMsg.Text = msg;
  27. }
  28. private void ChangeBtn_Click(object sender, RoutedEventArgs e)
  29. {
  30. //Application.Current.MainWindow.Show();
  31. var w = (MainWindow)Application.Current.MainWindow;
  32. //var s = ((ComboBoxItem)DateTimeCB.SelectedItem).Content.ToString();
  33. w.ResetHeaderUsage();
  34. Close();
  35. }
  36. private void stopAlert_Click(object sender, RoutedEventArgs e)
  37. {
  38. warningSound.Stop();
  39. }
  40. }
  41. }