资源简介
PJLink协议实现投影机开关机, PJLink能实现遥控器的所有功能,当然,此代码中,实现对松下机型的开关控制,只是实例。 如果要实现其它功能,只要知道相应的控制代码即可。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace rv
{
public class Command
{
public delegate void CommandResultHandler(Command sender Response response);
protected Response _cmdResponse;
public enum Response
{
SUCCESS
UNDEFINED_CMD
OUT_OF_PARAMETER
UNVAILABLE_TIME
PROJECTOR_FAILURE
AUTH_FAILURE
COMMUNICATION_ERROR
}
internal virtual string getCommandString(){
//NOOP
return ““;
}
internal virtual bool processAnswerString(string a)
{
if (a.IndexOf(“=ERR1“) >= 0)
_cmdResponse = Response.UNDEFINED_CMD;
else if (a.IndexOf(“=ERR2“) >= 0)
_cmdResponse = Response.UNDEFINED_CMD;
else if (a.IndexOf(“=ERR3“) >= 0)
_cmdResponse = Response.UNVAILABLE_TIME;
else if (a.IndexOf(“=ERR4“) >= 0)
_cmdResponse = Response.PROJECTOR_FAILURE;
else if (a.IndexOf(“ ERRA“) >= 0)
_cmdResponse = Response.AUTH_FAILURE;
else //OK or query answer...
_cmdResponse = Response.SUCCESS;
return _cmdResponse == Response.SUCCESS;
}
public Response CmdResponse
{
get { return _cmdResponse; }
}
public virtual string dumpToString()
{
return ““;
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1675 2012-09-07 18:30 Backup\Command.cs
文件 2786 2012-09-07 18:46 Backup\ErrorStatusCommand.cs
文件 2093 2012-09-07 18:49 Backup\InputCommand.cs
文件 2367 2012-09-07 18:52 Backup\LampStatusCommand.cs
文件 986 2012-09-07 18:53 Backup\ManufacturerNameCommand.cs
文件 966 2012-09-07 18:54 Backup\OtherInfoCommand.cs
文件 2832 2012-09-07 18:32 Backup\PJli
文件 9670 2012-09-07 19:08 Backup\PJli
文件 1700 2012-09-07 18:19 Backup\PowerCommand.cs
文件 1005 2012-09-07 19:09 Backup\ProductNameCommand.cs
文件 1071 2012-09-07 19:15 Backup\ProjectorNameCommand.cs
文件 3348 2012-09-07 19:15 _UpgradeReport_Files\UpgradeReport.css
文件 12505 2010-05-04 01:19 _UpgradeReport_Files\UpgradeReport.xslt
文件 69 2012-09-07 19:15 _UpgradeReport_Files\UpgradeReport_Minus.gif
文件 71 2012-09-07 19:15 _UpgradeReport_Files\UpgradeReport_Plus.gif
文件 17408 2012-09-08 13:50 bin\x86\Debug\PJli
文件 77312 2012-09-08 13:50 bin\x86\Debug\PJli
文件 11608 2012-09-08 13:58 bin\x86\Debug\PJli
文件 4186 2012-09-08 16:48 ex\Program.cs
文件 5920 2012-09-08 13:59 obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 3392 2012-09-08 13:59 obj\x86\Debug\GenerateResource-ResGen.read.1.tlog
文件 268 2012-09-08 13:59 obj\x86\Debug\GenerateResource-ResGen.write.1.tlog
文件 695 2012-09-08 14:00 obj\x86\Debug\PJli
文件 17408 2012-09-08 13:50 obj\x86\Debug\PJli
文件 180 2012-09-08 13:59 obj\x86\Debug\rv.Form1.resources
文件 1439 2012-09-07 19:20 Properties\AssemblyInfo.cs
文件 54 2012-10-10 16:00 WindowsFormsApplication1\bin\Debug\js.ini
文件 3802296 2007-09-14 13:50 WindowsFormsApplication1\bin\Debug\Postbuild.exe
文件 106 2012-10-13 11:05 WindowsFormsApplication1\bin\Debug\set.ini
文件 29184 2012-10-13 11:32 WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
............此处省略82个文件信息
评论
共有 条评论