终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

31 line
948 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPA.Helper;
  7. using System.Collections.ObjectModel;
  8. namespace WPFDemo.Bb
  9. {
  10. public class ViewModel : NotifyBase
  11. {
  12. public ViewModel()
  13. {
  14. for (int i = 0; i < 30; i++)
  15. {
  16. class1s.Add(new Class1()
  17. {
  18. data1 = new Random().Next(1000, 2000),
  19. data2 = (byte)new Random().Next(0, 240),
  20. data3 = Convert.ToBoolean(new Random().Next(0, 1)),
  21. data4 = new Random().Next(3000, 4000).ToString(),
  22. data5 = (float)new Random().NextDouble() * 100,
  23. data6 = (ushort)new Random().Next(5000, 6000)
  24. });
  25. }
  26. }
  27. public ObservableCollection<Class1> class1s { get; set; } = new ObservableCollection<Class1>();
  28. }
  29. }