Conveyor7.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 Conveyor7 : UserControl
  14. {
  15. public Conveyor7()
  16. {
  17. InitializeComponent();
  18. }
  19. readonly Dictionary<Button, string> dic = new Dictionary<Button, string>();
  20. private void button1_MouseMove(object sender, MouseEventArgs e)
  21. {
  22. button1.BackColor = Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(144)))), ((int)(((byte)(154)))));
  23. if (Name.Contains("_")) { return; }
  24. dic.Clear();
  25. string equname = Name.Substring(3);
  26. dic.Add(button1, equname);
  27. MoveOverInfoTip.SettingMutiTipInfo(dic);
  28. }
  29. private void button1_MouseLeave(object sender, EventArgs e)
  30. {
  31. button1.BackColor = Color.Transparent;
  32. }
  33. private void button1_Click(object sender, EventArgs e)
  34. {
  35. int index = Name.LastIndexOf('_');
  36. if (index > 0)
  37. {
  38. string equname = Name.Substring(index + 1);
  39. Form_EquInfo equinfo = new Form_EquInfo(equname);
  40. equinfo.Show();
  41. }
  42. }
  43. }
  44. }