a(this.ViewModel.WhenAnyValue(m => m.Datas).Subscribe(Datas =>
{
try
{
#region 法一
//new Thread(() =>
//{
// for (int i = 0; i < Datas.Rows.Count; i++)
// {
// Action c = new Action(Action2Test);
// Invoke(c, i);
// }
//}).Start();
#endregion
#region 法二
//for (int i = 0; i < Datas.Rows.Count; i++)
//{
// Action c = new Action(Action2Test);
// Invoke(c, i);
//}
#endregion
#region 法三
for (int i = 0; i < Datas.Rows.Count; i++)
{
this.Invoke(new Action(() =>
{
this.cbCableDataList.Properties.Items.Add(i);
}));
}
#endregion
}
catch (Exception ex)
{
throw;
}
}));