• 大小: 2.29MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-13
  • 语言: C#
  • 标签: c#  串口  波形  

资源简介

功能:C#开发的上位机波形软件,双通道,串口数据上传,10位AD采样,分高八位,第八位。即,串口4字节发送数据。

资源截图

代码片段和文件信息

using System;
using System.IO;  
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Text.Regularexpressions;
using System.Drawing.Drawing2D;

using NPOI.HSSF.UserModel;  
using NPOI.HPSF;  
using NPOI.POIFS.FileSystem;  
using NPOI.HSSF.Util;  
using NPOI.SS.UserModel;  
using NPOI.HSSF.Record.CF;  


namespace Test
{
    /// 
    /// 测试窗体
    /// 

    public partial class FormTest : Form
    {
        public FormTest()
        {
            InitializeComponent();
            f_saveReadFirst(false);
            f_restyle();
            comboBoxSerPtLst.Items.AddRange(System.IO.Ports.SerialPort.GetPortNames());
        }
        private Color[] m_colors;
        private float m_fstyle;
        private int[] m_istyle;
        /// 
        /// 获取初始的波形显示控件的样式或设置为初始样式
        /// 

        /// 获取ture | 设置false
        private void f_saveReadFirst(bool isRead)
        {
            if (!isRead)
            {
                m_colors = new Color[18];
                m_istyle = new int[2];
                m_istyle[0] = zGraphTest.m_titleSize;
                m_fstyle = zGraphTest.m_titlePosition;
                m_colors[0] = zGraphTest.m_titleColor;
                m_colors[1] = zGraphTest.m_titleBorderColor;
                m_colors[2] = zGraphTest.m_backColorL;
                m_colors[3] = zGraphTest.m_backColorH;
                m_colors[4] = zGraphTest.m_coordinateLineColor;
                m_colors[5] = zGraphTest.m_coordinateStringColor;
                m_colors[6] = zGraphTest.m_coordinateStringtitleColor;
                m_istyle[1] = zGraphTest.m_iLineShowColorAlpha;
                m_colors[7] = zGraphTest.m_iLineShowColor;
                m_colors[8] = zGraphTest.m_GraphBackColor;
                m_colors[9] = zGraphTest.m_ControlItemBackColor;
                m_colors[10] = zGraphTest.m_ControlButtonBackColor;
                m_colors[11] = zGraphTest.m_ControlButtonForeColorL;
                m_colors[12] = zGraphTest.m_ControlButtonForeColorH;
                m_colors[13] = zGraphTest.m_DirectionBackColor;
                m_colors[14] = zGraphTest.m_DirectionForeColor;
                m_colors[15] = zGraphTest.m_BigXYBackColor;
                m_colors[16] = zGraphTest.m_BigXYButtonBackColor;
                m_colors[17] = zGraphTest.m_BigXYButtonForeColor;      
            }
            else
            {
                //样式
                textBox标题字体大小.Text = m_istyle[0].ToString();
                zGraphTest.m_titleSize = m_istyle[0];
                textBox标题位置.Text = m_fstyle.ToString();
                zGraphTest.m_titlePosition = m_fstyle;
                zGraphTest.m_titleColor=button标题颜色.BackColor = m_colors[0];
                zGraphTest.m_titleBorderColor=button标题描边颜色.BackCo

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-12-16 15:30  Csharp_DrawCurveFromSerial\
     文件          77  2013-06-15 01:14  Csharp_DrawCurveFromSerial\app.config
     目录           0  2013-12-16 15:30  Csharp_DrawCurveFromSerial\Backup\
     文件       37825  2009-12-24 13:17  Csharp_DrawCurveFromSerial\Backup\FormTest.cs
     文件       79196  2009-12-19 18:46  Csharp_DrawCurveFromSerial\Backup\FormTest.Designer.cs
     文件        6211  2009-12-23 21:41  Csharp_DrawCurveFromSerial\Backup\FormTest.resx
     文件         466  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Program.cs
     目录           0  2013-12-16 15:30  Csharp_DrawCurveFromSerial\Backup\Properties\
     文件        1156  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Properties\AssemblyInfo.cs
     文件        2864  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Properties\Resources.Designer.cs
     文件        5612  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Properties\Resources.resx
     文件        1089  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Properties\Settings.Designer.cs
     文件         249  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Properties\Settings.settings
     文件        3440  2009-12-19 15:18  Csharp_DrawCurveFromSerial\Backup\Test.csproj
     文件         896  2009-12-17 23:08  Csharp_DrawCurveFromSerial\Backup\Test.sln
     目录           0  2013-12-16 15:30  Csharp_DrawCurveFromSerial\bin\
     目录           0  2013-12-16 15:30  Csharp_DrawCurveFromSerial\bin\Debug\
     文件       90624  2013-11-09 10:39  Csharp_DrawCurveFromSerial\bin\Debug\2013119103949.xls
     文件       23552  2013-06-15 06:16  Csharp_DrawCurveFromSerial\bin\Debug\BookTemplate.xls
     文件      445440  2012-02-15 21:59  Csharp_DrawCurveFromSerial\bin\Debug\Ionic.Zip.dll
     文件     1454080  2012-05-04 19:57  Csharp_DrawCurveFromSerial\bin\Debug\NPOI.dll
     文件     2009506  2012-05-04 19:57  Csharp_DrawCurveFromSerial\bin\Debug\NPOI.xml
     文件       74240  2013-10-18 10:26  Csharp_DrawCurveFromSerial\bin\Debug\Test.exe
     文件          77  2013-06-15 01:14  Csharp_DrawCurveFromSerial\bin\Debug\Test.exe.config
     文件       75264  2013-10-18 10:26  Csharp_DrawCurveFromSerial\bin\Debug\Test.pdb
     文件       11608  2013-12-16 15:32  Csharp_DrawCurveFromSerial\bin\Debug\Test.vshost.exe
     文件          77  2013-06-15 01:14  Csharp_DrawCurveFromSerial\bin\Debug\Test.vshost.exe.config
     文件         490  2010-03-17 22:39  Csharp_DrawCurveFromSerial\bin\Debug\Test.vshost.exe.manifest
     文件       53248  2010-05-11 14:04  Csharp_DrawCurveFromSerial\bin\Debug\ZGraph.dll
     文件       15882  2010-05-11 14:04  Csharp_DrawCurveFromSerial\bin\Debug\ZGraph.xml
     目录           0  2013-12-12 13:42  Csharp_DrawCurveFromSerial\bin\Release\
............此处省略46个文件信息

评论

共有 条评论