ECS/mod/SendLED.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.IO.Ports;
using System.Xml;
using System.Windows.Forms;
namespace ECS
{
public class SendLED
{
SerialPort Port = new SerialPort();
string Move = "30H";
string Speed = "33H";//
string Com = "COM1";
string sFontSize = "";
int Pbite = 9600;
string[] Ports = SerialPort.GetPortNames();
/// <summary>
/// 电子屏号与操作台号对应的数组
/// </summary>
public static string[] LedNoList = null;
//ECS.frmMain fm = new frmMain();
/// <summary>
/// 电子屏号与操作台号对应的数组
/// 返回值:-1:没有设置电子屏号对应数据 -2:操作台号超过所定义的电子屏数 -3:此操作台没有对应的电子屏号
/// </summary>
public static int GetLedNoByOptStation(int nStNo)
{
if (LedNoList == null) return -1;
if (nStNo > LedNoList.Length) return -2;
if (LedNoList[nStNo - 1].Trim() == "")
{
return -3;
}
return int.Parse(LedNoList[nStNo - 1].Trim());
}
public SendLED()
{
XmlNodeList Node = ECS.Other.GetXmlNodeList(Login.strPath3, "Led");
string sFontSize = "0";
string sX = Led.frmLedMain.ReadLedConfig(Login.strPath3, "0", out Com, out Pbite, out Speed, out Move, out sFontSize);
//读取屏号和操作台号对应 by Zqm 2011-05-28
//XmlNodeList NodeLedIndex = ECS.Other.GetXmlNodeList(Login.strPath3, "LedIndex");
int nCount = 0;
sX = Led.frmLedMain.GetLedIndexCount(Login.strPath3, out nCount);
//LedNoList = new string[NodeLedIndex.Count];
#region
//foreach (XmlElement el in NodeLedIndex)//读元素值
//{
// string sX = "";
// sX = el.Attributes["id"].Value.Trim() ;
// if (sX != "")
// {
// int iX = int.Parse(sX.Trim());
后面还有 185 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。