修改从左到右取料

master
lhiven 1 year ago
parent ee6de65be6
commit 4d15883447

@ -306,7 +306,7 @@
this.rsTray1.ShowText = true;
this.rsTray1.SinglePoint = false;
this.rsTray1.Size = new System.Drawing.Size(775, 242);
this.rsTray1.SortDir = Rs.Controls.ESortDir.RightToLeft;
this.rsTray1.SortDir = Rs.Controls.ESortDir.LeftToRight;
this.rsTray1.Status = null;
this.rsTray1.TabIndex = 0;
this.rsTray1.TopSpaceHeight = 20;

@ -98,16 +98,9 @@ namespace Rs.MotionPlat.Recipe
for (int j = 0; j < colNum; j++)
{
int tempIndex = (colNum + 1) - (index - (i * colNum)) + (i * colNum);
//int tempIndex = ((i+1) * 20) - (colNum - 1) - index;
//int tempIndex = index + colNum - 1;// (i + 1) * 10 - index + 1;
//double xBase = double.Parse(dt.Rows[0]["MarkX1"].ToString()) + double.Parse(dt.Rows[0]["Mark2CenterDistX"].ToString()) + (j * double.Parse(dt.Rows[0]["SlotOffsetDistX"].ToString()));
//double yBase = double.Parse(dt.Rows[0]["MarkY1"].ToString()) + double.Parse(dt.Rows[0]["Mark2CenterDistY"].ToString()) + (i * double.Parse(dt.Rows[0]["SlotOffsetDistY"].ToString()));
//double xRun = double.Parse(dt.Rows[0]["MarkX1"].ToString()) + double.Parse(dt.Rows[0]["Mark2CenterDistX"].ToString()) + (j * double.Parse(dt.Rows[0]["SlotOffsetDistX"].ToString()));
//double yRun = double.Parse(dt.Rows[0]["MarkY1"].ToString()) + double.Parse(dt.Rows[0]["Mark2CenterDistY"].ToString()) + (i * double.Parse(dt.Rows[0]["SlotOffsetDistY"].ToString()));
double xRun = double.Parse(txtMarkX1.Text) + (j * double.Parse(txtSlotOffsetDistX.Text))+GlobalVar.StockTrayOffsetX;
double yRun = double.Parse(txtMarkY1.Text) + (i * double.Parse(txtSlotOffsetDistY.Text))+GlobalVar.StockTrayOffsetY;
string insertRunSql = $"insert into TrayPoints(trayid,recipename,trayname,slotindex,x,y) values('{dt.Rows[0]["id"]}','{dt.Rows[0]["recipename"]}','{dt.Rows[0]["TrayName"]}',{tempIndex},{xRun},{yRun})";
string insertRunSql = $"insert into TrayPoints(trayid,recipename,trayname,slotindex,x,y) values('{dt.Rows[0]["id"]}','{dt.Rows[0]["recipename"]}','{dt.Rows[0]["TrayName"]}',{index},{xRun},{yRun})";
db.ExecuteNonQuery(insertRunSql);
index++;
}

Loading…
Cancel
Save