zoukankan      html  css  js  c++  java
  • control.begininvoke

    void ModbusChannel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
          {
              if (!dgvrChannel.DataGridView.IsHandleCreated)
              {
                  return;
              }

              if (dgvrChannel.DataGridView.InvokeRequired)
              {
                  dgvrChannel.DataGridView.BeginInvoke(new PropertyChangedEventHandler(ModbusChannel_PropertyChanged), new object[] { sender, e });
              }
              else
              {
                  dgvrChannel.Cells["ChannelValue"].Value = ModbusChannel.Value;
                  //不应该再doevents,否则会死锁
                  //Application.DoEvents();
              }
          }

  • 相关阅读:
    JavaScript
    CSS
    HTML5&CSS
    I2C mux和复杂拓扑
    如何实例化I2C设备
    SMBus 协议
    I2C 协议
    I2C和SMBus简介
    ubuntu20.04系统下更新Raspberry Pi4的DTB
    通过configfs配置的Linux USB gadget
  • 原文地址:https://www.cnblogs.com/cppss/p/4108004.html
Copyright © 2011-2022 走看看