Conveyor.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using WCS_Client.Frm;
  11. namespace WCS_Client.From.From_Montior
  12. {
  13. public partial class Conveyor : UserControl
  14. {
  15. public Conveyor()
  16. {
  17. InitializeComponent();
  18. }
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. if (Name.Contains("_"))
  22. {
  23. MessageBox.Show("该设备无数据。");
  24. return;
  25. }
  26. if (Name.Length > 3)
  27. {
  28. string equname = Name.Substring(3);
  29. FrmEquMsg_dtl Frm = new FrmEquMsg_dtl(equname);
  30. Frm.Show();
  31. }
  32. //int index = Name.LastIndexOf('_');
  33. //if (index > 0)
  34. //{
  35. // string equname = Name.Substring(index+1);
  36. // Form_EquInfo equinfo = new Form_EquInfo(equname);
  37. // equinfo.Show();
  38. //}
  39. }
  40. }
  41. }