版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

97 lines
2.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
  12. namespace ProductionControl
  13. {
  14. public partial class FrmDebug3 : Form
  15. {
  16. SynchronizationContext SyncContext = null;
  17. public FrmDebug3( )
  18. {
  19. InitializeComponent();
  20. //获取UI线程同步上下文
  21. SyncContext = SynchronizationContext.Current;
  22. //init();
  23. }
  24. private void FrmDebug3_Load(object sender, EventArgs e)
  25. {
  26. //init();
  27. this.uiIOCard1.IOOutEvent = () =>
  28. {
  29. if (Config.HeightDevIOState)
  30. this.uiAxis1.stopNow();
  31. };
  32. }
  33. private void init()
  34. {
  35. this.uiAxis1.init();
  36. this.uiSmallAxisDev1.init();
  37. this.uiIOCard1.init();
  38. this.uiIOCard1.IOOutEvent = () =>
  39. {
  40. if (Config.HeightDevIOState)
  41. this.uiAxis1.stopNow();
  42. };
  43. //this.uiCodeScanner1.init();
  44. this.uiLight1.init();
  45. this.uiScanner1.init(Device.ScannerDev.ScannerType.GENTL);
  46. this.uiScanner2.init(Device.ScannerDev.ScannerType.CC);
  47. this.uiTension1.init();
  48. this.uiHeightDev1.init();
  49. this.uiDefectLib1.init();
  50. this.uiSizeLib1.init();
  51. }
  52. private void propertyGrid2_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
  53. {
  54. //其中包含了两个重要的属性:OldValue和ChangeItem。而ChangeItem则是“PropertyDescriptorGridEntry”类型。
  55. //一般可以通过ChangeItem的PropertyDescriptor的ComponentType查找到属性的实际类型。
  56. //而通过ChangeItem的Label,则可以查看到当前在属性编辑输入框中显示的值。
  57. //通过ChangeItem,基本可以处理所有的属性变化的处理
  58. }
  59. private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
  60. {
  61. switch (tabControl1.SelectedTab.Text)
  62. {
  63. case "":
  64. break;
  65. }
  66. }
  67. private void tsbtnOpenDev_Click(object sender, EventArgs e)
  68. {
  69. try
  70. {
  71. }
  72. catch (Exception ex)
  73. {
  74. }
  75. }
  76. private void tsbtnClose_Click(object sender, EventArgs e)
  77. {
  78. }
  79. }
  80. }