终端一体化运控平台
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.
 
 
 

54 regels
1.3 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Collections.ObjectModel;
  7. using BPA.Helper;
  8. namespace BPASmartClient.CustomResource.Pages.Model
  9. {
  10. public class ReportHelper
  11. {
  12. public ObservableCollection<ReportBase> Reports { get; set; } = new ObservableCollection<ReportBase>();
  13. public void Add(ReportBase report)
  14. {
  15. Reports.Add(report);
  16. }
  17. public void Save(string name)
  18. {
  19. DataRecord record = new DataRecord();
  20. record.Save(Reports, name);
  21. }
  22. public void Dispos()
  23. {
  24. Reports.Clear();
  25. }
  26. public ObservableCollection<ReportBase> GetData(string path)
  27. {
  28. DataRecord record = new DataRecord();
  29. return record.Read<ObservableCollection<ReportBase>>(path);
  30. }
  31. }
  32. //public class ReportHelper
  33. //{
  34. // private volatile static ReportHelper _Instance;
  35. // public static ReportHelper GetInstance => _Instance ?? (_Instance = new ReportHelper());
  36. // private ReportHelper() { }
  37. // public object GetData(string path)
  38. // {
  39. // DataRecord record = new DataRecord();
  40. // return record.Read<object>(path);
  41. // }
  42. //}
  43. }