星火微课系统客户端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

UCCamera.xaml.cs 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Common.system;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  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.Navigation;
  15. using System.Windows.Shapes;
  16. namespace XHWK.WKTool
  17. {
  18. /// <summary>
  19. /// UCCamera.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class UCCamera : Window
  22. {
  23. public UCCamera()
  24. {
  25. InitializeComponent();
  26. }
  27. private void btnOpenCamera_Click(object sender, RoutedEventArgs e)
  28. {
  29. CameraHelper.IsDisplay = true;
  30. CameraHelper.SourcePlayer = player;
  31. CameraHelper.UpdateCameraDevices();
  32. if (CameraHelper.CameraDevices.Count > 0)
  33. {
  34. CameraHelper.SetCameraDevice(0);
  35. }
  36. }
  37. private void btnDown_Click(object sender, RoutedEventArgs e)
  38. {
  39. CameraHelper.CloseDevice();
  40. }
  41. }
  42. }