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

Form1.cs 2.1 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. }