基于c#的工控软件版本v1.03_11.25(附源代码工程下载地址)最新版本

代码地址:http://pan.baidu.com/share/link?shareid=3381776290&uk=588847378点击打开链接新版本做了3个方面修改1,修改了原有的打开关闭的链接图片,改到本地工程中2,添加了定时发送机制3,添加的帮助栏using System;using System.Collections.Generic;using
摘要由CSDN通过智能技术生成

代码地址:http://pan.baidu.com/share/link?shareid=3381776290&uk=588847378

点击打开链接

新版本做了3个方面修改

1,修改了原有的打开关闭的链接图片,改到本地工程中

2,添加了定时发送机制

3,添加的帮助栏


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.Collections;
using System.IO.Ports;
using System.Threading;
using System.Diagnostics;


namespace ComAssistant1
{
    public partial class ComAssis : Form
    {
        public enum LogMsgType { Incoming, Outgoing, Normal, Warning, Error };
        public enum DataMode { Text, Hex }
        private Color[] LogMsgTypeColor = { Color.Orange, Color.Green, Color.Black, Color.Blue, Color.Red };
        /// 准备关闭串口=true
        /// </summary>
        private bool m_IsTryToClosePort = false;
        /// <summary>
        /// true表示正在接收数据
        /// </summary>
        private bool m_IsReceiving = false;
       
        public ComAssis()
        {
            InitializeComponent();


        }
        Mutex m_Mutex = null;//锁
        bool flag;
        private void Form1_Load(object sender, EventArgs e)
        {
            //判断串口打开或关闭
            if (serialPort1.IsOpen)
            {
                serialPort1.Close();
                pictureBox1.Image = ComAssistant1.Properties.Resources.open;
            }
            else
            {
                pictureBox1.Image = ComAssistant1.Properties.Resources.close;
            }
            RefrespictureBox1();


            int ii = 0;
            foreach (string s in SerialPort.GetPortNames())
            {
                if (ii >= 1)
                {
                    comboBox1.Items.Add(s);
                }
                ii++;
            }


            if (SerialPort.GetPortNames().Length != 0)
            {
                comboBox1.Text = (string)comboBox1.Items[0];
            }


            string[] ss = new string[] { "9600", "19200", "57600", "115200" };
            comboBox2.DataSource = ss;


            comboBox3.DataSource = Enum.GetNames(typeof(Parity));


            ss = new string[] { "5", "6", "7", "8" };
            comboBox4.DataSource = ss;
            comboBox4.Text = "8";


            comboBox5.DataSource &

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值