|
|
@ -74,19 +74,11 @@ namespace RfidWeb.Frm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.Invoke(() =>
|
|
|
|
this.Invoke(() =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
int currentFirstVisibleRowIndex = dataGridView1.FirstDisplayedScrollingRowIndex;
|
|
|
|
|
|
|
|
this.dataGridView1.DataSource = lsList;
|
|
|
|
|
|
|
|
if (currentFirstVisibleRowIndex > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int currentFirstVisibleRowIndex = dataGridView1.FirstDisplayedScrollingRowIndex;
|
|
|
|
dataGridView1.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
|
|
|
|
this.dataGridView1.DataSource = lsList;
|
|
|
|
|
|
|
|
if (currentFirstVisibleRowIndex >= 0 && currentFirstVisibleRowIndex < dataGridView1.Rows.Count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dataGridView1.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Console.WriteLine(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -107,18 +99,11 @@ namespace RfidWeb.Frm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.Invoke(() =>
|
|
|
|
this.Invoke(() =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
int currentFirstVisibleRowIndex = dataGridView2.FirstDisplayedScrollingRowIndex;
|
|
|
|
{
|
|
|
|
this.dataGridView2.DataSource = lsList;
|
|
|
|
int currentFirstVisibleRowIndex = dataGridView2.FirstDisplayedScrollingRowIndex;
|
|
|
|
if (currentFirstVisibleRowIndex > 0)
|
|
|
|
this.dataGridView2.DataSource = lsList;
|
|
|
|
|
|
|
|
if (currentFirstVisibleRowIndex >= 0 && currentFirstVisibleRowIndex < dataGridView2.Rows.Count)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dataGridView2.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Console.WriteLine(e.Message);
|
|
|
|
dataGridView2.FirstDisplayedScrollingRowIndex = currentFirstVisibleRowIndex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|