星火微课系统客户端
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

CountdownWindow.xaml.cs 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Shapes;
  15. namespace XHWK.WKTool
  16. {
  17. /// <summary>
  18. /// CountdownWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class CountdownWindow : Window
  21. {
  22. public CountdownWindow()
  23. {
  24. InitializeComponent();
  25. }
  26. public void Initialize()
  27. {
  28. //Thread.Sleep(1200);
  29. //this.Hide();
  30. }
  31. /// <summary>
  32. /// 跳转页面
  33. /// </summary>
  34. /// <param name="sender"></param>
  35. /// <param name="e"></param>
  36. private void Window_ContentRendered(object sender, EventArgs e)
  37. {
  38. ScreenRecordingToolbarWindow win = new ScreenRecordingToolbarWindow();
  39. win.Topmost = true;
  40. win.Show();
  41. //显示在右下角
  42. double xpos = this.Left + this.Width - win.Width-10;
  43. double ypos = this.Top + this.Height - win.Height - 60;
  44. win.Left = xpos;
  45. win.Top = ypos;
  46. this.Hide();
  47. //Thread.Sleep(800);
  48. ////imgLoding.Source= new BitmapImage(new Uri("pack://application:,,/Images/countdown_2.png"));
  49. ////Thread.Sleep(300);
  50. ////imgLoding.Source = new BitmapImage(new Uri("pack://application:,,/Images/countdown_1.png"));
  51. ////Thread.Sleep(300);
  52. //this.Hide();
  53. //Initialize();
  54. }
  55. private void Image_MediaEnded(object sender, RoutedEventArgs e)
  56. {
  57. ((MediaElement)sender).Position = ((MediaElement)sender).Position.Add(TimeSpan.FromMilliseconds(10000));
  58. }
  59. }
  60. }