资源简介

实现了串口收发图片文件功能,传送文件时,将图片文件转为字节形式,再分包传输。

资源截图

代码片段和文件信息

#region Namespace Inclusions
using System;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using System.Reflection;
#endregion

namespace SerialPortTerminal
{
  public partial class frmAbout : Form
  {
    private string TempFile = Path.GetTempFileName();

    public frmAbout()
    {
      InitializeComponent();
      
      // Read the about HTML from the assembly
      string html = (new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream(“SerialPortTerminal.About.htm“))).ReadToEnd();

      // Replace sections with appropriate data
      html = html.Replace(“{version}“ Assembly.GetExecutingAssembly().GetName().Version.ToString());

      // Save the temp file so the web browser has a target to navigate to
     // File.WriteAllLines(TempFile html);

      // Show the temp about file 
      web.Navigate(TempFile);
    }

    private void web_Navigated(object sender WebBrowserNavigatedEventArgs e)
    {
      // Since the navigation is complete delete the temp file
      File.Delete(TempFile);
    }
  }
}

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

     文件       1231  2008-11-16 21:03  串口传图片\About.cs

     文件       2258  2008-11-16 21:03  串口传图片\About.Designer.cs

     文件       1132  2005-03-23 16:26  串口传图片\About.htm

     文件       5814  2008-11-16 21:03  串口传图片\About.resx

     文件       1916  2005-03-23 16:52  串口传图片\app.config

     文件       1078  2005-03-23 15:21  串口传图片\App.ico

     文件       1231  2008-11-16 21:03  串口传图片\Backup\About.cs

     文件       2258  2008-11-16 21:03  串口传图片\Backup\About.Designer.cs

     文件       1132  2005-03-23 16:26  串口传图片\Backup\About.htm

     文件       5814  2008-11-16 21:03  串口传图片\Backup\About.resx

     文件       1916  2005-03-23 16:52  串口传图片\Backup\App.config

     文件       1078  2005-03-23 15:21  串口传图片\Backup\App.ico

     文件        378  2005-03-13 14:56  串口传图片\Backup\Program.cs

     文件       1283  2005-03-13 14:14  串口传图片\Backup\Properties\AssemblyInfo.cs

     文件       3490  2005-03-13 14:15  串口传图片\Backup\Properties\Resources.Designer.cs

     文件       5612  2005-03-13 14:14  串口传图片\Backup\Properties\Resources.resx

     文件       3877  2005-03-23 16:52  串口传图片\Backup\Properties\Settings.Designer.cs

     文件       1140  2005-03-23 16:52  串口传图片\Backup\Properties\Settings.settings

     文件       3490  2005-03-23 16:50  串口传图片\Backup\SerialPort Terminal.csproj

     文件        173  2005-03-23 16:50  串口传图片\Backup\SerialPort Terminal.csproj.user

     文件        926  2007-10-14 22:29  串口传图片\Backup\SerialPort Terminal.sln

    ..A..H.     22528  2008-11-16 22:42  串口传图片\Backup\SerialPort Terminal.suo

     文件      11719  2008-11-16 22:41  串口传图片\Backup\Terminal.cs

     文件      18966  2008-11-16 22:39  串口传图片\Backup\Terminal.Designer.cs

     文件       7730  2008-11-16 22:39  串口传图片\Backup\Terminal.resx

     文件      24064  2010-08-05 23:21  串口传图片\bin\Debug\SerialPort Terminal.exe

     文件       1916  2005-03-23 16:52  串口传图片\bin\Debug\SerialPort Terminal.exe.config

     文件      48640  2010-08-05 23:21  串口传图片\bin\Debug\SerialPort Terminal.pdb

     文件      14328  2010-08-05 23:23  串口传图片\bin\Debug\SerialPort Terminal.vshost.exe

     文件       1916  2005-03-23 16:52  串口传图片\bin\Debug\SerialPort Terminal.vshost.exe.config

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

评论

共有 条评论