資源簡介
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個文件信息
評論
共有 條評論