优化RsTray从RightTopToBottom画盘

master
lhiven 7 months ago
parent 52a7bd18db
commit 31d84435ec

@ -413,15 +413,15 @@ namespace Rs.Controls
else if (sortDir == ESortDir.RightTopToBottom) else if (sortDir == ESortDir.RightTopToBottom)
{ {
//从列开始画 //从列开始画
for (int r = RowNum; r > 0; r--) for (int c = ColumnNum; c > 0; c--)
{ {
for (int c = 0; c < ColumnNum; c++) for (int r = 0; r < RowNum; r++)
{ {
index++; index++;
if (traySlotsDic.ContainsKey(index)) if (traySlotsDic.ContainsKey(index))
{ {
float x = slotWidth * r; float x = slotWidth * (c-1);
float y = slotHeight * c; float y = slotHeight * r;
traySlotsDic[index].Bound = new RectangleF(x, y, (int)slotWidth - ColSpace, (int)slotHeight - RowSpace); traySlotsDic[index].Bound = new RectangleF(x, y, (int)slotWidth - ColSpace, (int)slotHeight - RowSpace);
} }
} }

Loading…
Cancel
Save