TitrationManualWindow.xaml.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. using SHJX.Service.Control.Common.Assets;
  2. using System.Windows.Controls;
  3. using shjxCamera;
  4. namespace SHJX.Service.Shell.Views.Manual
  5. {
  6. /// <summary>
  7. /// Interaction logic for TitrationManualWindow.xaml
  8. /// </summary>
  9. public partial class TitrationManualWindow : UserControl
  10. {
  11. public TitrationManualWindow()
  12. {
  13. InitializeComponent();
  14. if (Globals.Camera is not null)
  15. {
  16. Globals.Camera.ShowControl(ref pnlSignal, 0, 0, pnlSignal.Width, pnlSignal.Height);
  17. if (!Globals.Camera.IsOpened)
  18. {
  19. Globals.Camera.OpenCamera();
  20. }
  21. }
  22. }
  23. private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
  24. {
  25. Button_Click_Stop.IsEnabled = false;
  26. Button_Click_Begin.IsEnabled = true;
  27. }
  28. private void Button_Click_1(object sender, System.Windows.RoutedEventArgs e)
  29. {
  30. Button_Click_Stop.IsEnabled = true;
  31. Button_Click_Begin.IsEnabled = false;
  32. }
  33. private void Button_Click_2(object sender, System.Windows.RoutedEventArgs e)
  34. {
  35. }
  36. //private void SelectionChanged(object sender, SelectionChangedEventArgs e)
  37. //{
  38. // Dispatcher.BeginInvoke(new System.Action(() =>
  39. // {
  40. // string s = TabConcentration.SelectedValue?.ToString();
  41. // if (s.Contains("滴定2"))
  42. // {
  43. // if (Globals.Camera2 is not null)
  44. // {
  45. // Globals.Camera2.ShowControl(ref pnlSignal, 0, 0, pnlSignal.Width, pnlSignal.Height);
  46. // if (!Globals.Camera2.IsOpened)
  47. // {
  48. // Globals.Camera2.OpenCamera();
  49. // }
  50. // }
  51. // }
  52. // if (s.Contains("滴定1"))
  53. // {
  54. // if (Globals.Camera is not null)
  55. // {
  56. // Globals.Camera.ShowControl(ref pnlSignal, 0, 0, pnlSignal.Width, pnlSignal.Height);
  57. // if (!Globals.Camera.IsOpened)
  58. // {
  59. // Globals.Camera.OpenCamera();
  60. // }
  61. // }
  62. // }
  63. // }));
  64. //}
  65. }
  66. }