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.

70 lines
1.8 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
{
/*
*类名称NewTerminalNameForm
*创建人:韩荣伟
*创建时间2010-10-30
*功能描述集中器ID设置窗口
*/
public partial class NewTerminalNameForm : Form
{
public string sNewName;
public NewTerminalNameForm()
{
InitializeComponent();
}
/*
*方法名称btnApply_Click
*创建人:韩荣伟
*创建时间2010-10-30
*参数描述object sender 事件发起者, EventArgs e 事件参数
*返回描述void
*功能描述:执行设置
*/
private void btnApply_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("重设采集器名称,有可能导致采集器识别问题,最终引起采集数据错误。请确认是否继续?",
"注意", MessageBoxButtons.OKCancel,
MessageBoxIcon.Warning);
if (result == DialogResult.OK)
{
this.DialogResult = DialogResult.OK;
sNewName = tbTerminalID.Text;
}
else
{
this.DialogResult = DialogResult.Cancel;
}
}
/*
*方法名称SetTerminalName
*创建人:韩荣伟
*创建时间2010-10-30
*参数描述string sName 新ID
*返回描述void
*功能描述:更新显示
*/
public void SetTerminalName(string sName)
{
tbTerminalID.Text = sName;
}
}
}