/* * method that returns the latest 50 records gathered from the fez board */ public void checkWatt() { List<LightDataSet> list = new List<LightDataSet>(); Random random = new Random(); for (int i = 0; i < 50; i++) { LightDataSet foo = new LightDataSet(); foo.watt = (random.Next(10) + random.Next(10)).ToString(); DateTime start = new DateTime(2012, 10, 15); int range = ((TimeSpan)(DateTime.Today - start)).Days; foo.time = start.AddDays(random.Next(range)); list.Add(foo); } lightLogList1.ItemsSource = list; }
/* * method that returns the latest 50 records gathered from the fez board */ public void checkWatt() { List <LightDataSet> list = new List <LightDataSet>(); Random random = new Random(); for (int i = 0; i < 50; i++) { LightDataSet foo = new LightDataSet(); foo.watt = (random.Next(10) + random.Next(10)).ToString(); DateTime start = new DateTime(2012, 10, 15); int range = ((TimeSpan)(DateTime.Today - start)).Days; foo.time = start.AddDays(random.Next(range)); list.Add(foo); } lightLogList1.ItemsSource = list; }