Conveyor_R.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_R : UserControl
  14. {
  15. public Conveyor_R()
  16. {
  17. InitializeComponent();
  18. }
  19. private void button1_MouseMove(object sender, MouseEventArgs e)
  20. {
  21. button1.BackColor = Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(144)))), ((int)(((byte)(154)))));
  22. }
  23. private void button1_MouseLeave(object sender, EventArgs e)
  24. {
  25. button1.BackColor = Color.Transparent;
  26. }
  27. private void button1_Click(object sender, EventArgs e)
  28. {
  29. if (Name.Contains("_"))
  30. {
  31. MessageBox.Show("该设备无数据。");
  32. return;
  33. }
  34. if (Name.Length > 3)
  35. {
  36. string equname = Name.Substring(3);
  37. FrmEquMsg_dtl Frm = new FrmEquMsg_dtl(equname);
  38. Frm.Show();
  39. }
  40. //int index = Name.LastIndexOf('_');
  41. //if (index > 0)
  42. //{
  43. // string equname = Name.Substring(index + 1);
  44. // Form_EquInfo equinfo = new Form_EquInfo(equname);
  45. // equinfo.Show();
  46. //}
  47. }
  48. }
  49. }