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.

46 lines
1.1 KiB

1 year ago
  1. using CircleSDK.Model;
  2. using Newtonsoft.Json;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Reflection;
  8. using System.Threading;
  9. using System.Threading.Tasks;
  10. using CircleViewer.Dialogs;
  11. using CDPShared;
  12. namespace CircleViewer
  13. {
  14. public class DetailsCmd
  15. {
  16. private CDPWorker _cdp;
  17. string customerCode = "CIRCLE";
  18. string appKey = "Dashboard";
  19. string endUserId = "userman";
  20. string secret = "2FDA4588-774B-4FA6-8B3D-6F08F5FA6E90";
  21. public DetailsCmd()
  22. {
  23. _cdp = new CDPWorker();
  24. while (!_cdp.Ready)
  25. {
  26. Thread.Sleep(250);
  27. }
  28. }
  29. public void Display(string fileName)
  30. {
  31. using (LogMethod.Log(MethodBase.GetCurrentMethod().ReflectedType.Name + MethodBase.GetCurrentMethod().Name))
  32. {
  33. string ext = Path.GetExtension(fileName).ToLower();
  34. if (ext != ".cir")
  35. return;
  36. FilePropertiesDlg dlg = new FilePropertiesDlg(_cdp, fileName);
  37. dlg.ShowDialog();
  38. }
  39. }
  40. }
  41. }