终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

63 wiersze
2.1 KiB

  1. using BPASmartClient.AGV.Feedback;
  2. using BPASmartClient.Helper;
  3. using BPASmartClient.Http;
  4. using BPASmartClient.HubHelper;
  5. using Newtonsoft.Json;
  6. namespace TestDemo
  7. {
  8. public partial class Form1 : Form
  9. {
  10. int count = 0;
  11. public Form1()
  12. {
  13. InitializeComponent();
  14. ActionManage.GetInstance.Register(new Action(() =>
  15. {
  16. label1.Text = (count++).ToString();
  17. }), "加数值");
  18. ActionManage.GetInstance.Register(new Action(() =>
  19. {
  20. Console.WriteLine("开始执行阻塞方法");
  21. Thread.Sleep(20000);
  22. Console.WriteLine("阻塞方法执行完成");
  23. }), "阻塞方法");
  24. }
  25. private void button1_Click(object sender, EventArgs e)
  26. {
  27. AGVToUpSystem aGVToUpSystem = new AGVToUpSystem();
  28. //string value = JsonConvert.SerializeObject(aGVToUpSystem);
  29. //string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/report?sign={value}";
  30. string url = "http://192.168.1.40:8089/apicallback/quicktron/robotjob/report";
  31. var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
  32. }
  33. private void button2_Click(object sender, EventArgs e)
  34. {
  35. Upstreamrequest aGVToUpSystem = new Upstreamrequest() { agvCode="123" };
  36. // string value = JsonConvert.SerializeObject(aGVToUpSystem);
  37. // string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/upstreamrequest?sign={value}";
  38. string url = $"http://192.168.1.40:8089/apicallback/quicktron/robotjob/upstreamrequest";
  39. var res = APIHelper.GetInstance.HttpRequest(url, "", aGVToUpSystem, RequestType.POST);
  40. }
  41. private void button3_Click(object sender, EventArgs e)
  42. {
  43. ActionManage.GetInstance.Send("加数值");
  44. }
  45. private void button4_Click(object sender, EventArgs e)
  46. {
  47. Task.Run(new Action(() =>
  48. {
  49. ActionManage.GetInstance.Send("阻塞方法");
  50. }));
  51. }
  52. }
  53. }