FrmHardPara.cs 1.3 KB
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);

        }

        
    }
}