1168 lines
45 KiB
C#
1168 lines
45 KiB
C#
|
|
//===============================================================================
|
|||
|
|
//
|
|||
|
|
// LabLed
|
|||
|
|
// <20><><EFBFBD><EFBFBD> -- LED<45><44>ʾ<EFBFBD><CABE> <20><><EFBFBD><EFBFBD>
|
|||
|
|
//
|
|||
|
|
// ----- <20><><EFBFBD>ڶԻ<DAB6><D4BB><EFBFBD>LED<45><44>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//
|
|||
|
|
//===============================================================================
|
|||
|
|
//
|
|||
|
|
// Copyright (C) 2002-2007 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>Ȩ<EFBFBD><C8A8>.
|
|||
|
|
//
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 2007-12-10
|
|||
|
|
// <20><> <20><> <20><>: Liushiying (lsy@sogou.com)
|
|||
|
|
// <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>: LED<45><44>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>: 2007-12-10
|
|||
|
|
// <20><> <20><> <20><>: Liushiying (lsy@sogou.com)
|
|||
|
|
// <20><EFBFBD>˵<EFBFBD><CBB5>:
|
|||
|
|
//
|
|||
|
|
//===============================================================================
|
|||
|
|
|
|||
|
|
namespace LabLed.Components
|
|||
|
|
{
|
|||
|
|
using System;
|
|||
|
|
using System.Diagnostics;
|
|||
|
|
using System.Runtime.InteropServices;
|
|||
|
|
/// <summary>
|
|||
|
|
/// LED<45><44>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public class LedCommon : IDisposable
|
|||
|
|
{
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ö<EFBFBD>ٶ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// <summary>
|
|||
|
|
/// ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eDevType
|
|||
|
|
{
|
|||
|
|
DEV_COM = 0, //<2F><><EFBFBD><EFBFBD>ͨѶ 0
|
|||
|
|
DEV_UDP, //UDPͨѶ 1
|
|||
|
|
DEV_MODEM //ModemͨѶ 2
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>˿ڳ<CBBF><DAB3><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eCommPort
|
|||
|
|
{
|
|||
|
|
Address = 0, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
|||
|
|
ComPort = 4 //<2F><>COM4<4D><34>ΪͨѶ<CDA8>˿<EFBFBD>
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ͨѶ<CDA8>ٶ<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eBaudRate
|
|||
|
|
{
|
|||
|
|
SBR_9600 = 0, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>9600 0
|
|||
|
|
SBR_14400, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>14400 1
|
|||
|
|
SBR_19200, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>19200 2
|
|||
|
|
SBR_38400, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>38400 3
|
|||
|
|
SBR_57600, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>57600 4
|
|||
|
|
SBR_115200 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>115200 5
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eRootType
|
|||
|
|
{
|
|||
|
|
ROOT_PLAY = 17, //<2F>·<EFBFBD><C2B7><EFBFBD>ĿΪ<C4BF><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 17
|
|||
|
|
ROOT_DOWNLOAD //<2F>·<EFBFBD><C2B7><EFBFBD>ĿΪ<C4BF><CEAA><EFBFBD>沢<EFBFBD><E6B2A2><EFBFBD><EFBFBD> 18
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eScreenType
|
|||
|
|
{
|
|||
|
|
SCREEN_UNICOLOR = 1, //<2F><>ɫ<EFBFBD><C9AB>ʾ<EFBFBD><CABE>
|
|||
|
|
SCREEN_COLOR, //˫ɫ<CBAB><C9AB>ʾ<EFBFBD><CABE>
|
|||
|
|
SCREEN_RGB, //<2F>Ҷ<DEBB>ȫ<EFBFBD><C8AB>
|
|||
|
|
SCREEN_FULL_4BIT, //16<31><36><EFBFBD>Ҷ<EFBFBD>ȫ<EFBFBD><C8AB>
|
|||
|
|
SCREEN_FULL_10BIT //1024<32><34><EFBFBD>Ҷ<EFBFBD>ȫ<EFBFBD><C8AB>
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>Ӧ<EFBFBD><D3A6>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eResponseMessage
|
|||
|
|
{
|
|||
|
|
LM_RX_COMPLETE = 1, //<2F><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD> 1
|
|||
|
|
LM_TX_COMPLETE, //<2F><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD> 2
|
|||
|
|
LM_RESPOND, //<2F>յ<EFBFBD>Ӧ<EFBFBD><D3A6> 3
|
|||
|
|
LM_TIMEOUT, //<2F><>ʱ 4
|
|||
|
|
LM_NOTIFY, //֪ͨ<CDA8><D6AA>Ϣ 5
|
|||
|
|
LM_PARAM,
|
|||
|
|
LM_TX_PROGRESS, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 7
|
|||
|
|
LM_RX_PROGRESS //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 8
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>Դ״̬<D7B4><CCAC><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum ePowerStatus
|
|||
|
|
{
|
|||
|
|
LED_POWER_OFF = 0, //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Դ<EFBFBD>ѹر<D1B9> 0
|
|||
|
|
LED_POWER_ON //<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD> 1
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//ʱ<><CAB1><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|||
|
|
public enum eTimeFormat
|
|||
|
|
{
|
|||
|
|
DF_YMD = 1, // 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "2004<30><34>12<31><32>31<33><31>"
|
|||
|
|
DF_HN, // 2 ʱ<><CAB1> "19:20"
|
|||
|
|
DF_HNS, // 3 ʱ<><CAB1><EFBFBD><EFBFBD> "19:20:30"
|
|||
|
|
DF_Y, // 4 <20><> "2004"
|
|||
|
|
DF_M, // 5 <20><> "12" "01" ע<>⣺ʼ<E2A3BA><CABC><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
|||
|
|
DF_D, // 6 <20><>
|
|||
|
|
DF_H, // 7 ʱ
|
|||
|
|
DF_N, // 8 <20><>
|
|||
|
|
DF_S, // 9 <20><>
|
|||
|
|
DF_W // 10 <20><><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱformat<61><74><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public enum eCountType
|
|||
|
|
{
|
|||
|
|
CF_DAY = 0, // 0 <20><><EFBFBD><EFBFBD>
|
|||
|
|
CF_HOUR, // 1 Сʱ<D0A1><CAB1>
|
|||
|
|
CF_HMS, // 2 ʱ<><CAB1><EFBFBD><EFBFBD>
|
|||
|
|
CF_HM, // 3 ʱ<><CAB1>
|
|||
|
|
CF_MS, // 4 <20><><EFBFBD><EFBFBD>
|
|||
|
|
CF_S // 5 <20><>
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public const int ETHER_ADDRESS_LENGTH = 6;
|
|||
|
|
public const int IP_ADDRESS_LENGTH = 4;
|
|||
|
|
|
|||
|
|
public const int NOTIFY_NONE = 0;
|
|||
|
|
public const int NOTIFY_EVENT = 1;
|
|||
|
|
public const int NOTIFY_BLOCK = 2;
|
|||
|
|
|
|||
|
|
public const int FONT_SET_16 = 0; //16<31><36><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
|
|||
|
|
public const int FONT_SET_24 = 1; //24<32><34><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>
|
|||
|
|
|
|||
|
|
public const int PKC_QUERY = 4;
|
|||
|
|
public const int PKC_ADJUST_TIME = 6;
|
|||
|
|
public const int PKC_GET_PARAM = 7;
|
|||
|
|
public const int PKC_SET_PARAM = 8;
|
|||
|
|
public const int PKC_GET_POWER = 9;
|
|||
|
|
public const int PKC_SET_POWER = 10;
|
|||
|
|
public const int PKC_GET_BRIGHT = 11;
|
|||
|
|
public const int PKC_SET_BRIGHT = 12;
|
|||
|
|
public const int PKC_SET_AUTO_POWER = 61;
|
|||
|
|
public const int PKC_GET_LEAF = 65;
|
|||
|
|
public const int PKC_SET_LEAF = 66;
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ṹ<EFBFBD>嶨<EFBFBD><EFBFBD>
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ṹ<EFBFBD>嶨<EFBFBD><E5B6A8>
|
|||
|
|
/// </summary>
|
|||
|
|
|
|||
|
|
//<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
public struct DEVICEPARAM
|
|||
|
|
{
|
|||
|
|
public uint devType; //ͨѶ<CDA8>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
public uint Speed; //ͨѶ<CDA8>ٶ<EFBFBD>(<28><><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD>)
|
|||
|
|
public uint ComPort;
|
|||
|
|
public uint FlowCon;
|
|||
|
|
public uint locPort; //<2F><><EFBFBD>ض˿<D8B6>(<28>Դ<EFBFBD><D4B4><EFBFBD>ͨѶΪ<D1B6><CEAA><EFBFBD><EFBFBD><EFBFBD>ںţ<DABA><C5A3><EFBFBD>UDPͨѶΪ<D1B6><CEAA><EFBFBD><EFBFBD><EFBFBD>ض˿ںţ<DABA>һ<EFBFBD><D2BB>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>1024)
|
|||
|
|
public uint rmtPort; //Զ<>̶˿ں<CBBF>(<28><>UDPͨѶ<CDA8><D1B6><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD>Ϊ6666)
|
|||
|
|
public uint memory;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
|||
|
|
public byte[] Phone;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
|||
|
|
public uint[] Reserved;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
public struct RECT
|
|||
|
|
{
|
|||
|
|
public int left;
|
|||
|
|
public int top;
|
|||
|
|
public int right;
|
|||
|
|
public int bottom;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct SYSTEMTIME
|
|||
|
|
{
|
|||
|
|
public ushort wYear;
|
|||
|
|
public ushort wMonth;
|
|||
|
|
public ushort wDayOfWeek;
|
|||
|
|
public ushort wDay;
|
|||
|
|
public ushort wHour;
|
|||
|
|
public ushort wMinute;
|
|||
|
|
public ushort wSecond;
|
|||
|
|
public ushort wMilliseconds;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct TIMESTAMP{
|
|||
|
|
public int time;
|
|||
|
|
public int date;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct AUTOPOWERTIME
|
|||
|
|
{
|
|||
|
|
public uint enabled;
|
|||
|
|
public int opentime0_time;
|
|||
|
|
public int opentime0_date;
|
|||
|
|
public int opentime1_time;
|
|||
|
|
public int opentime1_date;
|
|||
|
|
public int opentime2_time;
|
|||
|
|
public int opentime2_date;
|
|||
|
|
public int opentime3_time;
|
|||
|
|
public int opentime3_date;
|
|||
|
|
public int opentime4_time;
|
|||
|
|
public int opentime4_date;
|
|||
|
|
public int opentime5_time;
|
|||
|
|
public int opentime5_date;
|
|||
|
|
public int opentime6_time;
|
|||
|
|
public int opentime6_date;
|
|||
|
|
public int closetime0_time;
|
|||
|
|
public int closetime0_date;
|
|||
|
|
public int closetime1_time;
|
|||
|
|
public int closetime1_date;
|
|||
|
|
public int closetime2_time;
|
|||
|
|
public int closetime2_date;
|
|||
|
|
public int closetime3_time;
|
|||
|
|
public int closetime3_date;
|
|||
|
|
public int closetime4_time;
|
|||
|
|
public int closetime4_date;
|
|||
|
|
public int closetime5_time;
|
|||
|
|
public int closetime5_date;
|
|||
|
|
public int closetime6_time;
|
|||
|
|
public int closetime6_date;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct NotifyMessage
|
|||
|
|
{
|
|||
|
|
public int Message;
|
|||
|
|
public int Command;
|
|||
|
|
public int Result;
|
|||
|
|
public int Status;
|
|||
|
|
public int Address;
|
|||
|
|
public int Size;
|
|||
|
|
public int Buffer;
|
|||
|
|
public DEVICEPARAM param;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
|
|||
|
|
public string Host;
|
|||
|
|
public int port;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct TDevInfo
|
|||
|
|
{
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
|||
|
|
public char[] devName; //<2F>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD>
|
|||
|
|
public UInt32 devID; //<2F>豸<EFBFBD><E8B1B8>ʶ
|
|||
|
|
public UInt32 devIP; //<2F>豸IP<49><50>ַ
|
|||
|
|
public UInt16 devAddr; //<2F>豸<EFBFBD><E8B1B8>ַ
|
|||
|
|
public UInt16 devPort; //<2F>豸<EFBFBD>˿<EFBFBD>
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
|||
|
|
public UInt32[] reserved;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct TDevReport
|
|||
|
|
{
|
|||
|
|
public TDevInfo devInfo;
|
|||
|
|
public double timeUpdate;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public struct TBoardParam
|
|||
|
|
{
|
|||
|
|
public UInt16 width;
|
|||
|
|
public UInt16 height;
|
|||
|
|
public UInt16 type;
|
|||
|
|
public UInt16 frequency;
|
|||
|
|
public UInt32 flag;
|
|||
|
|
public UInt32 uart;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = ETHER_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] mac;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IP_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] ip;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = ETHER_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] GateMAC;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IP_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] host;
|
|||
|
|
public UInt32 brightness;
|
|||
|
|
public UInt32 rom_size;
|
|||
|
|
public Int32 left;
|
|||
|
|
public Int32 top;
|
|||
|
|
public UInt16 scan_mode;
|
|||
|
|
public UInt16 remote_port;
|
|||
|
|
public UInt16 line_order;
|
|||
|
|
public UInt16 oe_time;
|
|||
|
|
public UInt16 shift_freq;
|
|||
|
|
public UInt16 refresh_freq;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IP_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] GateIP;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = IP_ADDRESS_LENGTH)]
|
|||
|
|
public byte[] ipMask;
|
|||
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
|||
|
|
public byte[] name;
|
|||
|
|
public UInt32 ident;
|
|||
|
|
public UInt32 address;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// API<50><49><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
|
|||
|
|
public LedCommon()
|
|||
|
|
{
|
|||
|
|
//
|
|||
|
|
// TODO: <20>ڴ˴<DAB4><CBB4><EFBFBD><EFBFBD>ӹ<EFBFBD><D3B9>캯<EFBFBD><ECBAAF><EFBFBD><EFBFBD>
|
|||
|
|
//
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰϵͳʱ<EFBFBD><EFBFBD>
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>ǰϵͳʱ<CDB3>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʽ
|
|||
|
|
/// </summary>
|
|||
|
|
[DllImport("kernel32.dll", EntryPoint="GetLocalTime")]
|
|||
|
|
public static extern void DLL_GetLocalTime(ref SYSTEMTIME lpSystemTime);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>ǰϵͳʱ<CDB3><CAB1>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="lpSystemTime">ϵͳʱ<CDB3><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public void GetLocalTime(ref SYSTEMTIME lpSystemTime)
|
|||
|
|
{
|
|||
|
|
DLL_GetLocalTime(ref lpSystemTime);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Dispose <EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>Դ
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ͷ<EFBFBD><CDB7><EFBFBD>Դ
|
|||
|
|
/// </summary>
|
|||
|
|
public void Dispose()
|
|||
|
|
{
|
|||
|
|
Dispose(true);
|
|||
|
|
GC.SuppressFinalize(true);
|
|||
|
|
}
|
|||
|
|
protected virtual void Dispose(bool disposing)
|
|||
|
|
{
|
|||
|
|
if (!disposing)
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<EFBFBD>ŵ<EFBFBD>
|
|||
|
|
//long (_stdcall *LED_Open)(const PDeviceParam param, long Notify, long Window, long Message);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_Open")]
|
|||
|
|
public static extern int DLL_LED_Open(ref DEVICEPARAM param,int Notify, int Window, int Message);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ͨѶ<CDA8>ŵ<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="param">DEVICEPARAM<41>ṹ<EFBFBD><E1B9B9><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="Notify"><3E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA>Ϣ 0:<3A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1:<3A><><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="Window"><3E><><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA>Ϣ<EFBFBD>Ĵ<EFBFBD><C4B4>ھ<EFBFBD><DABE><EFBFBD></param>
|
|||
|
|
/// <param name="Message"><3E><>Ϣ<EFBFBD><CFA2>ʶ</param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int LED_Open(ref DEVICEPARAM param, int Notify, int Window, int Message)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_Open(ref param, Notify, Window, Message);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ر<EFBFBD>ͨѶ<EFBFBD>ŵ<EFBFBD>
|
|||
|
|
|
|||
|
|
//void (_stdcall *LED_Close)(long dev);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_Close")]
|
|||
|
|
public static extern void DLL_LED_Close(int dev);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ر<EFBFBD><D8B1>Ѵ<D1B4>ͨѶ<CDA8>豸
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev">LED_Open<65><6E><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ</param>
|
|||
|
|
public void LED_Close(int dev)
|
|||
|
|
{
|
|||
|
|
System.Threading.Thread.Sleep(100);
|
|||
|
|
DLL_LED_Close(dev);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ر<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<EFBFBD>ŵ<EFBFBD>
|
|||
|
|
|
|||
|
|
//void (_stdcall *LED_CloseAll)();
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_CloseAll")]
|
|||
|
|
public static extern void DLL_LED_CloseAll();
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ر<EFBFBD><D8B1>Ѵ<D1B4>ͨѶ<CDA8>豸
|
|||
|
|
/// </summary>
|
|||
|
|
public void LED_CloseAll()
|
|||
|
|
{
|
|||
|
|
System.Threading.Thread.Sleep(100);
|
|||
|
|
DLL_LED_CloseAll();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ѯij<EFBFBD><EFBFBD>ͨѶ<EFBFBD>ŵ<EFBFBD><EFBFBD><EFBFBD>״̬
|
|||
|
|
|
|||
|
|
//long (_stdcall *LED_GetDeviceStatus)(long dev);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetDeviceStatus")]
|
|||
|
|
public static extern int DLL_LED_GetDeviceStatus(int dev);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ѯij<D1AF><C4B3>ͨѶ<CDA8>ŵ<EFBFBD><C5B5><EFBFBD>״̬
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev">LED_Open<65><6E><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ</param>
|
|||
|
|
/// <return>ͨѶ״̬ 0:<3A><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD>ͨѶ 1:<3A>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6> -1:<3A>ŵ<EFBFBD>δ<EFBFBD><EFBFBD><F2BFAABB>ߴ<DFB4><F2BFAAB4><EFBFBD></return>
|
|||
|
|
public int LED_GetDeviceStatus(int dev)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetDeviceStatus(dev);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_CreateReportServer)(WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_CreateReportServer")]
|
|||
|
|
public static extern void DLL_LED_CreateReportServer(UInt16 port);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public void LED_CreateReportServer(UInt16 port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_CreateReportServer(port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_ReleaseReportServer)(void);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_ReleaseReportServer")]
|
|||
|
|
public static extern void DLL_LED_ReleaseReportServer();
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public void LED_ReleaseReportServer()
|
|||
|
|
{
|
|||
|
|
DLL_LED_ReleaseReportServer();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetOnlineCount)(void);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetOnlineCount")]
|
|||
|
|
public static extern int DLL_LED_GetOnlineCount();
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public int LED_GetOnlineCount()
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetOnlineCount();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetOnlineList2)(PDevice* obuffer);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetOnlineList2")]
|
|||
|
|
public static extern int DLL_LED_GetOnlineList(ref TDevReport obuffer);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>б<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public int LED_GetOnlineList(ref TDevReport obuffer)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetOnlineList(ref obuffer);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetOnlineItem2)(long index, PDevice* obuffer);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetOnlineItem2")]
|
|||
|
|
public static extern int DLL_LED_GetOnlineItem(int index, ref TDevReport obuffer);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>б<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public int LED_GetOnlineItem(int index, ref TDevReport obuffer)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetOnlineItem(index, ref obuffer);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetDeviceOnlineCount)(long dev);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetDeviceOnlineCount")]
|
|||
|
|
public static extern int DLL_LED_GetDeviceOnlineCount(int dev);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public int LED_GetDeviceOnlineCount(int dev)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetDeviceOnlineCount(dev);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetDeviceOnlineItem2)(long dev, long index, PDevice* obuffer);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetDeviceOnlineItem2")]
|
|||
|
|
public static extern int DLL_LED_GetDeviceOnlineItem(int dev, int index, ref TDevReport obuffer);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>б<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public int LED_GetDeviceOnlineItem(int dev, int index, ref TDevReport obuffer)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetDeviceOnlineItem(dev, index, ref obuffer);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>ܹ<EFBFBD>ͨѶ
|
|||
|
|
//void (_stdcall *LED_Query)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_Query")]
|
|||
|
|
public static extern void DLL_LED_Query(int dev, byte Address, string Host, int port);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ѯ<EFBFBD><D1AF>ʾ<EFBFBD><CABE><EFBFBD>Ƿ<EFBFBD><C7B7>ܹ<EFBFBD>ͨѶ
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"><3E>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD>LED_Open<65><6E><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>ֵ</param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"><3E><>ʾ<EFBFBD><CABE>IP<49><50>ַ (<28><><EFBFBD><EFBFBD>UDP<44><50>Ч);<3B><><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6><EFBFBD><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>߿<EFBFBD></param>
|
|||
|
|
/// <param name="port"><3E><>ʾ<EFBFBD><CABE><EFBFBD>˿ں<CBBF>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UDPͨѶ<CDA8><D1B6><EFBFBD>ö˿<C3B6>Ϊ6666)</param>
|
|||
|
|
public void LED_Query(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_Query(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_AdjustTime)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_AdjustTime")]
|
|||
|
|
public static extern void DLL_LED_AdjustTime(int dev, byte Address, string Host, int port);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>У<EFBFBD><D0A3><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_AdjustTime(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_AdjustTime(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SetAutoPowerList)(long dev, BYTE Address, char *Host, long port, PAutoPowerTime value);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetAutoPowerList")]
|
|||
|
|
public static extern void DLL_LED_SetAutoPowerList(int dev, byte Address, string Host, int port, ref AUTOPOWERTIME value);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>У<EFBFBD><D0A3><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
/// <param name="value"></param>
|
|||
|
|
public void LED_SetAutoPowerList(int dev, byte Address, string Host, int port, ref AUTOPOWERTIME value)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetAutoPowerList(dev, Address, Host, port, ref value);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD>ļ<EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SaveStreamToFile)(char *filename);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SaveStreamToFile")]
|
|||
|
|
public static extern void DLL_LED_SaveStreamToFile(string filename);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>γɵĽ<C9B5>Ŀ<EFBFBD><C4BF><EFBFBD>ݷ<EFBFBD><DDB7>͵<EFBFBD><CDB5><EFBFBD>ʾ<EFBFBD><CABE>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="filename"></param>
|
|||
|
|
public void LED_SaveStreamToFile(string filename)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SaveStreamToFile(filename);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SendToScreen)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_SendToScreen")]
|
|||
|
|
public static extern void DLL_LED_SendToScreen(int dev, byte Address, string Host, int port);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>γɵĽ<C9B5>Ŀ<EFBFBD><C4BF><EFBFBD>ݷ<EFBFBD><DDB7>͵<EFBFBD><CDB5><EFBFBD>ʾ<EFBFBD><CABE>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_SendToScreen(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SendToScreen(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>
|
|||
|
|
//DWORD (_stdcall *LED_SendToScreenTest)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SendToScreenTest")]
|
|||
|
|
public static extern Int32 DLL_LED_SendToScreenTest(int dev, byte Address, string Host, int port);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>γɵĽ<C9B5>Ŀ<EFBFBD><C4BF><EFBFBD>ݷ<EFBFBD><DDB7>͵<EFBFBD><CDB5><EFBFBD>ʾ<EFBFBD><CABE>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public Int32 LED_SendToScreenTest(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_SendToScreenTest(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ǰҳ<EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_GetLeaf)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetLeaf")]
|
|||
|
|
public static extern void DLL_LED_GetLeaf(int dev, byte Address, string Host, int port);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>ǰҳ<C7B0><D2B3>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_GetLeaf(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_GetLeaf(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>ǰҳ<EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SetLeaf)(long dev, BYTE Address, char *Host, WORD port, DWORD Value);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetLeaf")]
|
|||
|
|
public static extern void DLL_LED_SetLeaf(int dev, byte Address, string Host, int port, uint Value);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>õ<EFBFBD>ǰҳ<C7B0><D2B3>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
/// <param name="Value">ҳ<><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
public void LED_SetLeaf(int dev, byte Address, string Host, int port, uint Value)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetLeaf(dev, Address, Host, port, Value);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetLEDParamDirect)(long dev, BYTE Address, char *Host, long port, PBoardParam param);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetLEDParamDirect")]
|
|||
|
|
public static extern int DLL_LED_GetLEDParamDirect(int dev, byte Address, string Host, int port,ref TBoardParam param);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>Դ״̬
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public int LED_GetLEDParamDirect(int dev, byte Address, string Host, int port, ref TBoardParam param)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetLEDParamDirect(dev, Address, Host, port, ref param);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SetLEDParam)(long dev, BYTE Address, char *Host, long port, PBoardParam param);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetLEDParam")]
|
|||
|
|
public static extern void DLL_LED_SetLEDParam(int dev, byte Address, string Host, int port, ref TBoardParam param);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>Դ״̬
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_SetLEDParam(int dev, byte Address, string Host, int port, ref TBoardParam param)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetLEDParam(dev, Address, Host, port, ref param);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Դ״̬
|
|||
|
|
//void (_stdcall *LED_GetPower)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_GetPower")]
|
|||
|
|
public static extern void DLL_LED_GetPower(int dev, byte Address, string Host, int port);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>Դ״̬
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_GetPower(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_GetPower(dev, Address, Host, port);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ
|
|||
|
|
//void (_stdcall *LED_SetPower)(long dev, BYTE Address, char *Host, WORD port, DWORD Power);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetPower")]
|
|||
|
|
public static extern void DLL_LED_SetPower(int dev, byte Address, string Host, int port, uint Power);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><EFBFBD><F2BFAABB>ر<EFBFBD><D8B1><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Դ
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
/// <param name="Power">LED_POWER_ON <20><EFBFBD>Դ, LED_POWER_OFF <20>رյ<D8B1>Դ</param>
|
|||
|
|
public void LED_SetPower(int dev, byte Address, string Host, int port, ePowerStatus Power)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetPower(dev, Address ,Host ,port , (uint)Power);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_GetBrightness)(long dev, BYTE Address, char *Host, WORD port);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetBrightness")]
|
|||
|
|
public static extern void DLL_LED_GetBrightness(int dev, byte Address, string Host, int port);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ȡ<EFBFBD><C8A1>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
public void LED_GetBrightness(int dev, byte Address, string Host, int port)
|
|||
|
|
{
|
|||
|
|
DLL_LED_GetBrightness(dev, Address ,Host ,port);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//void (_stdcall *LED_SetBrightness)(long dev, BYTE Address, char *Host, WORD port, int Brightness);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetBrightness")]
|
|||
|
|
public static extern void DLL_LED_SetBrightness(int dev, byte Address, string Host, int port, int Brightness);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dev"></param>
|
|||
|
|
/// <param name="Address"></param>
|
|||
|
|
/// <param name="Host"></param>
|
|||
|
|
/// <param name="port"></param>
|
|||
|
|
/// <param name="Brightness"></param>
|
|||
|
|
public void LED_SetBrightness(int dev, byte Address, string Host, int port, int Brightness)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetBrightness(dev, Address ,Host ,port, Brightness);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Ϣ
|
|||
|
|
//void (_stdcall *LED_GetNotifyMessage)(PNotifyMessage Notify);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetNotifyMessage")]
|
|||
|
|
public static extern void DLL_LED_GetNotifyMessage(ref NotifyMessage Notify);
|
|||
|
|
public void LED_GetNotifyMessage(ref NotifyMessage Notify)
|
|||
|
|
{
|
|||
|
|
DLL_LED_GetNotifyMessage(ref Notify);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡij<EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
//long (_stdcall *LED_GetDeviceNotifyMessage)(long dev, PNotifyMessage Notify);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetDeviceNotifyMessage")]
|
|||
|
|
public static extern int DLL_LED_GetDeviceNotifyMessage(int dev, ref NotifyMessage Notify);
|
|||
|
|
public int LED_GetDeviceNotifyMessage(int dev, ref NotifyMessage Notify)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetDeviceNotifyMessage(dev, ref Notify);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡѡ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetOption)(int Index)
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetOption")]
|
|||
|
|
public static extern int DLL_LED_GetOption(int Index);
|
|||
|
|
public void LED_GetOption(int Index)
|
|||
|
|
{
|
|||
|
|
DLL_LED_GetOption(Index);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_SetOption)(int Index, DWORD Value);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_SetOption")]
|
|||
|
|
public static extern int DLL_LED_SetOption(int Index, uint Value);
|
|||
|
|
public void LED_SetOption(int Index, uint Value)
|
|||
|
|
{
|
|||
|
|
DLL_LED_SetOption(Index, Value);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʼ<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *MakeRoot)(long RootType, long ScreenType);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="MakeRoot")]
|
|||
|
|
public static extern int DLL_MakeRoot(int RootType, int ScreenType);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʼ<EFBFBD>γ<EFBFBD><CEB3><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="RootType">ROOT_PLAY <20><><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>, ROOT_DOWNLOAD <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>벻Ҫʹ<D2AA><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="ScreenType"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCREEN_UNICOLOR <20><>ɫ<EFBFBD><C9AB>ʾ<EFBFBD><CABE>, SCREEN_COLOR ˫ɫ<CBAB><C9AB>ʾ<EFBFBD><CABE></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int MakeRoot(eRootType RootType, eScreenType ScreenType)
|
|||
|
|
{
|
|||
|
|
return DLL_MakeRoot((int)RootType, (int)ScreenType);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʼ<EFBFBD>γ<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *MakeRootEx)(long RootType, long ScreenType, long survive);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "MakeRootEx")]
|
|||
|
|
public static extern int DLL_MakeRootEx(int RootType, int ScreenType, int Survive);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>ʼ<EFBFBD>γ<EFBFBD><CEB3><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="RootType">ROOT_PLAY <20><><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD><DAB2><EFBFBD>, ROOT_DOWNLOAD <20><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD><EFBFBD>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>벻Ҫʹ<D2AA><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="ScreenType"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SCREEN_UNICOLOR <20><>ɫ<EFBFBD><C9AB>ʾ<EFBFBD><CABE>, SCREEN_COLOR ˫ɫ<CBAB><C9AB>ʾ<EFBFBD><CABE></param>
|
|||
|
|
/// <param name="Survive"><3E><>Ŀ<EFBFBD><C4BF>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Чʱ<D0A7>䣬<EFBFBD><E4A3AC>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><F3A3ACBB>ָ<EFBFBD><D6B8><EFBFBD>ʾԭ<CABE><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صĽ<D8B5>Ŀ</param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int MakeRootEx(eRootType RootType, eScreenType ScreenType, int Survive)
|
|||
|
|
{
|
|||
|
|
return DLL_MakeRootEx((int)RootType, (int)ScreenType, Survive);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҳ<EFBFBD>棬<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾʱ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddLeaf)(long DisplayTime);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddLeaf")]
|
|||
|
|
public static extern int DLL_AddLeaf(int DisplayTime);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ҳ<EFBFBD>棬<EFBFBD><E6A3AC>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>ʾʱ<CABE><CAB1>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="DisplayTime">ҳ<><D2B3><EFBFBD><EFBFBD>ʾʱ<CABE>䣬<EFBFBD><E4A3AC>λΪ<CEBB><CEAA><EFBFBD><EFBFBD>(ms)</param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int AddLeaf(int DisplayTime)
|
|||
|
|
{
|
|||
|
|
return DLL_AddLeaf(DisplayTime);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dc
|
|||
|
|
//long (_stdcall *AddWindow)(HDC dc,short width, short height, LPRECT rect, long method, long speed, long transparent);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddWindow")]
|
|||
|
|
public static extern int DLL_AddWindow(int dc, short width, short height, ref RECT rect, int method, int speed,int transparent);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ڵ<EFBFBD>ǰ<EFBFBD><C7B0>ʾҳ<CABE><D2B3><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dc
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="dc"><3E>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="width"><3E><>ȡ<EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD></param>
|
|||
|
|
/// <param name="height"><3E><>ȡ<EFBFBD>ĸ߶<C4B8></param>
|
|||
|
|
/// <param name="rect"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="method"><3E><>ʾ<EFBFBD><CABE>ʽ</param>
|
|||
|
|
/// <param name="speed"><3E><>ʾ<EFBFBD>ٶ<EFBFBD></param>
|
|||
|
|
/// <param name="transparent"><3E>Ƿ<EFBFBD><EFBFBD><CDB8></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int AddWindow(int dc, short width, short height, ref RECT rect, int method, int speed,int transparent)
|
|||
|
|
{
|
|||
|
|
return DLL_AddWindow(dc, width, height, ref rect, method, speed,transparent);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼƬ<EFBFBD>ļ<EFBFBD>
|
|||
|
|
//long (_stdcall *AddPicture)(char *filename, LPRECT rect, long method, long speed, long transparent, long stretch);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddPicture")]
|
|||
|
|
public static extern int DLL_AddPicture(string filename, ref RECT rect, int method, int speed, int transparent, int stretch);
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ڵ<EFBFBD>ǰ<EFBFBD><C7B0>ʾҳ<CABE><D2B3><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dc
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="filemane">ͼƬ<CDBC>ļ<EFBFBD><C4BC><EFBFBD></param>
|
|||
|
|
/// <param name="rect"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="method"><3E><>ʾ<EFBFBD><CABE>ʽ</param>
|
|||
|
|
/// <param name="speed"><3E><>ʾ<EFBFBD>ٶ<EFBFBD></param>
|
|||
|
|
/// <param name="transparent"><3E>Ƿ<EFBFBD><EFBFBD><CDB8></param>
|
|||
|
|
/// <param name="stretch"><3E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int AddPicture(string filename, ref RECT rect, int method, int speed, int transparent, int stretch)
|
|||
|
|
{
|
|||
|
|
return DLL_AddPicture(filename, ref rect, method, speed, transparent, stretch);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddDateTime)(LPRECT rect, long transparent, char *fontname, long fontsize, long fontcolor, long format, long fontstyle);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddDateTime")]
|
|||
|
|
public static extern int DLL_AddDateTime(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int format, int fontstyle);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ڵ<EFBFBD>ǰҳ<C7B0>洴<EFBFBD><E6B4B4>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="rect"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="transparent"><3E>Ƿ<EFBFBD><EFBFBD><CDB8></param>
|
|||
|
|
/// <param name="fontname"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="fontsize"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С</param>
|
|||
|
|
/// <param name="fontcolor"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="format">ʱ<>Ӹ<EFBFBD>ʽ</param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int AddDateTime(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, eTimeFormat format, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddDateTime(ref rect, transparent, fontname, fontsize, fontcolor, (int)format, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>뺺<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddString)(char *str, LPRECT rect, long method, long speed, long transparent, long fontset, long fontcolor);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddString")]
|
|||
|
|
public static extern int DLL_AddString(string str, ref RECT rect, int method, int speed, int transparent,int fontset, int fontcolor);
|
|||
|
|
|
|||
|
|
public int AddString(string str, ref RECT rect, int method, int speed, int transparent,int fontset, int fontcolor)
|
|||
|
|
{
|
|||
|
|
return DLL_AddString(str, ref rect, method, speed, transparent, fontset, fontcolor);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʾwindows<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddText)(char *str, LPRECT rect, long method, long speed, long transparent, char *fontname, long fontsize, long fontcolor, long fontstyle = 0);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddText")]
|
|||
|
|
public static extern int DLL_AddText(string str, ref RECT rect, int method, int speed, int transparent,string fontname, int fontsize, int fontcolor, int fontstyle);
|
|||
|
|
|
|||
|
|
public int AddText(string str, ref RECT rect, int method, int speed, int transparent,string fontname, int fontsize, int fontcolor, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddText(str, ref rect, method, speed, transparent,fontname, fontsize, fontcolor, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʾwindows<EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddTextEx)(char *str, LPRECT rect, long method, long speed, long transparent, char *fontname, long fontsize, long fontcolor, long fontstyle = 0, long wordwrap = 0);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddTextEx")]
|
|||
|
|
public static extern int DLL_AddTextEx(string str, ref RECT rect, int method, int speed, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle, int wordwrap);
|
|||
|
|
|
|||
|
|
public int AddTextEx(string str, ref RECT rect, int method, int speed, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle, int wordwrap)
|
|||
|
|
{
|
|||
|
|
return DLL_AddTextEx(str, ref rect, method, speed, transparent, fontname, fontsize, fontcolor, fontstyle, wordwrap);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddMovie)(char *filename, LPRECT rect, long stretch);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddMovie")]
|
|||
|
|
public static extern int DLL_AddMovie(string filename, ref RECT rect, int stretch);
|
|||
|
|
|
|||
|
|
public int AddMovie(string filename, ref RECT rect, int stretch)
|
|||
|
|
{
|
|||
|
|
return DLL_AddMovie(filename, ref rect, stretch);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ǰҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddCountUp)(LPRECT rect, long transparent, char *fontname, long fontsize, long fontcolor, long format, LPSYSTEMTIME starttime, long fontstyle);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddCountUp")]
|
|||
|
|
public static extern int DLL_AddCountUp(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int format, ref SYSTEMTIME starttime, int fontstyle);
|
|||
|
|
public int AddCountUp(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, eCountType format, ref SYSTEMTIME starttime, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddCountUp(ref rect, transparent, fontname, fontsize, fontcolor, (int)format, ref starttime, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddCountDown)(LPRECT rect,long transparent, char *fontname, long fontsize, long fontcolor, long format, LPSYSTEMTIME endtime, long fontstyle);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="AddCountDown")]
|
|||
|
|
public static extern int DLL_AddCountDown(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int format, ref SYSTEMTIME endtime, int fontstyle);
|
|||
|
|
public int AddCountDown(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, eCountType format, ref SYSTEMTIME endtime, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddCountDown(ref rect, transparent, fontname, fontsize, fontcolor, (int)format, ref endtime, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//Function AddTemperature(ARect: PRect; Transparent: Integer; FontName: PChar; FontSize: Integer; FontColor: Integer; FontStyle: Integer = 0): Integer; Stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddTemperature")]
|
|||
|
|
public static extern int DLL_AddTemperature(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle);
|
|||
|
|
public int AddTemperature(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddTemperature(ref rect, transparent, fontname, fontsize, fontcolor, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ʪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//Function AddHumidity(ARect: PRect; Transparent: Integer; FontName: PChar; FontSize: Integer; FontColor: Integer; FontStyle: Integer = 0): Integer; Stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddHumidity")]
|
|||
|
|
public static extern int DLL_AddHumidity(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle);
|
|||
|
|
public int AddHumidity(ref RECT rect, int transparent, string fontname, int fontsize, int fontcolor, int fontstyle)
|
|||
|
|
{
|
|||
|
|
return DLL_AddHumidity(ref rect, transparent, fontname, fontsize, fontcolor, fontstyle);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD>ڵ<EFBFBD>ǰ<EFBFBD><EFBFBD>ʾҳ<EFBFBD>洴<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>ģ<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *AddClock)(LPRECT rect, long transparent, long WidthH, long WidthM, long DotH, long DotM, DWORD ColorH, DWORD ColorM, DWORD ColorS, DWORD ColorD, DWORD ColorN);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddClock")]
|
|||
|
|
public static extern int DLL_AddClock(ref RECT rect, int transparent, int WidthH, int WidthM, int DotH, int DotM, uint ColorH, uint ColorM, uint ColorS, uint ColorD, uint ColorN);
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>ڵ<EFBFBD>ǰ<EFBFBD><C7B0>ʾҳ<CABE><D2B3><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dc
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="rect"><3E><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="transparent"><3E>Ƿ<EFBFBD><EFBFBD><CDB8></param>
|
|||
|
|
/// <param name="DotM"><3E><><EFBFBD><EFBFBD><EFBFBD>뾶</param>
|
|||
|
|
/// <param name="DotH">3,6,9<><39><EFBFBD>뾶</param>
|
|||
|
|
/// <param name="ColorH">Сʱָ<CAB1><D6B8><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="ColorM"><3E><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="ColorS"><3E><>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="ColorD">3,6,9<><39><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="ColorN"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ</param>
|
|||
|
|
/// <param name="WidthH">Сʱָ<CAB1><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <param name="WidthM"><3E><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public int AddClock(ref RECT rect, int transparent, int WidthH, int WidthM, int DotH, int DotM, uint ColorH, uint ColorM, uint ColorS, uint ColorD, uint ColorN)
|
|||
|
|
{
|
|||
|
|
return DLL_AddClock(ref rect, transparent, WidthH, WidthM, DotH, DotM, ColorH, ColorM, ColorS, ColorD, ColorN);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><EFBFBD><EFBFBD>16<EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>浽ָ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_ExportBeginPacket)(char *filename, long address);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint="LED_ExportBeginPacket")]
|
|||
|
|
public static extern int DLL_LED_ExportBeginPacket(string filename, int address);
|
|||
|
|
|
|||
|
|
public int LED_ExportBeginPacket(string filename, int address)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_ExportBeginPacket(filename, address);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_GetDataPacketCount)();
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_GetDataPacketCount")]
|
|||
|
|
public static extern int DLL_LED_GetDataPacketCount();
|
|||
|
|
|
|||
|
|
public int LED_GetDataPacketCount()
|
|||
|
|
{
|
|||
|
|
return DLL_LED_GetDataPacketCount();
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><EFBFBD><EFBFBD>16<EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>浽ָ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_ExportDataPacket)(char *filename, long address, long serialno);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_ExportDataPacket")]
|
|||
|
|
public static extern int DLL_LED_ExportDataPacket(string filename, int address, int serialno);
|
|||
|
|
|
|||
|
|
public int LED_ExportDataPacket(string filename, int address, int serialno)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_ExportDataPacket(filename, address, serialno);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><EFBFBD><EFBFBD>16<EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>浽ָ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_ExportEndPacket)(char *filename, long address, long serialno);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_ExportEndPacket")]
|
|||
|
|
public static extern int DLL_LED_ExportEndPacket(string filename, int address, int serialno);
|
|||
|
|
|
|||
|
|
public int LED_ExportEndPacket(string filename, int address, int serialno)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_ExportEndPacket(filename, address, serialno);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD>Դ״̬<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>16<EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>浽ָ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_ExportSetPowerPacket)(char *filename, long address, long value);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_ExportSetPowerPacket")]
|
|||
|
|
public static extern int DLL_LED_ExportSetPowerPacket(string filename, int address, int value);
|
|||
|
|
|
|||
|
|
public int LED_ExportSetPowerPacket(string filename, int address, int value)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_ExportSetPowerPacket(filename, address, value);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>16<EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD>浽ָ<EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//long (_stdcall *LED_ExportSetBrightPacket)(char *filename, long address, long value);
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "LED_ExportSetBrightPacket")]
|
|||
|
|
public static extern int DLL_LED_ExportSetBrightPacket(string filename, int address, int value);
|
|||
|
|
|
|||
|
|
public int LED_ExportSetBrightPacket(string filename, int address, int value)
|
|||
|
|
{
|
|||
|
|
return DLL_LED_ExportSetBrightPacket(filename, address, value);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Init(AWidth: Integer; AHeight: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Init")]
|
|||
|
|
public static extern int DLL_UserCanvas_Init(int width, int height);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Init(int width, int height)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Init(width, height);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Draw_Line(X, Y, X1, Y1: Integer; ALineWidth: Integer; AColor: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Draw_Line")]
|
|||
|
|
public static extern int DLL_UserCanvas_Draw_Line(int x, int y, int x1, int y1, int linewidth, int color);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Draw_Line(int x, int y, int x1, int y1, int linewidth, int color)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Draw_Line(x, y, x1, y1, linewidth, color);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Draw_Rectangle(X, Y, X1, Y1: Integer; ALineWidth: Integer; AColor: Integer; AFillColor: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Draw_Rectangle")]
|
|||
|
|
public static extern int DLL_UserCanvas_Draw_Rectangle(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Draw_Rectangle(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Draw_Rectangle(x, y, x1, y1, linewidth, color, fillcolor);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Draw_Ellipse(X, Y, X1, Y1: Integer; ALineWidth: Integer; AColor: Integer; AFillColor: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Draw_Ellipse")]
|
|||
|
|
public static extern int DLL_UserCanvas_Draw_Ellipse(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Draw_Ellipse(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Draw_Ellipse(x, y, x1, y1, linewidth, color, fillcolor);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD>Ǿ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Draw_RoundRect(X, Y, X1, Y1: Integer; ALineWidth: Integer; AColor: Integer; AFillColor: Integer; ARoundX, ARoundY: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Draw_RoundRect")]
|
|||
|
|
public static extern int DLL_UserCanvas_Draw_RoundRect(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor, int roundx, int roundy);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Draw_RoundRect(int x, int y, int x1, int y1, int linewidth, int color, int fillcolor, int roundx, int roundy)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Draw_RoundRect(x, y, x1, y1, linewidth, color, fillcolor, roundx, roundy);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//function UserCanvas_Draw_Text(X, Y, CX, CY: Integer; Str: PChar; FontName: PChar; FontSize, FontColor, FontStyle: Integer; Alignment: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "UserCanvas_Draw_Text")]
|
|||
|
|
public static extern int DLL_UserCanvas_Draw_Text(int x, int y, int x1, int y1, string str, string fontname, int fontsize, int fontcolor, int fontstyle, int alignment);
|
|||
|
|
|
|||
|
|
public int UserCanvas_Draw_Text(int x, int y, int x1, int y1, string str, string fontname, int fontsize, int fontcolor, int fontstyle, int alignment)
|
|||
|
|
{
|
|||
|
|
return DLL_UserCanvas_Draw_Text(x, y, x1, y1, str, fontname, fontsize, fontcolor, fontstyle,alignment);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD>ͼƬ<EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//function AddUserCanvas(ARect: PRect; Method, Speed, Transparent: Integer): Integer; stdcall;
|
|||
|
|
[DllImport("LEDSender.DLL", EntryPoint = "AddUserCanvas")]
|
|||
|
|
public static extern int DLL_AddUserCanvas(ref RECT rect, int method, int speed, int transparent);
|
|||
|
|
|
|||
|
|
public int AddUserCanvas(ref RECT rect, int method, int speed, int transparent)
|
|||
|
|
{
|
|||
|
|
return DLL_AddUserCanvas(ref rect, method, speed, transparent);
|
|||
|
|
}
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|