コード例 #1
0
        public MainForm()
        {
            InitializeComponent();
            dataGridView1.AutoGenerateColumns = false;

            UpdateControl += new UpdateControlEventHandler(this.Test);       //监听服务器:订阅UpdateControl事件,指定Test方法为事件处理函数

            UpdateOperList += new UpdateOperatorList(this.OperatorListTest); //监听服务器:订阅UpdateControl事件,指定Test方法为事件处理函数

            RemoveListStatus += new UpListStatuList(this.RemoveIPList);      //订阅UpListStatuList事件,指定RemoveIPList方法为事件处理函数,用于移除断开连接的IP

            TaskEnd.Enabled = false;
        }
コード例 #2
0
ファイル: ManageForm.cs プロジェクト: orangepoet/proxy
        private void FormManage_Load(object sender, EventArgs e)
        {
            //serialPortInnitial();

            //cameraDevInnitial();

            // 允许跨线程更新窗口控件
            Control.CheckForIllegalCrossThreadCalls = false;

            UpdateControl = new UpdateControlEventHandler(UpdateScanData);  // 订阅 UpdateControl 事件
            UpdateTextBox = new UpdateControlEventHandler(UpdateRfidData);  // 订阅 显示rfid 事件
            ReportRfid = new ReportRfidEventHandler(PostRfid);  // 订阅 ReportRfid 事件

            btnStartReadData.Enabled = false;
            btnStopReadData.Enabled = false;
        }