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#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
}
}
}
}
}