You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.5 KiB
C#

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;
namespace ClientTest
{
/*
*S_CallDataForm
*
*2010-10-30
*
*/
public partial class S_CallDataForm : Form
{
public List<uint> lstOBJID = new List<uint>();
public string sMID;
public S_CallDataForm()
{
InitializeComponent();
}
/*
*btnApply_Click
*
*2010-10-30
*object sender , EventArgs e
*void
*
*/
private void btnApply_Click(object sender, EventArgs e)
{
lstOBJID.Clear();
//蒸汽仪表压力值
if (checkBox1.Checked == true)
{
lstOBJID.Add(0x9B00);
}
//蒸汽仪表温度值
if (checkBox2.Checked == true)
{
lstOBJID.Add(0x9B01);
}
//蒸汽仪表瞬时流量值
if (checkBox3.Checked == true)
{
lstOBJID.Add(0x9B03);
}
//蒸汽仪表累积流量值
if (checkBox4.Checked == true)
{
lstOBJID.Add(0x9B05);
}
//蒸汽仪表瞬时热量
if (checkBox5.Checked == true)
{
lstOBJID.Add(0x9B06);
}
//蒸汽仪表瞬时热量
if (checkBox6.Checked == true)
{
lstOBJID.Add(0x9B07);
}
//终端时间
if (checkBox7.Checked == true)
{
lstOBJID.Add(0x8030);
}
//蒸汽仪表频率
if (checkBox8.Checked == true)
{
lstOBJID.Add(0x9B02);
}
//蒸汽仪表密度
if (checkBox9.Checked == true)
{
lstOBJID.Add(0x9B0E);
}
//蒸汽仪表差压
if (checkBox10.Checked == true)
{
lstOBJID.Add(0x9B0F);
}
}
/*
*CallDataForm_Load
*
*2010-10-30
*object sender , EventArgs e
*void
*ID
*/
private void CallDataForm_Load(object sender, EventArgs e)
{
tbMeterID.Text = sMID;
}
/// <summary>
/// 链接点击事件函数,全选处理
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void linkLabelAllSelect_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
foreach (Control ctrl in this.groupBox1.Controls)
{
if (ctrl.GetType().ToString() == "System.Windows.Forms.CheckBox")
{
((CheckBox)ctrl).Checked = true;
}
}
}
/// <summary>
/// 链接点击事件函数,不选处理
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void linkLabelNoSelect_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
foreach (Control ctrl in this.groupBox1.Controls)
{
if (ctrl.GetType().ToString() == "System.Windows.Forms.CheckBox")
{
((CheckBox)ctrl).Checked = false;
}
}
}
/// <summary>
/// 链接点击事件函数,反选处理
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void linkLabelUnSelect_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
foreach (Control ctrl in this.groupBox1.Controls)
{
if (ctrl.GetType().ToString() == "System.Windows.Forms.CheckBox")
{
((CheckBox)ctrl).Checked = !((CheckBox)ctrl).Checked;
}
}
}
}
}