• 大小: 64KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2022-05-30
  • 语言: C#
  • 标签:

资源简介

完全独立出来的一个绘制折线图的例子,直接放到程序中就可以用。可以用来实时展示像温度,脉搏这类的数据。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.ComponentModel;

namespace MyDrawTable
{
    class DrawComman
    {
        #region 初始化各个参数变量
        public void init_squareValue(int beginx int beginy int intervalx int intervaly)
        {
            this.beginX = beginx;
            this.beginY = beginy;
            this.intervalX = intervalx;
            this.intervalY = intervaly;
        }
        public void init_coordinatesValue(string xunit string yunit float beginyvalue float everyYvalue)
        {
            this.xUnit = xunit;
            this.yUnit = yunit;
            this.beginYCoordinatesValues = beginyvalue;
            this.every_Yvalue = everyYvalue;
        }

        public void initPen(Pen squarepen Pen linepen SolidBrush covaluesolidbrush Pen coLinepen Pen pointpen)
        {
            //Pen分别为: 方格,折线,坐标值,坐标线,每一个点
            this.squarePen = squarepen;
            this.linePen = linepen;
            this.coordinatesValueBrush = covaluesolidbrush;
            this.coordinatesLinePen = coLinepen;
            this.pointPen = pointpen;
        }
        #endregion

        #region 方格有关设置

        int beginX beginY;
        [Description(“初始X坐标“)]
        public int BeginX
        {
            get { return beginX; }
            set { beginX = value; }
        }

        [Description(“初始Y坐标“)]
        public int BeginY
        {
            get { return beginY; }
            set { beginY = value; }
        }

        Pen squarePen = new Pen(Color.Brown);

        Color squareColor = Color.Brown;
        [Description(“方格线的颜色“) Category(“方格设置“) Browsable(true)]
        public Color SquareColor
        {
            get { return squareColor; }
            set { squareColor = value; }
        }

        int intervalX = 30;
        [Description(“每个小方格的宽度即X坐标的单位长度“) Category(“方格设置“) Browsable(true)]
        public int IntervalX
        {
            get { return intervalX; }
            set { intervalX = value; }
        }


        int intervalY = 15;
        [Description(“每个小方格的高度即Y坐标的单位长度“) Category(“方格设置“) Browsable(true)]
        public int IntervalY
        {
            get { return intervalY; }
            set { intervalY = value; }
        }


        int numVerLine;
        [Description(“竖线的个数“) Category(“方格设置“) Browsable(false)]
        public int NumVerLine
        {
            get { return numVerLine; }
            set { numVerLine = value; }
        }
        int numHorLine;
        [Description(“横线的个数“) Category(“方格设置“) Browsable(false)]
        public int NumHorLine
        {
            get { return numHorLine; }
            set { numHorLine = value; }
        }

        #endregion

        #region 坐标轴设置
        string xName = “X“;
        [Description(“X轴名字“) Category(“坐标轴设置“) Browsable(true)]
        public string X

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18432  2015-07-08 15:51  MyDrawTable\MyDrawTable\bin\Debug\MyDrawTable.exe

     文件      58880  2015-07-08 15:51  MyDrawTable\MyDrawTable\bin\Debug\MyDrawTable.pdb

     文件      11600  2015-07-08 15:52  MyDrawTable\MyDrawTable\bin\Debug\MyDrawTable.vshost.exe

     文件      13776  2015-07-08 16:20  MyDrawTable\MyDrawTable\DrawComman.cs

     文件        611  2015-07-08 15:51  MyDrawTable\MyDrawTable\Form1.cs

     文件       2362  2015-07-08 15:37  MyDrawTable\MyDrawTable\Form1.Designer.cs

     文件       6011  2015-07-08 15:37  MyDrawTable\MyDrawTable\Form1.resx

     文件        219  2015-07-08 15:43  MyDrawTable\MyDrawTable\MyComman.cs

     文件       4322  2015-07-08 15:37  MyDrawTable\MyDrawTable\MyDrawTable.csproj

     文件       9077  2015-07-08 15:51  MyDrawTable\MyDrawTable\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6268  2015-07-08 15:51  MyDrawTable\MyDrawTable\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        748  2015-07-08 15:52  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.csproj.FileListAbsolute.txt

     文件       1040  2015-07-08 15:48  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.csproj.GenerateResource.Cache

     文件      18432  2015-07-08 15:51  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.exe

     文件        180  2015-07-08 15:48  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.Form1.resources

     文件      58880  2015-07-08 15:51  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.pdb

     文件        180  2015-07-08 15:48  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.Properties.Resources.resources

     文件        180  2015-07-08 15:48  MyDrawTable\MyDrawTable\obj\x86\Debug\MyDrawTable.UserControl1.resources

     文件        492  2015-07-08 14:29  MyDrawTable\MyDrawTable\Program.cs

     文件       1374  2015-07-08 14:29  MyDrawTable\MyDrawTable\Properties\AssemblyInfo.cs

     文件       2874  2015-07-08 14:29  MyDrawTable\MyDrawTable\Properties\Resources.Designer.cs

     文件       5612  2015-07-08 14:29  MyDrawTable\MyDrawTable\Properties\Resources.resx

     文件       1098  2015-07-08 14:29  MyDrawTable\MyDrawTable\Properties\Settings.Designer.cs

     文件        249  2015-07-08 14:29  MyDrawTable\MyDrawTable\Properties\Settings.settings

     文件       1979  2015-07-08 15:51  MyDrawTable\MyDrawTable\UserControl1.cs

     文件       1497  2015-07-08 14:51  MyDrawTable\MyDrawTable\UserControl1.Designer.cs

     文件       5817  2015-07-08 14:51  MyDrawTable\MyDrawTable\UserControl1.resx

     文件        382  2015-07-08 14:29  MyDrawTable\MyDrawTable\UserControl2.cs

     文件       1122  2015-07-08 14:29  MyDrawTable\MyDrawTable\UserControl2.Designer.cs

     文件        875  2015-07-08 14:29  MyDrawTable\MyDrawTable.sln

............此处省略14个文件信息

评论

共有 条评论

相关资源