//private async void butLoadProp_Click(object sender, RoutedEventArgs e) private async void butLoadProp_Click(object sender, RoutedEventArgs e) { // Every time we come here, assume we're wiping the data table Globals.PropertyTable.Clear(); Globals.PropertyTable.Columns.Clear(); // Add the columns to the internal datatable Globals.PropertyTable.Columns.Add("ObjectID", typeof(int)); Globals.PropertyTable.Columns.Add("ObjectType", typeof(int)); Globals.PropertyTable.Columns.Add("ObjectOwner", typeof(int)); Globals.PropertyTable.Columns.Add("ObjectTimeStamp", typeof(int)); Globals.PropertyTable.Columns.Add("X", typeof(int)); Globals.PropertyTable.Columns.Add("Y", typeof(int)); Globals.PropertyTable.Columns.Add("Z", typeof(int)); Globals.PropertyTable.Columns.Add("Yaw", typeof(int)); Globals.PropertyTable.Columns.Add("Tilt", typeof(int)); Globals.PropertyTable.Columns.Add("Roll", typeof(int)); Globals.PropertyTable.Columns.Add("Model", typeof(string)); Globals.PropertyTable.Columns.Add("Desc", typeof(string)); Globals.PropertyTable.Columns.Add("Action", typeof(string)); Globals.PropertyTable.Columns.Add("Data", typeof(byte[])); // Diable the button until we're done butLoadProp.IsEnabled = false; _instance.Attributes.CellIterator = 0; _instance.Attributes.CellCombine = true; int cc = 0; while (true) { int gg = _instance.Attributes.CellIterator; if (gg == -1) { break; } cc++; Console.WriteLine("Starting cell_next iteration " + cc.ToString() + " and celliterator = " + gg.ToString()); await Task.Delay(200); AW.Result ret = _instance.CellNext(); } Console.WriteLine("Done with query! We queried " + cc.ToString() + " times on this run."); butLoadProp.IsEnabled = true; }