• 大小: 6.81MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2023-10-31
  • 语言: C#
  • 标签: tag  

资源简介

STM32串口在线升级IAP+ymodemDown,包括pc端C#源码;STM32串口在线升级IAP+ymodemDown MDK源码,C# ymodem协议源码;

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OleDb;
using System.Windows.Forms;
using System.IO.Ports;
using System.IO;
using System.xml;
using System.Runtime.InteropServices;
//using System.Data.SqlClient.SqlConnection;
using System.Data.SqlClient;
using System.Threading;

namespace Dting_Access
{
    public class LtingAccess
    {
        #region
        public OleDbConnection Conn;
        public OleDbDataAdapter adapter;
        public string ConnString;//access连接字符串
        public string _xmlPath;  //xlm连接路径
        public string _txtPath;  //txt连接路径
        public string _iniPath;  //ini连接路径
        #endregion

        #region
        /// 构造函数   
        //public LtingAccess()
        //{ }

        /// ACCESS数据库路径
        /// //创建连接对象
        ///OleDbConnection conn = new OleDbConnection(“provider=Microsoft.Jet.OLEDB.4.0;data source=“ + exePath + @“\文件名.mdb“); 
        //文件路径初始 及数据库连接字符串
        public void Access_init(string Dbpath)
        {
            ConnString = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=“;
            ConnString += Application.StartupPath + Dbpath;
        }

        /// 根据SQL命令返回数据DataTable数据表 可直接作为dataGridView的数据源,
        public  DataTable Access_open(string SQL)   
        {   
            //连接数据库
            Conn = new OleDbConnection(ConnString);
            Conn.Open();
            //绑定dataGridView
            OleDbDataAdapter adapter = new OleDbDataAdapter();   
            OleDbCommand command = new OleDbCommand(SQL Conn);
            adapter.SelectCommand = command;
            DataTable Dt = new DataTable();   
            adapter.Fill(Dt);
            Conn.Close();
            return Dt; 
        }       

        /**********************************数据库操作方法**********************************/
        
        ///关闭数据链接。    
        public void Close()
        {
            if (Conn.State == ConnectionState.Open)
                Conn.Close();

            Conn.Dispose();
        }

        //a:表名
        //XY后可继续增加字段
        public void Access_add(string a)
        {
            Conn.Open();

            //增
            string sql = “insert into “ + a + “(XY)values(1213)“;
            //删 
            //string sql = “delete from 表名 where 字段1=“...; 
            //改 
            //string sql = “update student set 学号=“ ...; 

            OleDbCommand comm = new OleDbCommand(sql Conn);
            comm.ExecuteNonQuery();
            Conn.Close();
        }

        //a:表名
        //b:要删除的位置
        public void Access_Delete(string astring b)
        {
            Conn.Open();

            //增
            //string sql = “insert into 表1(XY)values(1213)“;
            //删 
            string sql = “delete from “+a+“ where ID=“+ b; 
            //改 
            //string sql = “update student set 学号=“ 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-11-30 14:40  STM32串口在线升级\
     文件       23040  2017-11-30 14:31  STM32串口在线升级\IAP+ymodemDown.exe
     目录           0  2017-11-29 10:16  STM32串口在线升级\IAP+ymodem下载C#源码\
     目录           0  2017-11-29 08:16  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\
     目录           0  2017-11-29 10:07  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\
     文件         884  2017-11-29 08:16  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown.sln
     文件       32256  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown.suo
     目录           0  2017-11-30 11:48  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\
     目录           0  2017-11-30 11:48  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Debug\
     目录           0  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\
     文件       23040  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\IAP+ymodemDown.exe
     文件       46592  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\IAP+ymodemDown.pdb
     文件       11600  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\IAP+ymodemDown.vshost.exe
     文件         490  2016-03-09 13:48  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\IAP+ymodemDown.vshost.exe.manifest
     文件          29  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\bin\Release\Init.ini
     文件       16830  2017-11-29 16:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\Dting_Access.cs
     文件        4814  2017-11-30 14:31  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\Form1.cs
     文件        5418  2017-11-29 16:20  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\Form1.Designer.cs
     文件        7047  2017-11-29 16:20  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\Form1.resx
     文件        3767  2017-11-29 10:07  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\IAP+ymodemDown.csproj
     目录           0  2017-11-29 08:16  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\
     目录           0  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\
     目录           0  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\
     文件        2867  2017-11-29 08:16  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6392  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件         771  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP+ymodemDown.csproj.FileListAbsolute.txt
     文件         975  2017-11-29 14:50  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP+ymodemDown.csproj.GenerateResource.Cache
     文件       24576  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP+ymodemDown.exe
     文件       50688  2017-11-29 14:54  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP+ymodemDown.pdb
     文件         180  2017-11-29 14:50  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP_ymodemDown.Form1.resources
     文件         180  2017-11-29 14:50  STM32串口在线升级\IAP+ymodem下载C#源码\IAP+ymodemDown\IAP+ymodemDown\obj\x86\Debug\IAP_ymodemDown.Properties.Resources.resources
............此处省略395个文件信息

评论

共有 条评论