FrmHardPara.cs
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Dal;
namespace App
{
public partial class FrmHardPara : App.FrmBase
{
Fuction fuction = new Fuction();
public FrmHardPara()
{
InitializeComponent();
this.SetLanguage(this);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rectangle = new Rectangle(3, 3, 50, 50);
Color fillColor = Color.White;
Point startPoint = new Point(53, 53);
Point endPoint = new Point(100, 100);
string text = "111";
Pen p = new Pen(Color.Black);
Font font = new Font("ź", 8.0F);
g.DrawLine(p, startPoint, endPoint);
SolidBrush brush = new SolidBrush(fillColor);
SolidBrush brush1 = new SolidBrush(Color.Black);
//rectangle = new Rectangle(endPoint.X - 5, endPoint.Y + 5, 10, 5);
g.FillRectangle(brush, rectangle);
text = (text == null) ? string.Empty : text;
g.DrawString(text, font, brush1, rectangle);
}
}
}