亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? form1.cs

?? 與wince上的串口調(diào)試程序想配合的WINXP上的串口程序
?? CS
字號(hào):
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;


namespace RS232
{
    public partial class fclsRS232Tester : Form
    {
        string InputData = String.Empty;
        
        // This delegate enables asynchronous calls for setting
        // the text property on a TextBox control:
        delegate void SetTextCallback(string text);
 
        public fclsRS232Tester()
        {
            InitializeComponent();

            // Nice methods to browse all available ports:
            string[] ports = SerialPort.GetPortNames();

            // Add all port names to the combo box:
            foreach (string port in ports)
            {
                cmbComSelect.Items.Add(port);
            }
        }

        private void cmbComSelect_SelectionChangeCommitted(object sender, EventArgs e)
        {
            if (port.IsOpen) port.Close();
            port.PortName = cmbComSelect.SelectedItem.ToString();
            stsStatus.Text = port.PortName + ": 9600,8N1";

            // try to open the selected port:
            try
            {
                port.Open();
            }
            // give a message, if the port is not available:
            catch
            {
                MessageBox.Show("Serial port " + port.PortName + " cannot be opened!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                cmbComSelect.SelectedText = "";
                stsStatus.Text = "Select serial port!";
            }
        }

        private void btnSend_Click(object sender, EventArgs e)
        {
            if (port.IsOpen) port.WriteLine(txtOut.Text);
            else MessageBox.Show("Serial port is closed!", "RS232 tester", MessageBoxButtons.OK, MessageBoxIcon.Error);
            txtOut.Clear();
        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            txtIn.Clear();
        }

        private void port_DataReceived_1(object sender, SerialDataReceivedEventArgs e)
        {
            InputData = port.ReadExisting();
            if (InputData != String.Empty)
            {
 //             txtIn.Text = InputData;   // because of different threads this does not work properly !!
                SetText(InputData);
            }
        }

        /*
        To make a thread-safe call a Windows Forms control:

        1.  Query the control's InvokeRequired property.
        2.  If InvokeRequired returns true,  call Invoke with a delegate that makes the actual call to the control.
        3.  If InvokeRequired returns false, call the control directly.

        In the following code example, this logic is implemented in a utility method called SetText. 
        A delegate type named SetTextDelegate encapsulates the SetText method. 
        When the TextBox control's InvokeRequired returns true, the SetText method creates an instance
        of SetTextDelegate and calls the form's Invoke method. 
        This causes the SetText method to be called on the thread that created the TextBox control,
        and in this thread context the Text property is set directly

        also see: http://msdn2.microsoft.com/en-us/library/ms171728(VS.80).aspx
        */

        // This method demonstrates a pattern for making thread-safe
        // calls on a Windows Forms control. 
        //
        // If the calling thread is different from the thread that
        // created the TextBox control, this method creates a
        // SetTextCallback and calls itself asynchronously using the
        // Invoke method.
        //
        // If the calling thread is the same as the thread that created
        // the TextBox control, the Text property is set directly. 
       
        private void SetText(string text)
        {
            // InvokeRequired required compares the thread ID of the
            // calling thread to the thread ID of the creating thread.
            // If these threads are different, it returns true.
            if (this.txtIn.InvokeRequired)
            {
                SetTextCallback d = new SetTextCallback(SetText);
                this.Invoke(d, new object[] { text });
            }
            else this.txtIn.Text += text;
        }

    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品久久99精品久久| 色综合视频一区二区三区高清| 国产99一区视频免费| 色悠悠久久综合| 国产免费久久精品| 免费观看30秒视频久久| 91九色最新地址| 国产欧美综合在线观看第十页| 日韩 欧美一区二区三区| 色哟哟一区二区在线观看| 国产日本欧洲亚洲| 久久成人av少妇免费| 91精品国产综合久久精品app| 亚洲女女做受ⅹxx高潮| 粉嫩av亚洲一区二区图片| 欧美va在线播放| 青娱乐精品视频| 欧美日韩一区精品| 一区二区三区色| 一本大道av一区二区在线播放| 久久久精品影视| 国产在线视频一区二区| 欧美电影免费观看完整版| 毛片av一区二区| 日韩无一区二区| 日韩高清中文字幕一区| 欧美日韩国产精选| 视频一区在线播放| 欧美精品丝袜中出| 青青草国产成人av片免费| 51精品视频一区二区三区| 日日摸夜夜添夜夜添国产精品| 欧美猛男gaygay网站| 亚洲h在线观看| 制服丝袜av成人在线看| 日本不卡视频一二三区| 日韩欧美成人一区二区| 久久se精品一区精品二区| 2020国产精品久久精品美国| 国产一区二区按摩在线观看| 久久久久国产精品免费免费搜索| 国产精品一区在线| 国产精品女上位| 91性感美女视频| 亚洲成人精品一区| 欧美高清www午色夜在线视频| 日本中文字幕一区二区有限公司| 4438x成人网最大色成网站| 另类小说图片综合网| 国产日韩欧美制服另类| 91伊人久久大香线蕉| 五月天国产精品| 精品国产乱码久久久久久夜甘婷婷| 国产一区二区三区久久悠悠色av| 中文字幕乱码一区二区免费| 色吊一区二区三区| 久久精品99国产国产精| 国产精品毛片无遮挡高清| 91久久精品一区二区三区| 秋霞国产午夜精品免费视频| 久久久久久久久久久久久女国产乱| 成人av在线影院| 午夜电影网一区| 久久影院电视剧免费观看| 一本久道久久综合中文字幕 | 亚洲综合色噜噜狠狠| 91麻豆精品国产无毒不卡在线观看 | 男人操女人的视频在线观看欧美| www国产精品av| 欧美性猛片xxxx免费看久爱| 狠狠色综合日日| 亚洲黄网站在线观看| 6080日韩午夜伦伦午夜伦| 处破女av一区二区| 日本亚洲三级在线| 国产精品国产自产拍在线| 91精品欧美久久久久久动漫 | 紧缚奴在线一区二区三区| 悠悠色在线精品| 久久久久久久久伊人| 欧美色网一区二区| 99久久精品国产一区二区三区 | 亚洲图片有声小说| 国产精品污www在线观看| 91精选在线观看| 91免费看`日韩一区二区| 国内欧美视频一区二区| 偷窥少妇高潮呻吟av久久免费| 久久久不卡网国产精品二区| 在线不卡一区二区| 91片黄在线观看| 高清不卡一区二区| 久久国产日韩欧美精品| 亚洲超碰精品一区二区| 亚洲精品自拍动漫在线| 中文字幕二三区不卡| 欧美v日韩v国产v| 69久久夜色精品国产69蝌蚪网| 97精品视频在线观看自产线路二| 国产福利一区二区| 国产一二精品视频| 麻豆精品久久精品色综合| 天堂午夜影视日韩欧美一区二区| 亚洲精选视频免费看| 亚洲欧美aⅴ...| 亚洲欧洲国产日韩| 中文字幕日本不卡| 中文字幕的久久| 国产精品麻豆久久久| 中文成人综合网| 国产精品久久毛片av大全日韩| 国产日韩精品一区二区浪潮av| 国产亚洲va综合人人澡精品 | 欧美刺激脚交jootjob| 日韩视频在线一区二区| 91精品婷婷国产综合久久性色 | 欧美亚洲愉拍一区二区| 欧美伊人久久久久久午夜久久久久| 91麻豆国产在线观看| 色综合久久66| 欧美色图在线观看| 欧美一区二区在线免费播放| 欧美一级久久久| 久久蜜桃av一区二区天堂| 欧美国产日韩在线观看| 国产精品久久久久精k8| 亚洲精品免费看| 午夜精品一区二区三区三上悠亚| 日韩中文字幕一区二区三区| 麻豆一区二区99久久久久| 国产精品18久久久久久久网站| 成人一级黄色片| 在线欧美一区二区| 日韩精品自拍偷拍| 国产精品婷婷午夜在线观看| 亚洲美女一区二区三区| 日韩在线播放一区二区| 国产一区在线精品| 色偷偷久久人人79超碰人人澡| 欧美日韩国产美女| 国产三级精品三级在线专区| 亚洲老妇xxxxxx| 麻豆成人91精品二区三区| 国产高清不卡一区| 欧美亚洲国产一卡| 久久亚区不卡日本| 亚洲欧美日韩综合aⅴ视频| 亚洲777理论| 国产精品羞羞答答xxdd| 欧美最猛性xxxxx直播| 精品人伦一区二区色婷婷| 亚洲欧美在线aaa| 美女在线视频一区| 91在线你懂得| 2024国产精品| 亚洲福利电影网| 成人免费黄色在线| 欧美另类变人与禽xxxxx| 国产色一区二区| 亚洲18色成人| aaa亚洲精品| 欧美精品一区二区精品网| 一区二区在线观看视频 | 中文字幕欧美日韩一区| 日韩影院在线观看| 91麻豆国产在线观看| 久久精品视频在线看| 奇米影视一区二区三区小说| 91视频www| 国产精品久久一级| 在线观看一区日韩| 国产精品国产成人国产三级| 久久精品国产亚洲5555| 欧美日韩一区国产| 亚洲欧美日韩电影| 成人h版在线观看| 久久久久国产精品麻豆ai换脸 | 91免费在线视频观看| 久久综合网色—综合色88| 日韩精品一二区| 精品视频在线免费看| 亚洲欧洲综合另类在线 | 国产在线不卡视频| 91精品国产免费久久综合| 亚洲成a人片综合在线| 欧美伊人久久久久久午夜久久久久| 中文字幕欧美日本乱码一线二线| 国产在线不卡一区| 欧美精品一区二区久久久| 久久精品免费观看| 日韩欧美色综合| 免费人成精品欧美精品| 欧美精品一级二级三级| 丝袜亚洲精品中文字幕一区| 欧美系列在线观看| 午夜私人影院久久久久| 91.麻豆视频| 免费日本视频一区| 精品成人在线观看| 国产精品一二三区|