namespace Service.Execute.StaticTools
{
///
/// LED管理工具
///
public class LedTool
{
static ServiceReferenceLed.WebServiceLedSoapClient client = new ServiceReferenceLed.WebServiceLedSoapClient(ServiceReferenceLed.WebServiceLedSoapClient.EndpointConfiguration.WebServiceLedSoap);
///
/// 通讯连接
///
public void LedConnect()
{
try
{ if (client != null)
{
client.LedConnectAsync();
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// 通讯断开
///
public void LedDisConnect()
{
try
{
if (client != null)
{
client.LedDisConnectAsync();
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// LED连接状态值
///
public bool GetLedConnectedSts()
{
bool result = false;
try
{
if (client != null)
{
result = client.GetLedConnectedStsAsync().Result;
}
}
catch (Exception ex)
{
ex.ToString();
}
return result;
}
///
/// 欢迎文本指令
///
public void WriteWelcome(string str_cn, string str_cn1, string str_cn2)
{
try
{
if (client != null)
{
client.WriteWelcomeAsync(str_cn, str_cn1, str_cn2);
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// 欢迎文本指令
///
public void WriteContent(string content)
{
try
{
if (client != null)
{
client.WriteContentAsync(content);
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// 普通文本节目
///
/// 接收文本内容
public void WriteProgramContent(string content)
{
try
{
if (client != null)
{
client.WriteProgramContentAsync(content);
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// 欢迎文本节目
///
public void WriteProgramWelcome(string str_cn, string str_cn1, string str_cn2)
{
try
{
if (client != null)
{
client.WriteProgramWelcomeAsync(str_cn, str_cn1, str_cn2);
}
}
catch (Exception ex)
{
ex.ToString();
}
}
///
/// 清屏
///
public void WriteClearScreen()
{
try
{
if (client != null)
{
client.WriteClearScreenAsync();
}
}
catch (Exception ex)
{
ex.ToString();
}
}
}
}