Commit 657fdc85 几米阳光

去掉固定点信息,增加AOI程序配置

1 个父辈 b2aabcfe
......@@ -20,15 +20,15 @@ namespace URSoldering.DeviceLibrary
/// 电路板ID
/// </summary>
public int boardId { get; set; }
public string AoiFileName { get; set; }
/// <summary>
/// 条码
/// </summary>
public string WareCode { get; set; }
/// <summary>
/// 机器人焊接时Z轴的高点
/// </summary>
public double ZHighValue { get; set; }
///// <summary>
///// 机器人焊接时Z轴的高点
///// </summary>
//public double ZHighValue { get; set; }
/// <summary>
/// 工位编号,夹具编号(每一个程序需要配置四个夹具的位置,防止位置偏差)
......@@ -56,14 +56,14 @@ namespace URSoldering.DeviceLibrary
/// 焊点列表
/// </summary>
public List<WeldPointInfo> pointList { get; set; }
/// <summary>
/// 原点坐标X
/// </summary>
public double originX { get; set; }
/// <summary>
/// 原点坐标Y
/// </summary>
public double originY { get; set; }
///// <summary>
///// 原点坐标X
///// </summary>
//public double originX { get; set; }
///// <summary>
///// 原点坐标Y
///// </summary>
//public double originY { get; set; }
/// <summary>
/// 图片名称
/// </summary>
......@@ -72,10 +72,10 @@ namespace URSoldering.DeviceLibrary
/// 焊接预估时间
/// </summary>
public double planNeedTime { get; set; }
/// <summary>
/// 固定原点的位置,1=左上角,2=左下角,3=右上角,4=右下角
/// </summary>
public int orgType { get; set; }
///// <summary>
///// 固定原点的位置,1=左上角,2=左下角,3=右上角,4=右下角
///// </summary>
//public int orgType { get; set; }
/// <summary>
/// 已经焊接次数,每次修改板子都会重置
/// </summary>
......@@ -124,39 +124,38 @@ namespace URSoldering.DeviceLibrary
else
{
return myImage;
}
}
}
public double getImageOrgX()
{
double orgX = originX;
if (orgType == 2)
{
orgX = originX + boardLength;
}
//public double getImageOrgX()
//{
// double orgX = originX;
// if (orgType == 2)
// {
// orgX = originX + boardLength;
// }
else if (orgType == 4)
{
orgX = originX + boardLength;
}
return orgX;
}
// else if (orgType == 4)
// {
// orgX = originX + boardLength;
// }
// return orgX;
//}
public double getImageOrgY()
{
double orgY = originY;
//public double getImageOrgY()
//{
// double orgY = originY;
if (orgType == 3)
{
orgY = originY - boardWidth;
}
else if (orgType == 4)
{
orgY = originY - boardWidth;
}
return orgY;
}
// if (orgType == 3)
// {
// orgY = originY - boardWidth;
// }
// else if (orgType == 4)
// {
// orgY = originY - boardWidth;
// }
// return orgY;
//}
}
/// <summary>
......
......@@ -107,10 +107,10 @@ namespace URSoldering.DeviceLibrary
LogUtil.info("加载产品配置:name=" + board.boardName + "为启动时的默认板子!");
CurrBoard = board;
}
if (board.orgType == 0)
{
board.orgType = 1;
}
//if (board.orgType == 0)
//{
// board.orgType = 1;
//}
boardList.Add(board);
}
if (isUpdate)
......@@ -152,22 +152,22 @@ namespace URSoldering.DeviceLibrary
LogUtil.error("设置默认的电路板出错:" + ex.ToString());
}
}
public static void Update(BoardInfo board)
{
int index = 0;
board.myImage = null;
foreach (BoardInfo bo in boardList)
{
if (bo.boardId.Equals(board.boardId))
{
boardList[index] = board;
break;
}
index++;
}
SaveListToFile(boardList);
}
{
int index = 0;
board.myImage = null;
foreach (BoardInfo bo in boardList)
{
if (bo.boardId.Equals(board.boardId))
{
boardList[index] = board;
break;
}
index++;
}
SaveListToFile(boardList);
}
public static void Add(BoardInfo board)
{
......
......@@ -44,8 +44,10 @@ namespace URSoldering.Client
{
try
{
string filePath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string path = Path.GetDirectoryName(filePath);
OpenFileDialog openfileDlg = new OpenFileDialog();
openfileDlg.InitialDirectory = path;
openfileDlg.Filter = "vscf files (*.vscf)|*.vscf";
openfileDlg.FilterIndex = 1;
openfileDlg.RestoreDirectory = true;
......@@ -67,8 +69,10 @@ namespace URSoldering.Client
{
try
{
string filePath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string path = Path.GetDirectoryName(filePath);
SaveFileDialog savefileDlg = new SaveFileDialog();
savefileDlg.InitialDirectory = path;
savefileDlg.Filter = "ckcf files (*.vscf)|*.vscf";
savefileDlg.FilterIndex = 1;
savefileDlg.RestoreDirectory = true;
......
......@@ -37,8 +37,6 @@
this.label1 = new System.Windows.Forms.Label();
this.btnBack = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
this.txtRobotZHighValue = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtBoardName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
......@@ -81,8 +79,6 @@
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btnBack);
this.groupBox1.Controls.Add(this.btnSave);
this.groupBox1.Controls.Add(this.txtRobotZHighValue);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.txtBoardName);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -95,7 +91,7 @@
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(131, 96);
this.txtCode.Location = new System.Drawing.Point(131, 98);
this.txtCode.MaxLength = 20;
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(221, 23);
......@@ -104,7 +100,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(73, 100);
this.label1.Location = new System.Drawing.Point(73, 102);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 17);
this.label1.TabIndex = 269;
......@@ -114,7 +110,7 @@
//
this.btnBack.FlatAppearance.BorderSize = 0;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(224, 193);
this.btnBack.Location = new System.Drawing.Point(224, 176);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(107, 37);
this.btnBack.TabIndex = 41;
......@@ -126,7 +122,7 @@
//
this.btnSave.FlatAppearance.BorderSize = 0;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(91, 193);
this.btnSave.Location = new System.Drawing.Point(111, 176);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(107, 37);
this.btnSave.TabIndex = 40;
......@@ -134,23 +130,6 @@
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// txtRobotZHighValue
//
this.txtRobotZHighValue.Location = new System.Drawing.Point(131, 142);
this.txtRobotZHighValue.Name = "txtRobotZHighValue";
this.txtRobotZHighValue.Size = new System.Drawing.Size(89, 23);
this.txtRobotZHighValue.TabIndex = 266;
this.txtRobotZHighValue.Text = "-20";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(65, 146);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(51, 17);
this.label9.TabIndex = 265;
this.label9.Text = "高位Z轴";
//
// txtBoardName
//
this.txtBoardName.Location = new System.Drawing.Point(132, 50);
......@@ -207,8 +186,6 @@
private System.Windows.Forms.Label label14;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn1;
private System.Windows.Forms.DataGridViewImageColumn dataGridViewImageColumn2;
private System.Windows.Forms.TextBox txtRobotZHighValue;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtCode;
private System.Windows.Forms.Label label1;
}
......
......@@ -47,7 +47,7 @@ namespace URSoldering.Client
txtBoardName.Text = newName;
txtRobotZHighValue.Text = oldBoard.ZHighValue.ToString();
//txtRobotZHighValue.Text = oldBoard.ZHighValue.ToString();
}
......@@ -63,11 +63,7 @@ namespace URSoldering.Client
try
{
string newName = FormUtil.getValue(txtBoardName);
string newCode = FormUtil.getValue(txtCode);
int newZHigh = FormUtil.GetIntValue(txtRobotZHighValue);
string newCode = FormUtil.getValue(txtCode);
if (newName.Equals(""))
{
MessageBox.Show("请输入程序名称");
......@@ -79,8 +75,7 @@ namespace URSoldering.Client
{
MessageBox.Show("程序名称【" + newName + "】已存在,复制失败!");
return;
}
}
BoardInfo newBoard = new BoardInfo();
//newBoard.boardCode = oldBoard.boardCode;
......@@ -96,11 +91,11 @@ namespace URSoldering.Client
newBoard.solderingTime = oldBoard.solderingTime;
newBoard.solderTime = oldBoard.solderTime;
newBoard.imgName = oldBoard.imgName;
newBoard.orgType = oldBoard.orgType;
newBoard.originX = oldBoard.originX;
newBoard.originY = oldBoard.originY;
newBoard.ZHighValue = newZHigh;
//newBoard.orgType = oldBoard.orgType;
//newBoard.originX = oldBoard.originX;
//newBoard.originY = oldBoard.originY;
newBoard.AoiFileName=oldBoard.AoiFileName;
//newBoard.ZHighValue = newZHigh;
try
{
if (!oldBoard.imgName.Contains(oldBoard.boardName))
......
......@@ -34,12 +34,6 @@
this.保存焊点ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.picRight = new System.Windows.Forms.PictureBox();
this.picLeft = new System.Windows.Forms.PictureBox();
this.picUp = new System.Windows.Forms.PictureBox();
this.picDown = new System.Windows.Forms.PictureBox();
this.picZDel = new System.Windows.Forms.PictureBox();
this.picZAdd = new System.Windows.Forms.PictureBox();
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.更新坐标ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.测试位置ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
......@@ -54,18 +48,9 @@
this.panPoint = new System.Windows.Forms.Panel();
this.panBoard = new System.Windows.Forms.Panel();
this.picBoard = new System.Windows.Forms.PictureBox();
this.gbOriginInfo = new System.Windows.Forms.GroupBox();
this.btnSetClear2 = new System.Windows.Forms.Button();
this.btnSetClear1 = new System.Windows.Forms.Button();
this.cmbOrgType = new System.Windows.Forms.ComboBox();
this.label21 = new System.Windows.Forms.Label();
this.btnSaveHome = new System.Windows.Forms.Button();
this.btnSetOrigin = new System.Windows.Forms.Button();
this.txtOriginY = new System.Windows.Forms.TextBox();
this.txtOriginX = new System.Windows.Forms.TextBox();
this.lblOriginX = new System.Windows.Forms.Label();
this.lblOriginY = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.chbIsSafe = new System.Windows.Forms.CheckBox();
this.label11 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
......@@ -78,6 +63,12 @@
this.label16 = new System.Windows.Forms.Label();
this.lblSpeed = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.picRight = new System.Windows.Forms.PictureBox();
this.picLeft = new System.Windows.Forms.PictureBox();
this.picUp = new System.Windows.Forms.PictureBox();
this.picDown = new System.Windows.Forms.PictureBox();
this.picZDel = new System.Windows.Forms.PictureBox();
this.picZAdd = new System.Windows.Forms.PictureBox();
this.btnPositionTest = new System.Windows.Forms.Button();
this.lblEpsonError = new System.Windows.Forms.Label();
this.lblMsg = new System.Windows.Forms.Label();
......@@ -97,22 +88,6 @@
this.txtRobotX = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.dgvList = new System.Windows.Forms.DataGridView();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtCode = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtBoardName = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnSave = new System.Windows.Forms.Button();
this.txtBoardLength = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtBoardWidth = new System.Windows.Forms.TextBox();
this.btnOpenFile = new System.Windows.Forms.Button();
this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.Column_pointNum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column_X = new System.Windows.Forms.DataGridViewTextBoxColumn();
......@@ -142,20 +117,35 @@
this.Column_Del = new System.Windows.Forms.DataGridViewLinkColumn();
this.Column_Up = new System.Windows.Forms.DataGridViewImageColumn();
this.Column_Down = new System.Windows.Forms.DataGridViewImageColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.cmbAoiFile = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.txtBoardName = new System.Windows.Forms.TextBox();
this.label25 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnSave = new System.Windows.Forms.Button();
this.txtBoardLength = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtBoardWidth = new System.Windows.Forms.TextBox();
this.btnOpenFile = new System.Windows.Forms.Button();
this.btnSStop = new System.Windows.Forms.Button();
this.btnWStop = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picUp)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picZDel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picZAdd)).BeginInit();
this.contextMenuStrip2.SuspendLayout();
this.panel1.SuspendLayout();
this.panBoard.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picBoard)).BeginInit();
this.gbOriginInfo.SuspendLayout();
this.groupBox2.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picUp)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picZDel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.picZAdd)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvList)).BeginInit();
this.groupBox1.SuspendLayout();
......@@ -179,84 +169,6 @@
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// picRight
//
this.picRight.BackColor = System.Drawing.Color.Transparent;
this.picRight.Image = ((System.Drawing.Image)(resources.GetObject("picRight.Image")));
this.picRight.Location = new System.Drawing.Point(151, 42);
this.picRight.Name = "picRight";
this.picRight.Size = new System.Drawing.Size(45, 45);
this.picRight.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picRight.TabIndex = 326;
this.picRight.TabStop = false;
this.toolTip1.SetToolTip(this.picRight, "向右");
this.picRight.Click += new System.EventHandler(this.btnRight_Click);
//
// picLeft
//
this.picLeft.BackColor = System.Drawing.Color.Transparent;
this.picLeft.Image = ((System.Drawing.Image)(resources.GetObject("picLeft.Image")));
this.picLeft.Location = new System.Drawing.Point(73, 42);
this.picLeft.Name = "picLeft";
this.picLeft.Size = new System.Drawing.Size(45, 45);
this.picLeft.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picLeft.TabIndex = 323;
this.picLeft.TabStop = false;
this.toolTip1.SetToolTip(this.picLeft, "向左");
this.picLeft.Click += new System.EventHandler(this.btnLeft_Click);
//
// picUp
//
this.picUp.BackColor = System.Drawing.Color.Transparent;
this.picUp.Image = ((System.Drawing.Image)(resources.GetObject("picUp.Image")));
this.picUp.Location = new System.Drawing.Point(111, 2);
this.picUp.Name = "picUp";
this.picUp.Size = new System.Drawing.Size(45, 45);
this.picUp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picUp.TabIndex = 325;
this.picUp.TabStop = false;
this.toolTip1.SetToolTip(this.picUp, "向前");
this.picUp.Click += new System.EventHandler(this.btnUp_Click);
//
// picDown
//
this.picDown.BackColor = System.Drawing.Color.Transparent;
this.picDown.Image = ((System.Drawing.Image)(resources.GetObject("picDown.Image")));
this.picDown.Location = new System.Drawing.Point(111, 82);
this.picDown.Name = "picDown";
this.picDown.Size = new System.Drawing.Size(45, 45);
this.picDown.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picDown.TabIndex = 324;
this.picDown.TabStop = false;
this.toolTip1.SetToolTip(this.picDown, "向后");
this.picDown.Click += new System.EventHandler(this.btnDown_Click);
//
// picZDel
//
this.picZDel.BackColor = System.Drawing.Color.Transparent;
this.picZDel.Image = ((System.Drawing.Image)(resources.GetObject("picZDel.Image")));
this.picZDel.Location = new System.Drawing.Point(2, 65);
this.picZDel.Name = "picZDel";
this.picZDel.Size = new System.Drawing.Size(45, 45);
this.picZDel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picZDel.TabIndex = 322;
this.picZDel.TabStop = false;
this.toolTip1.SetToolTip(this.picZDel, "向下");
this.picZDel.Click += new System.EventHandler(this.btnZDel_Click);
//
// picZAdd
//
this.picZAdd.BackColor = System.Drawing.Color.Transparent;
this.picZAdd.Image = ((System.Drawing.Image)(resources.GetObject("picZAdd.Image")));
this.picZAdd.Location = new System.Drawing.Point(2, 20);
this.picZAdd.Name = "picZAdd";
this.picZAdd.Size = new System.Drawing.Size(45, 45);
this.picZAdd.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picZAdd.TabIndex = 320;
this.picZAdd.TabStop = false;
this.toolTip1.SetToolTip(this.picZAdd, "向上");
this.picZAdd.Click += new System.EventHandler(this.btnZAdd_Click);
//
// contextMenuStrip2
//
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
......@@ -371,7 +283,6 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panBoard.Controls.Add(this.picBoard);
this.panBoard.Controls.Add(this.gbOriginInfo);
this.panBoard.Location = new System.Drawing.Point(940, 78);
this.panBoard.Name = "panBoard";
this.panBoard.Size = new System.Drawing.Size(440, 553);
......@@ -391,138 +302,10 @@
this.picBoard.TabStop = false;
this.picBoard.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picBoard_MouseDown);
//
// gbOriginInfo
//
this.gbOriginInfo.Controls.Add(this.btnSetClear2);
this.gbOriginInfo.Controls.Add(this.btnSetClear1);
this.gbOriginInfo.Controls.Add(this.cmbOrgType);
this.gbOriginInfo.Controls.Add(this.label21);
this.gbOriginInfo.Controls.Add(this.btnSaveHome);
this.gbOriginInfo.Controls.Add(this.btnSetOrigin);
this.gbOriginInfo.Controls.Add(this.txtOriginY);
this.gbOriginInfo.Controls.Add(this.txtOriginX);
this.gbOriginInfo.Controls.Add(this.lblOriginX);
this.gbOriginInfo.Controls.Add(this.lblOriginY);
this.gbOriginInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.gbOriginInfo.Location = new System.Drawing.Point(9, 157);
this.gbOriginInfo.Name = "gbOriginInfo";
this.gbOriginInfo.Size = new System.Drawing.Size(420, 58);
this.gbOriginInfo.TabIndex = 258;
this.gbOriginInfo.TabStop = false;
this.gbOriginInfo.Text = "固定点信息";
this.gbOriginInfo.Visible = false;
//
// btnSetClear2
//
this.btnSetClear2.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnSetClear2.FlatAppearance.BorderSize = 0;
this.btnSetClear2.Location = new System.Drawing.Point(315, 16);
this.btnSetClear2.Name = "btnSetClear2";
this.btnSetClear2.Size = new System.Drawing.Size(96, 32);
this.btnSetClear2.TabIndex = 38;
this.btnSetClear2.Text = "重置清洗点2";
this.btnSetClear2.UseVisualStyleBackColor = true;
this.btnSetClear2.Click += new System.EventHandler(this.btnSetClear2_Click);
//
// btnSetClear1
//
this.btnSetClear1.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnSetClear1.FlatAppearance.BorderSize = 0;
this.btnSetClear1.Location = new System.Drawing.Point(219, 16);
this.btnSetClear1.Name = "btnSetClear1";
this.btnSetClear1.Size = new System.Drawing.Size(96, 32);
this.btnSetClear1.TabIndex = 37;
this.btnSetClear1.Text = "重置清洗点1";
this.btnSetClear1.UseVisualStyleBackColor = true;
this.btnSetClear1.Click += new System.EventHandler(this.btnSetClear1_Click);
//
// cmbOrgType
//
this.cmbOrgType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOrgType.FormattingEnabled = true;
this.cmbOrgType.Items.AddRange(new object[] {
"A",
"B",
"C",
"D"});
this.cmbOrgType.Location = new System.Drawing.Point(250, 21);
this.cmbOrgType.Name = "cmbOrgType";
this.cmbOrgType.Size = new System.Drawing.Size(70, 25);
this.cmbOrgType.TabIndex = 34;
this.cmbOrgType.SelectedIndexChanged += new System.EventHandler(this.cmbOrgType_SelectedIndexChanged);
//
// label21
//
this.label21.AutoSize = true;
this.label21.Location = new System.Drawing.Point(215, 24);
this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(32, 17);
this.label21.TabIndex = 33;
this.label21.Text = "位置";
//
// btnSaveHome
//
this.btnSaveHome.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnSaveHome.FlatAppearance.BorderSize = 0;
this.btnSaveHome.Location = new System.Drawing.Point(123, 16);
this.btnSaveHome.Name = "btnSaveHome";
this.btnSaveHome.Size = new System.Drawing.Size(96, 32);
this.btnSaveHome.TabIndex = 36;
this.btnSaveHome.Text = "重置原点";
this.btnSaveHome.UseVisualStyleBackColor = true;
this.btnSaveHome.Click += new System.EventHandler(this.btnSaveHome_Click);
//
// btnSetOrigin
//
this.btnSetOrigin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.btnSetOrigin.FlatAppearance.BorderSize = 0;
this.btnSetOrigin.Location = new System.Drawing.Point(27, 16);
this.btnSetOrigin.Name = "btnSetOrigin";
this.btnSetOrigin.Size = new System.Drawing.Size(96, 32);
this.btnSetOrigin.TabIndex = 32;
this.btnSetOrigin.Text = "重置固定点";
this.btnSetOrigin.UseVisualStyleBackColor = true;
this.btnSetOrigin.Click += new System.EventHandler(this.btnSetOrigin_Click);
//
// txtOriginY
//
this.txtOriginY.Location = new System.Drawing.Point(131, 21);
this.txtOriginY.MaxLength = 20;
this.txtOriginY.Name = "txtOriginY";
this.txtOriginY.Size = new System.Drawing.Size(70, 23);
this.txtOriginY.TabIndex = 7;
this.txtOriginY.TextChanged += new System.EventHandler(this.txtOriginY_TextChanged);
//
// txtOriginX
//
this.txtOriginX.Location = new System.Drawing.Point(28, 21);
this.txtOriginX.MaxLength = 20;
this.txtOriginX.Name = "txtOriginX";
this.txtOriginX.Size = new System.Drawing.Size(70, 23);
this.txtOriginX.TabIndex = 5;
this.txtOriginX.TextChanged += new System.EventHandler(this.txtOriginX_TextChanged);
//
// lblOriginX
//
this.lblOriginX.AutoSize = true;
this.lblOriginX.Location = new System.Drawing.Point(9, 25);
this.lblOriginX.Name = "lblOriginX";
this.lblOriginX.Size = new System.Drawing.Size(16, 17);
this.lblOriginX.TabIndex = 0;
this.lblOriginX.Text = "X";
//
// lblOriginY
//
this.lblOriginY.AutoSize = true;
this.lblOriginY.Location = new System.Drawing.Point(111, 24);
this.lblOriginY.Name = "lblOriginY";
this.lblOriginY.Size = new System.Drawing.Size(15, 17);
this.lblOriginY.TabIndex = 6;
this.lblOriginY.Text = "Y";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.txtCode);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.chbIsSafe);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.label6);
......@@ -561,6 +344,24 @@
this.groupBox2.TabStop = false;
this.groupBox2.Text = "机器人实时坐标";
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(39, 19);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(155, 23);
this.txtCode.TabIndex = 268;
this.txtCode.Visible = false;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(-1, 22);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 17);
this.label10.TabIndex = 267;
this.label10.Text = "条码";
this.label10.Visible = false;
//
// chbIsSafe
//
this.chbIsSafe.AutoSize = true;
......@@ -683,11 +484,89 @@
this.panel3.Size = new System.Drawing.Size(199, 129);
this.panel3.TabIndex = 259;
//
// picRight
//
this.picRight.BackColor = System.Drawing.Color.Transparent;
this.picRight.Image = ((System.Drawing.Image)(resources.GetObject("picRight.Image")));
this.picRight.Location = new System.Drawing.Point(151, 42);
this.picRight.Name = "picRight";
this.picRight.Size = new System.Drawing.Size(45, 45);
this.picRight.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picRight.TabIndex = 326;
this.picRight.TabStop = false;
this.toolTip1.SetToolTip(this.picRight, "向右");
this.picRight.Click += new System.EventHandler(this.btnRight_Click);
//
// picLeft
//
this.picLeft.BackColor = System.Drawing.Color.Transparent;
this.picLeft.Image = ((System.Drawing.Image)(resources.GetObject("picLeft.Image")));
this.picLeft.Location = new System.Drawing.Point(73, 42);
this.picLeft.Name = "picLeft";
this.picLeft.Size = new System.Drawing.Size(45, 45);
this.picLeft.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picLeft.TabIndex = 323;
this.picLeft.TabStop = false;
this.toolTip1.SetToolTip(this.picLeft, "向左");
this.picLeft.Click += new System.EventHandler(this.btnLeft_Click);
//
// picUp
//
this.picUp.BackColor = System.Drawing.Color.Transparent;
this.picUp.Image = ((System.Drawing.Image)(resources.GetObject("picUp.Image")));
this.picUp.Location = new System.Drawing.Point(111, 2);
this.picUp.Name = "picUp";
this.picUp.Size = new System.Drawing.Size(45, 45);
this.picUp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picUp.TabIndex = 325;
this.picUp.TabStop = false;
this.toolTip1.SetToolTip(this.picUp, "向前");
this.picUp.Click += new System.EventHandler(this.btnUp_Click);
//
// picDown
//
this.picDown.BackColor = System.Drawing.Color.Transparent;
this.picDown.Image = ((System.Drawing.Image)(resources.GetObject("picDown.Image")));
this.picDown.Location = new System.Drawing.Point(111, 82);
this.picDown.Name = "picDown";
this.picDown.Size = new System.Drawing.Size(45, 45);
this.picDown.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picDown.TabIndex = 324;
this.picDown.TabStop = false;
this.toolTip1.SetToolTip(this.picDown, "向后");
this.picDown.Click += new System.EventHandler(this.btnDown_Click);
//
// picZDel
//
this.picZDel.BackColor = System.Drawing.Color.Transparent;
this.picZDel.Image = ((System.Drawing.Image)(resources.GetObject("picZDel.Image")));
this.picZDel.Location = new System.Drawing.Point(2, 65);
this.picZDel.Name = "picZDel";
this.picZDel.Size = new System.Drawing.Size(45, 45);
this.picZDel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picZDel.TabIndex = 322;
this.picZDel.TabStop = false;
this.toolTip1.SetToolTip(this.picZDel, "向下");
this.picZDel.Click += new System.EventHandler(this.btnZDel_Click);
//
// picZAdd
//
this.picZAdd.BackColor = System.Drawing.Color.Transparent;
this.picZAdd.Image = ((System.Drawing.Image)(resources.GetObject("picZAdd.Image")));
this.picZAdd.Location = new System.Drawing.Point(2, 20);
this.picZAdd.Name = "picZAdd";
this.picZAdd.Size = new System.Drawing.Size(45, 45);
this.picZAdd.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.picZAdd.TabIndex = 320;
this.picZAdd.TabStop = false;
this.toolTip1.SetToolTip(this.picZAdd, "向上");
this.picZAdd.Click += new System.EventHandler(this.btnZAdd_Click);
//
// btnPositionTest
//
this.btnPositionTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnPositionTest.FlatAppearance.BorderSize = 0;
this.btnPositionTest.Location = new System.Drawing.Point(785, 178);
this.btnPositionTest.Location = new System.Drawing.Point(793, 175);
this.btnPositionTest.Name = "btnPositionTest";
this.btnPositionTest.Size = new System.Drawing.Size(100, 37);
this.btnPositionTest.TabIndex = 318;
......@@ -721,7 +600,7 @@
//
this.btnSavePoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSavePoint.FlatAppearance.BorderSize = 0;
this.btnSavePoint.Location = new System.Drawing.Point(785, 139);
this.btnSavePoint.Location = new System.Drawing.Point(793, 136);
this.btnSavePoint.Name = "btnSavePoint";
this.btnSavePoint.Size = new System.Drawing.Size(100, 37);
this.btnSavePoint.TabIndex = 30;
......@@ -733,7 +612,7 @@
//
this.btnStopDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopDown.Location = new System.Drawing.Point(785, 61);
this.btnStopDown.Location = new System.Drawing.Point(793, 58);
this.btnStopDown.Name = "btnStopDown";
this.btnStopDown.Size = new System.Drawing.Size(100, 37);
this.btnStopDown.TabIndex = 317;
......@@ -745,7 +624,7 @@
//
this.btnGoHome.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnGoHome.FlatAppearance.BorderSize = 0;
this.btnGoHome.Location = new System.Drawing.Point(785, 100);
this.btnGoHome.Location = new System.Drawing.Point(793, 97);
this.btnGoHome.Name = "btnGoHome";
this.btnGoHome.Size = new System.Drawing.Size(100, 37);
this.btnGoHome.TabIndex = 35;
......@@ -856,7 +735,7 @@
this.btnWUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnWUp.Enabled = false;
this.btnWUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWUp.Location = new System.Drawing.Point(785, 22);
this.btnWUp.Location = new System.Drawing.Point(793, 19);
this.btnWUp.Name = "btnWUp";
this.btnWUp.Size = new System.Drawing.Size(100, 37);
this.btnWUp.TabIndex = 254;
......@@ -939,190 +818,16 @@
this.dgvList.DragDrop += new System.Windows.Forms.DragEventHandler(this.dgvList_DragDrop);
this.dgvList.DragEnter += new System.Windows.Forms.DragEventHandler(this.dgvList_DragEnter);
//
// groupBox1
// Column_pointNum
//
this.groupBox1.Controls.Add(this.txtCode);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.txtBoardName);
this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.btnSave);
this.groupBox1.Controls.Add(this.txtBoardLength);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtBoardWidth);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(12, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(916, 68);
this.groupBox1.TabIndex = 20;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "程序基本信息";
this.Column_pointNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column_pointNum.DataPropertyName = "pointNum";
this.Column_pointNum.HeaderText = "ID";
this.Column_pointNum.Name = "Column_pointNum";
this.Column_pointNum.ReadOnly = true;
this.Column_pointNum.Width = 46;
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(289, 25);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(155, 23);
this.txtCode.TabIndex = 268;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(249, 28);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 17);
this.label10.TabIndex = 267;
this.label10.Text = "条码";
//
// txtBoardName
//
this.txtBoardName.Location = new System.Drawing.Point(46, 25);
this.txtBoardName.MaxLength = 20;
this.txtBoardName.Name = "txtBoardName";
this.txtBoardName.Size = new System.Drawing.Size(180, 23);
this.txtBoardName.TabIndex = 2;
//
// label25
//
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(680, 28);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(30, 17);
this.label25.TabIndex = 37;
this.label25.Text = "mm";
//
// label24
//
this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(550, 28);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(30, 17);
this.label24.TabIndex = 36;
this.label24.Text = "mm";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 28);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 1;
this.label2.Text = "名称";
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.FlatAppearance.BorderSize = 0;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(793, 16);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(117, 41);
this.btnSave.TabIndex = 40;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// txtBoardLength
//
this.txtBoardLength.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtBoardLength.Location = new System.Drawing.Point(492, 25);
this.txtBoardLength.MaxLength = 8;
this.txtBoardLength.Name = "txtBoardLength";
this.txtBoardLength.Size = new System.Drawing.Size(53, 23);
this.txtBoardLength.TabIndex = 4;
this.txtBoardLength.TextChanged += new System.EventHandler(this.txtBoardLength_TextChanged);
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(600, 28);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(20, 17);
this.label4.TabIndex = 5;
this.label4.Text = "宽";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(466, 28);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(20, 17);
this.label3.TabIndex = 3;
this.label3.Text = "高";
//
// txtBoardWidth
//
this.txtBoardWidth.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtBoardWidth.Location = new System.Drawing.Point(622, 25);
this.txtBoardWidth.MaxLength = 8;
this.txtBoardWidth.Name = "txtBoardWidth";
this.txtBoardWidth.Size = new System.Drawing.Size(53, 23);
this.txtBoardWidth.TabIndex = 6;
this.txtBoardWidth.TextChanged += new System.EventHandler(this.txtBoardWidth_TextChanged);
//
// btnOpenFile
//
this.btnOpenFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnOpenFile.FlatAppearance.BorderSize = 0;
this.btnOpenFile.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenFile.Location = new System.Drawing.Point(1103, 22);
this.btnOpenFile.Name = "btnOpenFile";
this.btnOpenFile.Size = new System.Drawing.Size(117, 41);
this.btnOpenFile.TabIndex = 260;
this.btnOpenFile.Text = "打开图片";
this.btnOpenFile.UseVisualStyleBackColor = true;
this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click);
//
// btnSStop
//
this.btnSStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSStop.Location = new System.Drawing.Point(1264, 9);
this.btnSStop.Name = "btnSStop";
this.btnSStop.Size = new System.Drawing.Size(117, 23);
this.btnSStop.TabIndex = 256;
this.btnSStop.Text = "烙铁停止移动";
this.btnSStop.UseVisualStyleBackColor = true;
this.btnSStop.Visible = false;
//
// btnWStop
//
this.btnWStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnWStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWStop.Location = new System.Drawing.Point(1264, 37);
this.btnWStop.Name = "btnWStop";
this.btnWStop.Size = new System.Drawing.Size(117, 23);
this.btnWStop.TabIndex = 257;
this.btnWStop.Text = "送丝停止移动";
this.btnWStop.UseVisualStyleBackColor = true;
this.btnWStop.Visible = false;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(195, 34);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(44, 17);
this.label14.TabIndex = 9;
this.label14.Text = "条形码";
this.label14.Visible = false;
//
// Column_pointNum
//
this.Column_pointNum.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
this.Column_pointNum.DataPropertyName = "pointNum";
this.Column_pointNum.HeaderText = "ID";
this.Column_pointNum.Name = "Column_pointNum";
this.Column_pointNum.ReadOnly = true;
this.Column_pointNum.Width = 46;
//
// Column_Name
// Column_Name
//
this.Column_Name.DataPropertyName = "pointName";
this.Column_Name.HeaderText = "名称";
......@@ -1368,6 +1073,182 @@
this.Column_Down.Visible = false;
this.Column_Down.Width = 50;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.cmbAoiFile);
this.groupBox1.Controls.Add(this.label9);
this.groupBox1.Controls.Add(this.txtBoardName);
this.groupBox1.Controls.Add(this.label25);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.btnSave);
this.groupBox1.Controls.Add(this.txtBoardLength);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtBoardWidth);
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(12, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(916, 68);
this.groupBox1.TabIndex = 20;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "程序基本信息";
//
// cmbAoiFile
//
this.cmbAoiFile.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbAoiFile.FormattingEnabled = true;
this.cmbAoiFile.Location = new System.Drawing.Point(331, 23);
this.cmbAoiFile.Name = "cmbAoiFile";
this.cmbAoiFile.Size = new System.Drawing.Size(180, 25);
this.cmbAoiFile.TabIndex = 269;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(247, 28);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(78, 17);
this.label9.TabIndex = 268;
this.label9.Text = "AOI检测程序";
//
// txtBoardName
//
this.txtBoardName.Location = new System.Drawing.Point(46, 25);
this.txtBoardName.MaxLength = 20;
this.txtBoardName.Name = "txtBoardName";
this.txtBoardName.Size = new System.Drawing.Size(180, 23);
this.txtBoardName.TabIndex = 2;
//
// label25
//
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(736, 28);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(30, 17);
this.label25.TabIndex = 37;
this.label25.Text = "mm";
//
// label24
//
this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(606, 28);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(30, 17);
this.label24.TabIndex = 36;
this.label24.Text = "mm";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(9, 28);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 17);
this.label2.TabIndex = 1;
this.label2.Text = "名称";
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.FlatAppearance.BorderSize = 0;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(793, 16);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(117, 41);
this.btnSave.TabIndex = 40;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// txtBoardLength
//
this.txtBoardLength.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtBoardLength.Location = new System.Drawing.Point(551, 25);
this.txtBoardLength.MaxLength = 8;
this.txtBoardLength.Name = "txtBoardLength";
this.txtBoardLength.Size = new System.Drawing.Size(53, 23);
this.txtBoardLength.TabIndex = 4;
this.txtBoardLength.TextChanged += new System.EventHandler(this.txtBoardLength_TextChanged);
//
// label4
//
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(659, 28);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(20, 17);
this.label4.TabIndex = 5;
this.label4.Text = "宽";
//
// label3
//
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(529, 28);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(20, 17);
this.label3.TabIndex = 3;
this.label3.Text = "高";
//
// txtBoardWidth
//
this.txtBoardWidth.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.txtBoardWidth.Location = new System.Drawing.Point(681, 25);
this.txtBoardWidth.MaxLength = 8;
this.txtBoardWidth.Name = "txtBoardWidth";
this.txtBoardWidth.Size = new System.Drawing.Size(53, 23);
this.txtBoardWidth.TabIndex = 6;
this.txtBoardWidth.TextChanged += new System.EventHandler(this.txtBoardWidth_TextChanged);
//
// btnOpenFile
//
this.btnOpenFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnOpenFile.FlatAppearance.BorderSize = 0;
this.btnOpenFile.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenFile.Location = new System.Drawing.Point(1103, 22);
this.btnOpenFile.Name = "btnOpenFile";
this.btnOpenFile.Size = new System.Drawing.Size(117, 41);
this.btnOpenFile.TabIndex = 260;
this.btnOpenFile.Text = "打开图片";
this.btnOpenFile.UseVisualStyleBackColor = true;
this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click);
//
// btnSStop
//
this.btnSStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSStop.Location = new System.Drawing.Point(1264, 9);
this.btnSStop.Name = "btnSStop";
this.btnSStop.Size = new System.Drawing.Size(117, 23);
this.btnSStop.TabIndex = 256;
this.btnSStop.Text = "烙铁停止移动";
this.btnSStop.UseVisualStyleBackColor = true;
this.btnSStop.Visible = false;
//
// btnWStop
//
this.btnWStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnWStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnWStop.Location = new System.Drawing.Point(1264, 37);
this.btnWStop.Name = "btnWStop";
this.btnWStop.Size = new System.Drawing.Size(117, 23);
this.btnWStop.TabIndex = 257;
this.btnWStop.Text = "送丝停止移动";
this.btnWStop.UseVisualStyleBackColor = true;
this.btnWStop.Visible = false;
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(195, 34);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(44, 17);
this.label14.TabIndex = 9;
this.label14.Text = "条形码";
this.label14.Visible = false;
//
// FrmBoardInfo
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
......@@ -1384,21 +1265,19 @@
this.Load += new System.EventHandler(this.FrmBoardInfo_Load);
this.Shown += new System.EventHandler(this.FrmBoardInfo_Shown);
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picUp)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picZDel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picZAdd)).EndInit();
this.contextMenuStrip2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panBoard.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picBoard)).EndInit();
this.gbOriginInfo.ResumeLayout(false);
this.gbOriginInfo.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picUp)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picZDel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.picZAdd)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tckSpeed)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dgvList)).EndInit();
this.groupBox1.ResumeLayout(false);
......@@ -1425,22 +1304,13 @@
private System.Windows.Forms.Button btnWStop;
private System.Windows.Forms.Button btnSStop;
private System.Windows.Forms.Button btnWUp;
private System.Windows.Forms.Button btnSetOrigin;
private System.Windows.Forms.GroupBox gbOriginInfo;
private System.Windows.Forms.TextBox txtOriginY;
private System.Windows.Forms.Label lblOriginY;
private System.Windows.Forms.TextBox txtOriginX;
private System.Windows.Forms.Label lblOriginX;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnOpenFile;
private System.Windows.Forms.PictureBox picBoard;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Panel panBoard;
private System.Windows.Forms.Label label21;
private System.Windows.Forms.ComboBox cmbOrgType;
private System.Windows.Forms.Button btnGoHome;
private System.Windows.Forms.Button btnSaveHome;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 保存焊点ToolStripMenuItem;
private System.Windows.Forms.ToolTip toolTip1;
......@@ -1460,8 +1330,6 @@
private System.Windows.Forms.Button btnSendWire;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtSpeed;
private System.Windows.Forms.Button btnSetClear2;
private System.Windows.Forms.Button btnSetClear1;
private System.Windows.Forms.TrackBar tckSpeed;
private System.Windows.Forms.Label lblSpeed;
private System.Windows.Forms.Label lblEpsonError;
......@@ -1523,5 +1391,7 @@
private System.Windows.Forms.DataGridViewLinkColumn Column_Del;
private System.Windows.Forms.DataGridViewImageColumn Column_Up;
private System.Windows.Forms.DataGridViewImageColumn Column_Down;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox cmbAoiFile;
}
}
\ No newline at end of file
......@@ -54,24 +54,21 @@ namespace URSoldering.Client
StepValue = 0.5;
tckSpeed.Value = 3;
isFinishLoad = false;
cmbOrgType.SelectedIndex = 0;
//cmbOrgType.SelectedIndex = 0;
//LoadProgram();
if (isNew == false)
{
LoadBoardInfo();
LoadBoardInfo();
}
else
{
this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
//this.txtOriginX.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_X);
//this.txtOriginY.Text = ConfigAppSettings.GetValue(Setting_Init.BOARD_ORIGIN_Y);
}
loadPictureBoxSize();
LOGGER.Info("load image " + picBoard.Name);
txtBoardName.Focus();
//此界面打开时,不能打开自动焊接
LoadCom();
if (WeldRobotBean.ISRun)
{
LogUtil.error("进入焊接界面,发现WeldRobotBean自动运行中,关闭自动运行");
......@@ -119,7 +116,50 @@ namespace URSoldering.Client
isFinishLoad = true;
}
List<string> FileList = new List<string>();
private void LoadCom()
{
try
{
cmbAoiFile.Items.Clear();
FileList = new List<string>();
string filePath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string path = Path.GetDirectoryName(filePath);
string suffix = Path.GetExtension(filePath);
string[] files = Directory.GetFiles(path);
foreach (string f in files)
{
if (Path.GetExtension(f).Equals(suffix))
{
string fileName = Path.GetFileName(f);
FileList.Add(fileName);
cmbAoiFile.Items.Add(fileName);
}
}
if (updateBoardInfo==null)
{
if (FileList.Count > 0)
{
cmbAoiFile.SelectedIndex = 0;
}
}
else
{
//判断索引
int index = FileList.IndexOf(updateBoardInfo.AoiFileName);
if (index >= 0)
{
cmbAoiFile.SelectedIndex = index;
}
}
}
catch (Exception ex)
{
LogUtil.error("加载出错:" + ex.ToString());
}
}
private void UpdateRobotPosition()
{
URPointValue point = URRobotControl.GetLastPosition();
......@@ -166,13 +206,12 @@ namespace URSoldering.Client
txtCode.Text = updateBoardInfo.WareCode;
txtBoardLength.Text = updateBoardInfo.boardLength.ToString();
txtBoardWidth.Text = updateBoardInfo.boardWidth.ToString();
txtOriginX.Text = updateBoardInfo.originX.ToString();
txtOriginY.Text = updateBoardInfo.originY.ToString();
//txtRobotZHighValue.Text = updateBoardInfo.ZHighValue.ToString();
if (updateBoardInfo.orgType >= 1 && updateBoardInfo.orgType <= 4)
{
cmbOrgType.SelectedIndex = updateBoardInfo.orgType - 1;
}
//txtOriginX.Text = updateBoardInfo.originX.ToString();
//txtOriginY.Text = updateBoardInfo.originY.ToString();
//if (updateBoardInfo.orgType >= 1 && updateBoardInfo.orgType <= 4)
//{
// cmbOrgType.SelectedIndex = updateBoardInfo.orgType - 1;
//}
picBoard.Image = updateBoardInfo.GetImage();
picBoard.Tag = false;
foreach (WeldPointInfo point in updateBoardInfo.pointList)
......@@ -456,31 +495,38 @@ namespace URSoldering.Client
board.boardName = FormUtil.getValue(txtBoardName);
board.boardLength = FormUtil.GetIntValue(txtBoardLength);
board.boardWidth = FormUtil.GetIntValue(txtBoardWidth);
board.originX = FormUtil.getDoubleValue(txtOriginX);
board.originY = FormUtil.getDoubleValue(txtOriginY);
//board.originX = FormUtil.getDoubleValue(txtOriginX);
//board.originY = FormUtil.getDoubleValue(txtOriginY);
//board.boardCode = FormUtil.getValue(txtWareCode);
//board.ZHighValue = FormUtil.getDoubleValue(txtRobotZHighValue);
board.WareCode = FormUtil.getValue(txtCode);
board.AoiFileName = cmbAoiFile.Text;
if (board.boardName.Equals(""))
{
MessageBox.Show("请输入程序名称");
txtBoardName.Focus();
return;
}
if (board.WareCode.Equals(""))
//if (board.WareCode.Equals(""))
//{
// MessageBox.Show("请输入程序条码");
// txtCode.Focus();
// return;
//}
if (board.AoiFileName.Equals(""))
{
MessageBox.Show("请输入程序条码");
txtCode.Focus();
MessageBox.Show("请选择AOI检测程序");
cmbAoiFile.Focus();
return;
}
if (cmbOrgType.SelectedIndex < 0)
{
MessageBox.Show("请选择固定点位置!");
cmbOrgType.Focus();
return;
}
board.orgType = cmbOrgType.SelectedIndex + 1;
//if (cmbOrgType.SelectedIndex < 0)
//{
// MessageBox.Show("请选择固定点位置!");
// cmbOrgType.Focus();
// return;
//}
//board.orgType = cmbOrgType.SelectedIndex + 1;
//验证名字是否重复
foreach (BoardInfo obj in BoardManager.boardList)
{
......@@ -494,19 +540,19 @@ namespace URSoldering.Client
return;
}
}
//验证条码是否重复
foreach (BoardInfo obj in BoardManager.boardList)
{
if (obj.boardId.Equals(board.boardId))
{
continue;
}
else if (obj.WareCode.Equals(board.WareCode))
{
MessageBox.Show("程序条码【" + board.WareCode + "】已存在,请重新输入条码!");
return;
}
}
////验证条码是否重复
//foreach (BoardInfo obj in BoardManager.boardList)
//{
// if (obj.boardId.Equals(board.boardId))
// {
// continue;
// }
// else if (obj.WareCode.Equals(board.WareCode))
// {
// MessageBox.Show("程序条码【" + board.WareCode + "】已存在,请重新输入条码!");
// return;
// }
//}
if (board.boardLength <= 0)
{
MessageBox.Show("请输入长度");
......@@ -521,9 +567,6 @@ namespace URSoldering.Client
}
if (picBoard.Image == null)
{
//MessageBox.Show("请添加程序图片");
//this.btnOpenFile.Focus();
//return;
}
else
{
......@@ -554,7 +597,7 @@ namespace URSoldering.Client
}
catch (Exception ex)
{
LogUtil.error("更新程序名时更改图片出错:"+ex.ToString());
LogUtil.error("更新程序名时更改图片出错:" + ex.ToString());
}
}
}
......@@ -720,23 +763,7 @@ namespace URSoldering.Client
{
this.Close();
}
}
private void btnSetOrigin_Click(object sender, EventArgs e)
{
saveOriginInfo();
}
private void saveOriginInfo()
{
this.txtOriginX.Text = txtRobotX.Text;
this.txtOriginY.Text = txtRobotY.Text;
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_X, txtOriginX.Text);
ConfigAppSettings.SaveValue(Setting_Init.BOARD_ORIGIN_Y, txtOriginY.Text);
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
}
/// <summary>
/// 打开文件夹,选取图片
/// </summary>
......@@ -744,10 +771,12 @@ namespace URSoldering.Client
/// <param name="e"></param>
private void btnOpenFile_Click(object sender, EventArgs e)
{
string filePath = Application.StartupPath + ConfigAppSettings.GetValue(Setting_Init.BOARD_IMAGE_PATH);
openFileDialog1.DefaultExt = "jpg|gif|bmp|png|jpeg";
openFileDialog1.InitialDirectory = filePath;
openFileDialog1.Filter = "jpg文件|*.jpg|gif文件|*.gif|bmp文件|*.bmp|png文件|*png|jpeg文件|*.jpeg";
string directory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//桌面路径
openFileDialog1.InitialDirectory = directory;
//string directory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);//桌面路径
//openFileDialog1.InitialDirectory = directory;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
openFileDialog1.Tag = true;
......@@ -766,7 +795,7 @@ namespace URSoldering.Client
picBoard.SizeMode = PictureBoxSizeMode.StretchImage;
int width = 0;
int height = 0;
int orgType = cmbOrgType.SelectedIndex + 1;
//int orgType = cmbOrgType.SelectedIndex + 1;
List<WeldPointInfo> pointList = allPointInfo();
if (this.txtBoardWidth.Text.Trim() != "" && this.txtBoardLength.Text.Trim() != "")
{
......@@ -801,41 +830,41 @@ namespace URSoldering.Client
Graphics g = (picBoard).CreateGraphics();
//g.Clear(Color.White);
picBoard.Refresh();
double orgX = FormUtil.getDoubleValue(txtOriginX);
double orgY = FormUtil.getDoubleValue(txtOriginY);
if (orgType == 1)
{
orgX = FormUtil.getDoubleValue(txtOriginX);
orgY = FormUtil.getDoubleValue(txtOriginY);
}
else if (orgType == 2)
{
orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
orgY = FormUtil.getDoubleValue(txtOriginY);
}
else if (orgType == 3)
{
orgX = FormUtil.getDoubleValue(txtOriginX);
orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
}
else
{
orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
}
imageXiShu = (float)picBoard.Width / (float)height;
//double orgX = FormUtil.getDoubleValue(txtOriginX);
//double orgY = FormUtil.getDoubleValue(txtOriginY);
//if (orgType == 1)
//{
// orgX = FormUtil.getDoubleValue(txtOriginX);
// orgY = FormUtil.getDoubleValue(txtOriginY);
//}
//else if (orgType == 2)
//{
// orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
// orgY = FormUtil.getDoubleValue(txtOriginY);
//}
//else if (orgType == 3)
//{
// orgX = FormUtil.getDoubleValue(txtOriginX);
// orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
//}
//else
//{
// orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
// orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
//}
//imageXiShu = (float)picBoard.Width / (float)height;
Graphics grfx = picBoard.CreateGraphics();
//float preX = 0;
//float preY = 0;
int index = 0;
foreach (WeldPointInfo weld in pointList)
{
float x = (float)Math.Abs(weld.RobotX - orgX) * imageXiShu;
float y = (float)Math.Abs(weld.RoobtY - orgY) * imageXiShu;
//Graphics grfx = picBoard.CreateGraphics();
////float preX = 0;
////float preY = 0;
//int index = 0;
//foreach (WeldPointInfo weld in pointList)
//{
// float x = (float)Math.Abs(weld.RobotX - orgX) * imageXiShu;
// float y = (float)Math.Abs(weld.RoobtY - orgY) * imageXiShu;
LogUtil.debug("显示焊点:X【" + x + "】Y【" + y + "】,坐标X【" + weld.RobotX + "】坐标Y【" + weld.RoobtY + "】");
g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
// LogUtil.debug("显示焊点:X【" + x + "】Y【" + y + "】,坐标X【" + weld.RobotX + "】坐标Y【" + weld.RoobtY + "】");
// g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
//if (index > 0)
//{
// Pen p = new Pen(Color.Red, 2);
......@@ -854,17 +883,17 @@ namespace URSoldering.Client
//}
//preX = x;
//preY = y;
index++;
}
//index++;
//}
grfx.SmoothingMode = SmoothingMode.HighQuality;
//grfx.SmoothingMode = SmoothingMode.HighQuality;
//g.DrawString("A ", new Font("Arial ", 10, FontStyle.Bold), Brushes.White, 3, 3);
//g.DrawString("B ", new Font("Arial ", 10, FontStyle.Bold), Brushes.White, 3, picBoard.Height - 20);
//g.DrawString("C ", new Font("Arial ", 10, FontStyle.Bold), Brushes.White, picBoard.Width - 18, 0);
//g.DrawString("D ", new Font("Arial ", 10, FontStyle.Bold), Brushes.White, picBoard.Width - 18, picBoard.Height - 20);
grfx.Dispose();
g.Dispose();
//grfx.Dispose();
//g.Dispose();
}
......@@ -956,14 +985,7 @@ namespace URSoldering.Client
panPoint.Visible = false;
this.dgvList.Visible = true;
}
private void cmbOrgType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbOrgType.SelectedIndex >= 0)
{
loadPictureBoxSize();
}
}
private void btnGoHome_Click(object sender, EventArgs e)
{
......@@ -988,9 +1010,7 @@ namespace URSoldering.Client
{
MessageBox.Show("保存失败,原点Z坐标(" + point.Z + ")不能高于最高Z点(" + URRobotControl.Robot_LIM_Z + ")");
return;
}
}
DialogResult result = MessageBox.Show("是否将当前位置" +point.ToShowStr() + "保存为原点?", "提示", MessageBoxButtons.YesNo);
if (result.Equals(DialogResult.Yes))
{
......@@ -998,36 +1018,7 @@ namespace URSoldering.Client
MessageBox.Show("保存原点成功!");
}
}
private void GetPicPoint(out double x, out double y)
{
double orgX = FormUtil.getDoubleValue(txtOriginX);
double orgY = FormUtil.getDoubleValue(txtOriginY);
int orgType = cmbOrgType.SelectedIndex + 1;
if (orgType == 1)
{
orgX = FormUtil.getDoubleValue(txtOriginX);
orgY = FormUtil.getDoubleValue(txtOriginY);
}
else if (orgType == 2)
{
orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
orgY = FormUtil.getDoubleValue(txtOriginY);
}
else if (orgType == 3)
{
orgX = FormUtil.getDoubleValue(txtOriginX);
orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
}
else
{
orgX = FormUtil.getDoubleValue(txtOriginX) + FormUtil.GetIntValue(txtBoardLength);
orgY = FormUtil.getDoubleValue(txtOriginY) - FormUtil.GetIntValue(txtBoardWidth);
}
x = m_MouseDownPoint.X / imageXiShu + orgX;
y = m_MouseDownPoint.Y / imageXiShu + orgY;
x = Math.Round(x, 3, MidpointRounding.AwayFromZero);
y = Math.Round(y, 3, MidpointRounding.AwayFromZero);
}
private void 保存焊点ToolStripMenuItem_Click(object sender, EventArgs e)
{
//if (m_MouseDownPoint == null || m_MouseDownPoint.X == 0 || m_MouseDownPoint.Y == 0)
......
......@@ -126,7 +126,137 @@
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>510, 17</value>
</metadata>
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>611, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="dataGridViewImageColumn1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<data name="dataGridViewImageColumn2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="Column_pointNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_X.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Y.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RZ.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperatureMax.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperatureMin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperatureMax.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperatureMin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_startSendWireSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_startSendWireTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_sendWireSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_sendWireTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_pointType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_isClear.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_ClearTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_getPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_MoveTest.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_btnDetail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Up.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Column_Up.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<metadata name="Column_Down.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Column_Down.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<data name="picRight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAIAAABMXPacAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
......@@ -356,136 +486,6 @@
2cgk09gaG1zYG35y8j/0HHGrAC9VdAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>611, 17</value>
</metadata>
<data name="dataGridViewImageColumn1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<data name="dataGridViewImageColumn2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="Column_pointNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_X.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Y.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Z.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_RZ.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperatureMax.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTemperatureMin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_preheatTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperature.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperatureMax.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTemperatureMin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_weldTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_startSendWireSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_startSendWireTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_sendWireSpeed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_sendWireTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_pointType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_isClear.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_ClearTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_getPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_MoveTest.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_btnDetail.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Up.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Column_Up.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAANRJREFUSEvtk8ENhSAMQBnAgHplD/c/w8UN1Dkg4adESJWKlsM/8ZIm0FIekCDC
n+iiZtgia20MLizRvu9BCBEDxhw+i7CkRfZJdBxHIUkBtS+8irZty5tqrckxrHmjKsLPNc9zzKU5ME1T
nr8946MIS5RSZ/YqAqCWcjUZKcISODUm5THjOOb8k6wQGWNyE75JItXuSClzDfa4U3TAZ4TF0EjxJAKG
YYg16kOTHeu6Bu/9ObtSEznnYi8F3VGhJqrRRV2UYXcsyxKDC/9ojXRRIyH8ACKfopRlVag2AAAAAElF
TkSuQmCC
</value>
</data>
<metadata name="Column_Down.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Column_Down.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAONJREFUSEvtk00OhCAMRlkb49/We3j/tS70BuI1TAwzH8FOVQTrYla8pIkttg9I
UOZPJNFrxKKu62xIEYuUUjakJFESEd6OcRzNuq4uOxISbdtmpmly2ZFLR9/3dlCWZa5yJCQqy9KuYcaZ
S8cwDDQsz3NX/XEnqqqK1jDjjHdrWmtqwi45e51T1zXV0evDfwdfuKwoCle9ivhJ7iTgVgS4DLsGew6a
pqE8JAFBEZjnmYa1bev9xj8xoiKwLAsNPQfWnvBIBPg17hG7Ls5jEeAyiQSIRABvxPdOYohFb0milxjz
AeLDoohrNFdzAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>103</value>
</metadata>
......
......@@ -197,16 +197,15 @@ namespace URSoldering.Client
picBoard.Image = board.GetImage();
picBoard.Refresh();
int orgType = board.orgType;
double orgX = board.getImageOrgX();
double orgY = board.getImageOrgY();
Graphics grfx = picBoard.CreateGraphics();
//int orgType = board.orgType;
//double orgX = board.getImageOrgX();
//double orgY = board.getImageOrgY();
//Graphics grfx = picBoard.CreateGraphics();
//float preX = 0;
//float preY = 0;
int index = 0;
foreach (WeldPointInfo weld in pointList)
{
//int index = 0;
//foreach (WeldPointInfo weld in pointList)
//{
//float x = (float)Math.Abs(weld.PositionX - orgX) * picBoard.Width / width - pointHight / 2;
//float y = (float)Math.Abs(weld.PositionY - orgY) * picBoard.Width / width - pointHight / 2;
//g.FillEllipse(Brushes.Red, x - pointHight / 2, y - pointHight / 2, pointHight, pointHight);
......@@ -225,11 +224,11 @@ namespace URSoldering.Client
//}
//preX = x;
//preY = y;
index++;
//index++;
//g.FillEllipse(Brushes.Red, x, y, pointHight, pointHight);
}
//}
g.Dispose();
//g.Dispose();
}
private void FrmBoardList_Shown(object sender, EventArgs e)
......
......@@ -49,11 +49,10 @@ namespace URSoldering.Client
}
private void btnCodeTest_Click(object sender, EventArgs e)
{
//FrmAOISetting frm = new FrmAOISetting(this);
//this.Visible = false;
//frm.Show();
{
FrmAOISetting frm = new FrmAOISetting(this);
this.Visible = false;
frm.Show();
}
private void btnCamera_Click(object sender, EventArgs e)
......
......@@ -65,7 +65,37 @@ namespace URSoldering.Client
Robot.IsAutoRun = chbXunHuan.Checked;
LoadAOI();
}
private bool IsLoad = false;
private void LoadAOI()
{
if (IsLoad)
{
return;
}
//位置配置到文件中
string appPath = Application.StartupPath;
string strFilePathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
string path2 = Path.GetDirectoryName(appPath + strFilePathName);
string filePath = path2 + @"\" + BoardManager.CurrBoard.AoiFileName;
if (File.Exists(filePath))
{
try
{
axCKVisionCtrl1.LoadConfigure(filePath);
axCKVisionCtrl1.ZoomView(2);
LogUtil.error("成功加载程序:" + BoardManager.CurrBoard.AoiFileName);
IsLoad = true;
}
catch (Exception ex)
{
LogUtil.error("加载程序【" + BoardManager.CurrBoard.AoiFileName + "】出错:" + ex.ToString());
}
}
else
{
LogUtil.error("未找到AOI程序文件:" + BoardManager.CurrBoard.AoiFileName);
}
}
private int ShowPointIndex = 5;
private void LoadCountPoint(bool isToday)
{
......@@ -158,52 +188,10 @@ namespace URSoldering.Client
weldCount = list[0].WeldCount;
solderCount = list[0].WeldPointCount;
}
}
}
chartLine.Series[0].Points[ShowPointIndex - 1].SetValueY(weldCount);
chartSolder.Series[0].Points[ShowPointIndex - 1].SetValueY(solderCount);
}
private string aoiCheckFile = "";
private string currAOIFile = "";
private void LoadAOI()
{
//位置配置到文件中
string appPath = Application.StartupPath;
string strFilePathName = ConfigAppSettings.GetValue(Setting_Init.AOIFileConfig);
aoiCheckFile = appPath + strFilePathName;
LoadAOIFile(aoiCheckFile);
}
private bool LoadAOIFile(string filePath)
{
if (currAOIFile.Equals(filePath))
{
return true ;
}
if (File.Exists(filePath))
{
this.axCKVisionCtrl1.UnloadConfigure();
Thread.Sleep(100);
try
{
currAOIFile = filePath;
this.axCKVisionCtrl1.LoadConfigure(filePath);
this.axCKVisionCtrl1.ZoomView(2);
LogUtil.info("成功加载程序:" + filePath);
return true;
}
catch (Exception ex)
{
LogUtil.error("加载程序【" + filePath + "】出错:" + ex.ToString());
}
}
else
{
LogUtil.error("未找到AOI程序文件:" + filePath);
}return false;
}
}
private void LoadListPoint()
{
......@@ -617,98 +605,12 @@ namespace URSoldering.Client
{
WeldRobotBean.StopWeld();
}
}
private void GetCode()
{
//try
//{
// this.label1.Text = "视觉/扫码";
// lblCodeResult.Text = "焊点自动识别中。。。";
// lblCodeResult.ForeColor = Color.Blue;
// lblCodeResult.Visible = true;
// LoadAOIFile(aoiCheckFile);
// //lblAOIResult.Visible = false;
// for (int i = 0; i < 5; i++)
// {
// bool result = RunAOI(2);
// //if (result)
// //{
// string code = getResult("Code",101);
// if (!code.Equals(""))
// {
// Robot.WareCode = code;
// lblCodeResult.ForeColor = Color.Blue;
// lblCodeResult.Text = "识别成功,共找到【" + BoardManager.CurrBoard.pointList.Count + "】个焊点";
// LogUtil.info("扫码成功:" + code);
// lblCodeResult.Visible = true;
// UpdateBoard(code);
// break;
// }
// else
// {
// lblCodeResult.ForeColor = Color.Red;
// lblCodeResult.Text = "焊点识别失败,即将重新识别";
// LogUtil.info("扫码失败,即将重新扫码");
// lblCodeResult.Visible = true;
// }
// //}
// Thread.Sleep(500);
// }
// lblCodeResult.ForeColor = Color.Blue;
// lblCodeResult.Text = "识别成功,共找到【" + BoardManager.CurrBoard.pointList.Count + "】个焊点";
// lblCodeResult.Visible = true;
// if (lblCodeResult.Visible.Equals(false))
// {
// lblCodeResult.ForeColor = Color.Blue;
// //lblCodeResult.Text = "扫码成功:1000001" ;
// LogUtil.info("扫码成功:1000001");
// }
//}
//catch (Exception ex)
//{
// LogUtil.error("读取条码出错:" + ex.ToString());
//}
}
private void UpdateBoard(string code)
{
//string[] str = code.Split('@');
//if (str.Length >= 1)
//{
// string boardCode = str[0];
// if (BoardManager.CurrBoard.WareCode.Equals(boardCode))
// {
// return;
// }
// else
// {
// BoardInfo board = BoardManager.getBoardByCode(boardCode);
// if (board == null)
// {
// LogUtil.error("条码【"+code+"】未找到匹配的程序,使用之前的程序【"+BoardManager.CurrBoard.boardName+"】");
// }
// else
// {
// LogUtil.error("条码【" + code + "】切换新程序【" + board.boardName + "】");
// BoardManager.UpdateCurrBoard(board.boardId);
// LoadPoint(board, -3);
// }
// }
//}
}
}
private void AOICheck()
{
try
{
this.label1.Text = "视觉/光学检测";
LoadAOIFile(aoiCheckFile);
this.label1.Text = "视觉/光学检测";
lblCodeResult.Visible = false;
RunAOI(1);
int result = CKResult("Result",10);
......@@ -785,30 +687,7 @@ namespace URSoldering.Client
{
return 0;
}
}
//private string getResult(string name,int DataId)
//{
// string result = "";
// try
// {
// int idTool = axCKVisionCtrl1.GetTool(name);
// string value = "";
// object objValue = new VariantWrapper(value);
// if (axCKVisionCtrl1.GetValue(idTool, DataId, 0, ref objValue) == true)
// {
// result = objValue.ToString();
// }
// LogUtil.info("获取【" + name + "】:" + result);
// }
// catch (Exception ex)
// {
// LogUtil.error("获取【" + name + "】出错:" + ex.ToString());
// }
// return result;
//}
}
private void btnLook_Click(object sender, EventArgs e)
{
FrmWorkCount frm = new FrmWorkCount();
......
......@@ -73,6 +73,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FrmAOISetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAOISetting.designer.cs">
<DependentUpon>FrmAOISetting.cs</DependentUpon>
</Compile>
<Compile Include="FrmBase.cs">
<SubType>Form</SubType>
</Compile>
......@@ -109,12 +115,6 @@
<Compile Include="FrmProgramSelect.Designer.cs">
<DependentUpon>FrmProgramSelect.cs</DependentUpon>
</Compile>
<Compile Include="FrmCodeLearn.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmCodeLearn.Designer.cs">
<DependentUpon>FrmCodeLearn.cs</DependentUpon>
</Compile>
<Compile Include="FrmCamera.cs">
<SubType>Form</SubType>
</Compile>
......@@ -183,6 +183,9 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmAOISetting.resx">
<DependentUpon>FrmAOISetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource>
......@@ -201,9 +204,6 @@
<EmbeddedResource Include="FrmProgramSelect.resx">
<DependentUpon>FrmProgramSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmCodeLearn.resx">
<DependentUpon>FrmCodeLearn.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmCamera.resx">
<DependentUpon>FrmCamera.cs</DependentUpon>
</EmbeddedResource>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!