• 大小: 0.08M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-28
  • 语言: C#
  • 标签: 实例  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 绘制椭圆
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender EventArgs e)
        {
            ShowPic();
            ShowPic1();
            ShowPic2();
            ShowPic3();
        }

        private void ShowPic()
        {

            Bitmap bitM = new Bitmap(this.pictureBox1.Width this.pictureBox1.Height);
                Graphics g = Graphics.FromImage(bitM);
                g.Clear(Color.White);
                g.DrawEllipse(new Pen(Color.Blue) 10 10 100 60);
                this.pictureBox1.BackgroundImage = bitM;
        }
        private void ShowPic1()
        {
            
            Bitmap bitM = new Bitmap(this.pictureBox2.Width this.pictureBox2.Height);
            Graphics g = Graphics.FromImage(bitM);
            g.Clear(Color.White);
            g.DrawEllipse(new Pen(Color.Blue) 30 10 70 70);
            this.pictureBox2.BackgroundImage = bitM;
        }

        private void ShowPic2()
        {
            
            Bitmap bitM = new Bitmap(this.pictureBox3.Width this.pictureBox3.Height);
            Graphics g = Graphics.FromImage(bitM);
            g.Clear(Color.White);
            g.DrawArc(new Pen(Color.Blue) 10 20 100 50 30 180);
            this.pictureBox3.BackgroundImage = bitM;
        }

        private void ShowPic3()
        {
         
            Bitmap bitM = new Bitmap(this.pictureBox4.Width this.pictureBox4.Height);
            Graphics g = Graphics.FromImage(bitM);
            g.Clear(Color.White);
            g.FillPie(new SolidBrush(Color.Red)10 20 100 50 90 270);
            g.FillPie(new SolidBrush(Color.Yellow) 10 20 100 50 90+270 90);
            this.pictureBox4.BackgroundImage = bitM;
        }

    
      
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-10-24 11:00  绘制椭圆\
     目录           0  2020-10-24 11:00  绘制椭圆\Backup\
     目录           0  2020-10-24 11:00  绘制椭圆\Backup\绘制椭圆\
     文件         926  2009-02-16 08:33  绘制椭圆\Backup\绘制椭圆.sln
     文件       16384  2009-02-23 08:42  绘制椭圆\Backup\绘制椭圆.v11.suo
     文件        2119  2009-02-16 08:34  绘制椭圆\Backup\绘制椭圆\Form1.cs
     文件        4941  2009-02-16 08:34  绘制椭圆\Backup\绘制椭圆\Form1.designer.cs
     文件        5814  2009-02-16 08:33  绘制椭圆\Backup\绘制椭圆\Form1.resx
     文件         493  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Program.cs
     目录           0  2020-10-24 11:00  绘制椭圆\Backup\绘制椭圆\Properties\
     文件        1356  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Properties\AssemblyInfo.cs
     文件        2874  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Properties\Resources.Designer.cs
     文件        5612  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Properties\Resources.resx
     文件        1097  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Properties\Settings.Designer.cs
     文件         249  2009-02-16 08:32  绘制椭圆\Backup\绘制椭圆\Properties\Settings.settings
     文件        3770  2009-02-16 08:34  绘制椭圆\Backup\绘制椭圆\绘制椭圆.csproj
     文件       25906  2020-10-24 11:00  绘制椭圆\UpgradeLog.htm
     文件        6744  2020-10-24 11:00  绘制椭圆\UpgradeLog.xml
     目录           0  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\
     文件        2229  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\UpgradeReport.css
     文件       22214  2012-07-26 20:25  绘制椭圆\_UpgradeReport_Files\UpgradeReport.xslt
     文件         397  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\UpgradeReport_Error.png
     文件         338  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\UpgradeReport_Information.png
     文件         381  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\UpgradeReport_Success.png
     文件         292  2020-10-24 11:00  绘制椭圆\_UpgradeReport_Files\UpgradeReport_Warning.png
     目录           0  2019-02-08 12:36  绘制椭圆\绘制椭圆\
     文件         926  2020-10-24 11:00  绘制椭圆\绘制椭圆.sln
     文件       16384  2009-02-23 08:42  绘制椭圆\绘制椭圆.suo
     文件       29696  2020-10-24 11:01  绘制椭圆\绘制椭圆.v11.suo
     目录           0  2019-02-08 12:36  绘制椭圆\绘制椭圆\bin\
     目录           0  2019-02-08 12:36  绘制椭圆\绘制椭圆\bin\Debug\
............此处省略27个文件信息

评论

共有 条评论