Exemple #1
0
 public void InitForms()
 {
     flowLayoutPanel.Controls.Clear();
     for (int i = 0; i < GasMonitorManager.Chanels.Count; i++)
     {
         ChannelReal channelReal = new ChannelReal();
         channelReal.SetChannel(GasMonitorManager.Chanels[i]);
         channelReal.SetStyle(GasMonitorManager.MainForm.Style);
         flowLayoutPanel.Controls.Add(channelReal);
     }
 }
Exemple #2
0
 public void SetChannelStatus()
 {
     ///设置值
     for (int i = 0; i < this.flowLayoutPanel.Controls.Count; i++)
     {
         if (this.flowLayoutPanel.Controls[i].GetType() == typeof(ChannelReal))
         {
             ChannelReal channelReal = (ChannelReal)this.flowLayoutPanel.Controls[i];
             channelReal.SetChannelStatus();
         }
     }
 }
Exemple #3
0
        public void SetReadData(ReceiveItem data, ReceiveItem alarm, ReceiveItem alarmtatus)
        {
            ///设置值
            for (int i = 0; i < this.flowLayoutPanel.Controls.Count; i++)
            {
                if (this.flowLayoutPanel.Controls[i].GetType() == typeof(ChannelReal))
                {
                    ChannelReal channelReal = (ChannelReal)this.flowLayoutPanel.Controls[i];

                    if (!string.IsNullOrEmpty(channelReal.Channel.BindingArress) && channelReal.Channel.BindingArress == data.Address)
                    {
                        channelReal.SetReadData(data, alarm, alarmtatus);
                    }
                    else
                    {
                    }
                }
            }
        }