• 大小: 208KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-16
  • 语言: C#
  • 标签: winform  串口  波形  access  

资源简介

这个程序是我自己搜索了很多资源后自己编写成功的,因为现在网站上没有这种现成的程序,包括winform连接access数据库,用winform程序接收串口数据,以及勇接受的的数据产生波形图。

资源截图

代码片段和文件信息

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;
using System.Data.OleDb;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void dataGridView1_CellContentClick(object sender DataGridViewCellEventArgs e)
        {

        }

        private void button1_Click(object sender EventArgs e)
        {
           


            OleDbConnectionStringBuilder odstr = new OleDbConnectionStringBuilder();
            odstr.Provider = “Microsoft.Jet.OLEDB.4.0“;
            odstr.DataSource = @“G:\WinForm\数据库\db1.mdb“;

            OleDbConnection olcn = new OleDbConnection(odstr.ConnectionString);


            olcn.Open();

            string sql = “select * from student where name=‘12‘“;

            OleDbDataAdapter olda = new OleDbDataAdapter(sql olcn);

            DataSet ds = new DataSet();

            olda.Fill(ds “student“);

            this.dataGridView1.DataSource = ds.Tables[“student“];



        }

        private void button2_Click(object sender EventArgs e)
        {
            //Response.Redirect(“result.aspx“);
            //Server.Transfer(“result.aspx“);
            Form2 form2 = new Form2();            // Form2为跳转页面的窗体名称
            form2.ShowDialog();
            //Form1 form1 = new Form1();
            //form1.Close();
            //this.Close();
           // Application.Exit ();//关闭所有窗体。
            
        }

        private void button3_Click(object sender EventArgs e)
        {
            this.Hide();
        }

        private void button4_Click(object sender EventArgs e)
        {
            Form3 form3 = new Form3();
            form3.Show();
            this.Hide();
        }

        private void button5_Click(object sender EventArgs e)
        {
            Form5 form5 = new Form5();
            form5.ShowDialog();
        }

        private void button6_Click(object sender EventArgs e)
        {
            Form6 form6 = new Form6();
            form6.Show();
        }

        private void button7_Click(object sender EventArgs e)
        {
            Form7 form7 = new Form7();
            form7.Show();
        }

        private void button8_Click(object sender EventArgs e)
        {
            Form8 form8 = new Form8();
            form8.Show();
        }

        private void Form1_Load(object sender EventArgs e)
        {

        }

        private void button9_Click(object sender EventArgs e)
        {
            Form9 form9 = new Form9();
            form9.Show();
        }
    }
}

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

     文件     413696  2013-09-26 22:11  WindowsFormsApplication1\db1.mdb

     文件     372736  2003-08-04 09:49  WindowsFormsApplication1\NTGraph.ocx

     文件      22016  2013-09-27 18:00  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\AxInterop.NTGRAPHLib.dll

     文件     413696  2013-09-26 22:11  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\db1.mdb.mdb

     文件      22016  2013-09-27 18:00  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\Interop.NTGRAPHLib.dll

     文件      33280  2013-10-03 14:06  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

     文件      89600  2013-10-03 14:06  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

     文件      11600  2013-10-03 14:09  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

     文件        490  2010-03-17 22:39  WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

     文件       2893  2013-10-02 21:40  WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs

     文件       9622  2013-10-01 22:16  WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs

     文件       5817  2013-10-01 22:16  WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx

     文件        529  2013-09-28 00:03  WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs

     文件       3152  2013-09-28 00:03  WindowsFormsApplication1\WindowsFormsApplication1\Form2.Designer.cs

     文件       6929  2013-09-28 00:03  WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx

     文件       3020  2013-09-28 17:30  WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs

     文件       5535  2013-09-28 17:29  WindowsFormsApplication1\WindowsFormsApplication1\Form3.Designer.cs

     文件       5817  2013-09-28 17:29  WindowsFormsApplication1\WindowsFormsApplication1\Form3.resx

     文件      11382  2013-09-28 20:07  WindowsFormsApplication1\WindowsFormsApplication1\Form4.cs

     文件       2069  2013-09-28 19:33  WindowsFormsApplication1\WindowsFormsApplication1\Form4.Designer.cs

     文件       5817  2013-09-28 19:33  WindowsFormsApplication1\WindowsFormsApplication1\Form4.resx

     文件       3358  2013-09-28 19:28  WindowsFormsApplication1\WindowsFormsApplication1\Form5.cs

     文件       2205  2013-09-28 19:25  WindowsFormsApplication1\WindowsFormsApplication1\Form5.Designer.cs

     文件       5817  2013-09-28 19:25  WindowsFormsApplication1\WindowsFormsApplication1\Form5.resx

     文件       2077  2013-09-28 21:16  WindowsFormsApplication1\WindowsFormsApplication1\Form6.cs

     文件       1578  2013-09-28 20:57  WindowsFormsApplication1\WindowsFormsApplication1\Form6.Designer.cs

     文件       5817  2013-09-28 20:57  WindowsFormsApplication1\WindowsFormsApplication1\Form6.resx

     文件       1732  2013-10-01 11:23  WindowsFormsApplication1\WindowsFormsApplication1\Form7.cs

     文件       1578  2013-09-28 21:25  WindowsFormsApplication1\WindowsFormsApplication1\Form7.Designer.cs

     文件       5817  2013-09-28 21:25  WindowsFormsApplication1\WindowsFormsApplication1\Form7.resx

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

评论

共有 条评论