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

119 rivejä
4.0 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.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. using BPASmartClient.JakaRobot;
  16. using BPASmartClient.S7Net;
  17. namespace WpfApp1
  18. {
  19. /// <summary>
  20. /// Interaction logic for MainWindow.xaml
  21. /// </summary>
  22. public partial class MainWindow : Window
  23. {
  24. public MainWindow()
  25. {
  26. InitializeComponent();
  27. //SiemensHelper siemensHelper = new SiemensHelper();
  28. //siemensHelper.Connect(S7.Net.CpuType.S71200, "192.168.101.16");
  29. //if (siemensHelper.IsConnected)
  30. //{
  31. // siemensHelper.WriteString(S7.Net.DataType.DataBlock, 1, 0, "cccc");
  32. // var res = siemensHelper.ReadClass<XL_Start_DB>(1);
  33. // //XL_Start_DB xL_Start_DB = new XL_Start_DB();
  34. // //xL_Start_DB.RecipeCode = "编码";
  35. // //xL_Start_DB.RecipeName = "名称";
  36. // //xL_Start_DB.StockCode = 1;
  37. // //xL_Start_DB.TrayCode = 2;
  38. // //for (int i = 0; i < xL_Start_DB.Powder.Length; i++)
  39. // //{
  40. // // xL_Start_DB.Powder[i].Powder_Name = $"料{i}";
  41. // // xL_Start_DB.Powder[i].Powder_Weight = (float)(5.0 + i);
  42. // //}
  43. // //for (int i = 0; i < xL_Start_DB.Material.Length; i++)
  44. // //{
  45. // // xL_Start_DB.Material[i].Material_Name = $"原料{i}";
  46. // // xL_Start_DB.Material[i].Material_Weight = (float)(50.0 + i);
  47. // // xL_Start_DB.Material[i].Material_BarrelNum = (short)(i + 1);
  48. // //}
  49. // //xL_Start_DB.Order_Request_ACK = true;
  50. // //xL_Start_DB.Order_Request = true;
  51. // //for (int i = 0; i < xL_Start_DB.Standby.Length; i++)
  52. // //{
  53. // // xL_Start_DB.Standby[i] = (short)(i + 100);
  54. // // xL_Start_DB.Standby1[i] = (short)(i + 300);
  55. // //}
  56. // res.RecipeCode = "";
  57. // res.RecipeName = "";
  58. // res.StockCode = 0;
  59. // res.TrayCode = 0;
  60. // for (int i = 0; i < res.Powder.Length; i++)
  61. // {
  62. // res.Powder[i].Powder_Name = "";
  63. // res.Powder[i].Powder_Weight = 0;
  64. // }
  65. // for (int i = 0; i < res.Material.Length; i++)
  66. // {
  67. // res.Material[i].Material_Name = "";
  68. // res.Material[i].Material_Weight = 0;
  69. // res.Material[i].Material_BarrelNum = 0;
  70. // }
  71. // res.Order_Request_ACK = false;
  72. // res.Order_Request = false;
  73. // for (int i = 0; i < res.Standby.Length; i++)
  74. // {
  75. // res.Standby[i] = 0;
  76. // res.Standby1[i] = 0;
  77. // }
  78. // siemensHelper.WriteClass<XL_Start_DB>(res, 1);
  79. // var res1 = siemensHelper.ReadClass<XL_Start_DB>(1);
  80. //}
  81. }
  82. private void Button_Click(object sender, RoutedEventArgs e)
  83. {
  84. Speech.GetInstance.aa("请0001号客户到1号窗口取餐");
  85. //Task.Run(() =>
  86. //{
  87. // Speech.GetInstance.Speak($"请0001号客户到1号窗口取餐");
  88. //});
  89. //Speech.GetInstance.SpeechSpeak(new SpeechInfo()
  90. //{
  91. // Text = text.Text,
  92. // time = 10000
  93. //});
  94. }
  95. private void Button_Click_1(object sender, RoutedEventArgs e)
  96. {
  97. }
  98. private void Button_Click_2(object sender, RoutedEventArgs e)
  99. {
  100. }
  101. }
  102. }