|
@@ -282,6 +282,23 @@ namespace MeterPlugInLibrary
|
|
|
|
|
|
|
|
public void setStatic4LineMsg(string Ip, string ledInfo)
|
|
public void setStatic4LineMsg(string Ip, string ledInfo)
|
|
|
{
|
|
{
|
|
|
|
|
+ string info1 = "";
|
|
|
|
|
+ string info2 = "";
|
|
|
|
|
+ string info3 = "";
|
|
|
|
|
+ string info4 = "";
|
|
|
|
|
+
|
|
|
|
|
+ //split ledInfo
|
|
|
|
|
+ string[] list = ledInfo.Split(',');
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ for(int i=0; i<list.Length; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (i == 0) info1 = list[0];
|
|
|
|
|
+ if (i == 1) info2 = list[1];
|
|
|
|
|
+ if (i == 2) info3 = list[2];
|
|
|
|
|
+ if (i == 3) info4 = list[3];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
int nResult;
|
|
int nResult;
|
|
|
LedDll.COMMUNICATIONINFO CommunicationInfo = new LedDll.COMMUNICATIONINFO();//定义一通讯参数结构体变量用于对设定的LED通讯,具体对此结构体元素赋值说明见COMMUNICATIONINFO结构体定义部份注示
|
|
LedDll.COMMUNICATIONINFO CommunicationInfo = new LedDll.COMMUNICATIONINFO();//定义一通讯参数结构体变量用于对设定的LED通讯,具体对此结构体元素赋值说明见COMMUNICATIONINFO结构体定义部份注示
|
|
|
|
|
|
|
@@ -313,21 +330,36 @@ namespace MeterPlugInLibrary
|
|
|
//int nsize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(LedDll.FONTPROP));
|
|
//int nsize = System.Runtime.InteropServices.Marshal.SizeOf(typeof(LedDll.FONTPROP));
|
|
|
|
|
|
|
|
nResult = LedDll.LV_AddImageTextArea(hProgram, 1, 2, ref AreaRect, 0);
|
|
nResult = LedDll.LV_AddImageTextArea(hProgram, 1, 2, ref AreaRect, 0);
|
|
|
|
|
+
|
|
|
//nResult = LedDll.LV_QuickAddSingleLineTextArea(hProgram, 1, 2, ref AreaRect, LedDll.ADDTYPE_STRING, ledInfo, ref FontProp, 4);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
//nResult = LedDll.LV_QuickAddSingleLineTextArea(hProgram, 1, 2, ref AreaRect, LedDll.ADDTYPE_STRING, ledInfo, ref FontProp, 4);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
AreaRect.left = 0;
|
|
AreaRect.left = 0;
|
|
|
AreaRect.top = 0;
|
|
AreaRect.top = 0;
|
|
|
AreaRect.width = 192;
|
|
AreaRect.width = 192;
|
|
|
- AreaRect.height = 64;
|
|
|
|
|
|
|
+ AreaRect.height = 15;
|
|
|
|
|
|
|
|
- nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, ledInfo, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
|
|
+ nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, info1, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
|
|
|
|
|
|
|
|
AreaRect.left = 0;
|
|
AreaRect.left = 0;
|
|
|
- AreaRect.top = 20;
|
|
|
|
|
|
|
+ AreaRect.top = 15;
|
|
|
AreaRect.width = 192;
|
|
AreaRect.width = 192;
|
|
|
- AreaRect.height = 64;
|
|
|
|
|
|
|
+ AreaRect.height = 15;
|
|
|
|
|
|
|
|
- nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, ledInfo, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
|
|
+ nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, info2, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
+
|
|
|
|
|
+ AreaRect.left = 0;
|
|
|
|
|
+ AreaRect.top = 30;
|
|
|
|
|
+ AreaRect.width = 192;
|
|
|
|
|
+ AreaRect.height = 15;
|
|
|
|
|
+
|
|
|
|
|
+ nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, info3, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
+
|
|
|
|
|
+ AreaRect.left = 0;
|
|
|
|
|
+ AreaRect.top = 45;
|
|
|
|
|
+ AreaRect.width = 192;
|
|
|
|
|
+ AreaRect.height = 15;
|
|
|
|
|
+
|
|
|
|
|
+ nResult = LedDll.LV_AddStaticTextToImageTextArea(hProgram, 1, 2, LedDll.ADDTYPE_STRING, info4, ref FontProp, 1, 2, 1);//快速通过字符添加一个单行文本区域,函数见函数声明注示
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|