Rgv.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. namespace WCS_Client.From.From_Montior
  11. {
  12. public partial class Rgv : UserControl
  13. {
  14. public Rgv()
  15. {
  16. InitializeComponent();
  17. }
  18. private void myTableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
  19. {
  20. Color cl = Color.Yellow;
  21. if (e.Column == 0 && e.Row == 0)
  22. {
  23. float x = e.CellBounds.Location.X;
  24. float x2 = e.CellBounds.Right;
  25. float y = e.CellBounds.Location.Y;
  26. float y2 = e.CellBounds.Bottom;
  27. e.Graphics.DrawLine(new Pen(cl, 6), x, y, x2, y);
  28. e.Graphics.DrawLine(new Pen(cl, 6), x, y, x, y2);
  29. e.Graphics.DrawLine(new Pen(cl, 6), x2, y, x2, y2);
  30. }
  31. if(e.Column==0 && e.Row == 1)
  32. {
  33. float x = e.CellBounds.Location.X;
  34. float x2 = e.CellBounds.Right;
  35. float y = e.CellBounds.Location.Y;
  36. float y2 = e.CellBounds.Bottom;
  37. e.Graphics.DrawLine(new Pen(cl, 6), x, y, x, y2);
  38. e.Graphics.DrawLine(new Pen(cl, 6), x2, y, x2, y2);
  39. e.Graphics.DrawLine(new Pen(cl, 6), x, y2, x2, y2);//横线
  40. }
  41. }
  42. private void button2_Click(object sender, EventArgs e)
  43. {
  44. Form_EquInfo equinfo = new Form_EquInfo(Name, btn02.Name, btn02.Text);
  45. equinfo.Show();
  46. }
  47. private void button1_Click(object sender, EventArgs e)
  48. {
  49. Form_EquInfo equinfo = new Form_EquInfo(Name, btn01.Name,btn01.Text);
  50. equinfo.Show();
  51. }
  52. }
  53. }