123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WCS_Client.From.From_Montior
- {
- public partial class Rgv : UserControl
- {
- public Rgv()
- {
- InitializeComponent();
- }
- private void myTableLayoutPanel1_CellPaint(object sender, TableLayoutCellPaintEventArgs e)
- {
- Color cl = Color.Yellow;
- if (e.Column == 0 && e.Row == 0)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(cl, 6), x, y, x2, y);
- e.Graphics.DrawLine(new Pen(cl, 6), x, y, x, y2);
- e.Graphics.DrawLine(new Pen(cl, 6), x2, y, x2, y2);
- }
- if(e.Column==0 && e.Row == 1)
- {
- float x = e.CellBounds.Location.X;
- float x2 = e.CellBounds.Right;
- float y = e.CellBounds.Location.Y;
- float y2 = e.CellBounds.Bottom;
- e.Graphics.DrawLine(new Pen(cl, 6), x, y, x, y2);
- e.Graphics.DrawLine(new Pen(cl, 6), x2, y, x2, y2);
- e.Graphics.DrawLine(new Pen(cl, 6), x, y2, x2, y2);//横线
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Form_EquInfo equinfo = new Form_EquInfo(Name, btn02.Name, btn02.Text);
- equinfo.Show();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Form_EquInfo equinfo = new Form_EquInfo(Name, btn01.Name,btn01.Text);
- equinfo.Show();
- }
- }
- }
|