level 1
上田漫
楼主
望高手帮助下 每句注释下
/// <summary>
/// 实时监控数据采集
/// </summary>
/// <param name="g1"></param>
private void AddData(string g1)
{
g1 = g1.Replace("40040942", "40040941");
string[] set = new string[] { "40040941" };
string[] str = g1.Split(set, StringSplitOptions.None);
if (str[0].Substring(0, 4) != "4011")
{
return;
}
else
{
if (str[0].Length > 34)
{
++CommunicateError;
if (CommunicateError > 5)
{
this.led3.Value = true;
}
return;
}
CommunicateError = 0;
if (str[1].Substring(0, 4) = "4016")
2009年05月10日 12点05分
1
/// <summary>
/// 实时监控数据采集
/// </summary>
/// <param name="g1"></param>
private void AddData(string g1)
{
g1 = g1.Replace("40040942", "40040941");
string[] set = new string[] { "40040941" };
string[] str = g1.Split(set, StringSplitOptions.None);
if (str[0].Substring(0, 4) != "4011")
{
return;
}
else
{
if (str[0].Length > 34)
{
++CommunicateError;
if (CommunicateError > 5)
{
this.led3.Value = true;
}
return;
}
CommunicateError = 0;
if (str[1].Substring(0, 4) = "4016")