banboshi_V1/halftoneproject-master/Code/FrmDebug2.cs
2023-10-31 13:19:29 +08:00

78 lines
2.8 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ProductionControl
{
public partial class FrmDebug2 : Form
{
public FrmDebug2()
{
InitializeComponent();
initDataView();
}
private void initDataView()
{
var list = new BindingList<Process>();
//list.Add(new Process("扫码枪"));
//list.Add(new Process("加紧气缸"));
//list.Add(new Process("张力测量"));
//list.Add(new Process("厚度测量"));
//list.Add(new Process("滑台电机1"));
//list.Add(new Process("滑台电机2"));
//list.Add(new Process("滑台电机3"));
//list.Add(new Process("滑台电机4"));
//list.Add(new Process("滑台电机5"));
//list.Add(new Process("光源"));
//list.Add(new Process("AI检测-尺寸"));
//list.Add(new Process("AI检测-缺陷"));
//list.Add(new Process("AI检测-其它"));
//dataGridView1.DataSource = new BindingSource(list, null);
}
private class Process
{
public Process(string _name)
{
name = _name;
}
public string name { get; set; }
}
private void FrmDebug2_Resize(object sender, EventArgs e)
{
int spliceWidth = 10;
groupBox1.Width = groupBox2.Width = groupBox3.Width =
groupBox4.Width = groupBox5.Width = groupBox6.Width =
groupBox7.Width = groupBox8.Width = groupBox9.Width = (this.ClientSize.Width- spliceWidth*3) / 3;
groupBox2.Left = groupBox1.Right + spliceWidth;
groupBox3.Left = groupBox2.Right + spliceWidth;
groupBox9.Left = groupBox4.Right + spliceWidth;
groupBox5.Left = groupBox9.Right + spliceWidth;
groupBox7.Left = groupBox6.Right + spliceWidth;
groupBox8.Left = groupBox7.Right + spliceWidth;
//
groupBox1.Height = groupBox2.Height = groupBox3.Height =
groupBox4.Height = groupBox5.Height = groupBox6.Height =
groupBox7.Height = groupBox8.Height = groupBox9.Height = (this.ClientSize.Height - spliceWidth * 3-40) / 3;
groupBox4.Top = groupBox5.Top = groupBox9.Top = groupBox1.Bottom + spliceWidth;
groupBox6.Top = groupBox7.Top = groupBox8.Top = groupBox4.Bottom + spliceWidth;
}
private void toolStripButton4_Click(object sender, EventArgs e)
{
this.Close();
}
}
}