终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

35 行
985 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 BPA.Helper;
  8. using System.Collections.ObjectModel;
  9. using Microsoft.Toolkit.Mvvm.Input;
  10. namespace WPFDemo
  11. {
  12. public class Class1 : NotifyBase
  13. {
  14. public Class1()
  15. {
  16. AddCommand = new BPARelayCommand(() =>
  17. {
  18. dataTests.Add(new DataTest()
  19. {
  20. data1 = new Random().Next(0, 100),
  21. data2 = new Random().Next(200, 300),
  22. data3 = new Random().Next(400, 500).ToString(),
  23. data4 = Convert.ToBoolean(new Random().Next(0, 1)),
  24. data5 = new Random().Next(600, 700)
  25. });
  26. });
  27. }
  28. public ObservableCollection<DataTest> dataTests { get; set; } = new ObservableCollection<DataTest>();
  29. public BPARelayCommand AddCommand { get; set; }
  30. }
  31. }