版博士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.
 
 
 
 

78 lines
2.8 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.Tasks;
  9. using System.Windows.Forms;
  10. namespace ProductionControl
  11. {
  12. public partial class FrmDebug2 : Form
  13. {
  14. public FrmDebug2()
  15. {
  16. InitializeComponent();
  17. initDataView();
  18. }
  19. private void initDataView()
  20. {
  21. var list = new BindingList<Process>();
  22. //list.Add(new Process("扫码枪"));
  23. //list.Add(new Process("加紧气缸"));
  24. //list.Add(new Process("张力测量"));
  25. //list.Add(new Process("厚度测量"));
  26. //list.Add(new Process("滑台电机1"));
  27. //list.Add(new Process("滑台电机2"));
  28. //list.Add(new Process("滑台电机3"));
  29. //list.Add(new Process("滑台电机4"));
  30. //list.Add(new Process("滑台电机5"));
  31. //list.Add(new Process("光源"));
  32. //list.Add(new Process("AI检测-尺寸"));
  33. //list.Add(new Process("AI检测-缺陷"));
  34. //list.Add(new Process("AI检测-其它"));
  35. //dataGridView1.DataSource = new BindingSource(list, null);
  36. }
  37. private class Process
  38. {
  39. public Process(string _name)
  40. {
  41. name = _name;
  42. }
  43. public string name { get; set; }
  44. }
  45. private void FrmDebug2_Resize(object sender, EventArgs e)
  46. {
  47. int spliceWidth = 10;
  48. groupBox1.Width = groupBox2.Width = groupBox3.Width =
  49. groupBox4.Width = groupBox5.Width = groupBox6.Width =
  50. groupBox7.Width = groupBox8.Width = groupBox9.Width = (this.ClientSize.Width- spliceWidth*3) / 3;
  51. groupBox2.Left = groupBox1.Right + spliceWidth;
  52. groupBox3.Left = groupBox2.Right + spliceWidth;
  53. groupBox9.Left = groupBox4.Right + spliceWidth;
  54. groupBox5.Left = groupBox9.Right + spliceWidth;
  55. groupBox7.Left = groupBox6.Right + spliceWidth;
  56. groupBox8.Left = groupBox7.Right + spliceWidth;
  57. //
  58. groupBox1.Height = groupBox2.Height = groupBox3.Height =
  59. groupBox4.Height = groupBox5.Height = groupBox6.Height =
  60. groupBox7.Height = groupBox8.Height = groupBox9.Height = (this.ClientSize.Height - spliceWidth * 3-40) / 3;
  61. groupBox4.Top = groupBox5.Top = groupBox9.Top = groupBox1.Bottom + spliceWidth;
  62. groupBox6.Top = groupBox7.Top = groupBox8.Top = groupBox4.Bottom + spliceWidth;
  63. }
  64. private void toolStripButton4_Click(object sender, EventArgs e)
  65. {
  66. this.Close();
  67. }
  68. }
  69. }