├── pjlink-sharp-read-only ├── .svn │ ├── entries │ ├── format │ ├── wc.db │ └── pristine │ │ ├── 35 │ │ └── 357c1d525eeba45e1813f20ba154e92022140d51.svn-base │ │ ├── 53 │ │ └── 537f08bfb4a8c6d4f73d9d6d253a3a7b0677ab22.svn-base │ │ ├── 61 │ │ └── 61c5b99653c9f62a4847c9abfed76cb39e5de2e3.svn-base │ │ ├── 84 │ │ └── 84e63f732da97e4470d6efb13ffb09256284e03c.svn-base │ │ ├── 98 │ │ └── 983dad6c21948a85df8a51842012293fab7cd806.svn-base │ │ ├── ad │ │ └── ad4074bd09af7c2e33344a6377ee8c419008f9dc.svn-base │ │ ├── 2f │ │ └── 2f83bd1b49bf0b186117ec4e47ed6e7f3d773588.svn-base │ │ ├── aa │ │ └── aa81e56f183f7f12518c19fc8d735c9b0915f42c.svn-base │ │ ├── e9 │ │ └── e9b4ac05e276bf649d546d39829cc7708a198f5b.svn-base │ │ ├── df │ │ └── dfadc93a1499a923c7a8aff1a7fcdf40a0def54e.svn-base │ │ ├── ce │ │ └── cee92f5e0a1a2be52587fa6b3165913f8ade8b7d.svn-base │ │ ├── b8 │ │ └── b8a968cbe883af736d7f3a729d25ca8ac5c6d64f.svn-base │ │ ├── dc │ │ └── dc457fe6ce22b8ac9f8410ecc622e1705ab03c4e.svn-base │ │ ├── c9 │ │ └── c9f86e9d1fb81e164069ce4a0caeed9b314346a5.svn-base │ │ ├── f9 │ │ └── f9499207b2b7a8760af43e475ab077f4fcd302d3.svn-base │ │ ├── 8e │ │ └── 8eaea99f5f7a589474880dded7b590e36da84d26.svn-base │ │ ├── af │ │ └── af01be318f384ff6c866bb7f9b576f129082b42a.svn-base │ │ └── 4a │ │ └── 4a250d347a2f131eb277d9423444eb3fd06cde31.svn-base ├── PJLink │ ├── pjlink.snk │ ├── Form1.cs │ ├── Form1.Designer.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── OtherInfoCommand.cs │ ├── ProductNameCommand.cs │ ├── ManufacturerNameCommand.cs │ ├── ProjectorNameCommand.cs │ ├── Command.cs │ ├── InputCommand.cs │ ├── PowerCommand.cs │ ├── LampStatusCommand.cs │ ├── ErrorStatusCommand.cs │ ├── PJLink.csproj │ ├── ProjectorInfo.cs │ └── PJLinkConnection.cs ├── Example │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Example.csproj │ └── Program.cs └── PJLink.sln ├── deploy └── ProjectorControl │ ├── setup.exe │ ├── Application Files │ └── ProjectorControl_1_0_0_0 │ │ ├── PJLink.dll.deploy │ │ ├── ProjectorControl.exe.deploy │ │ ├── ProjectorControl.application │ │ └── ProjectorControl.exe.manifest │ └── ProjectorControl.application ├── ProjectorControl ├── ProjectorControl │ ├── Properties │ │ ├── Settings.settings │ │ ├── Settings.Designer.cs │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Program.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── ProjectorControl.csproj │ └── Form1.Designer.cs └── ProjectorControl.sln ├── .gitattributes └── .gitignore /pjlink-sharp-read-only/.svn/entries: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/format: -------------------------------------------------------------------------------- 1 | 12 2 | -------------------------------------------------------------------------------- /deploy/ProjectorControl/setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/deploy/ProjectorControl/setup.exe -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/wc.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/pjlink-sharp-read-only/.svn/wc.db -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/pjlink.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/pjlink-sharp-read-only/PJLink/pjlink.snk -------------------------------------------------------------------------------- /deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/PJLink.dll.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/PJLink.dll.deploy -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/ad/ad4074bd09af7c2e33344a6377ee8c419008f9dc.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/pjlink-sharp-read-only/.svn/pristine/ad/ad4074bd09af7c2e33344a6377ee8c419008f9dc.svn-base -------------------------------------------------------------------------------- /deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/ProjectorControl.exe.deploy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uow-dmurrell/ProjectorControl/HEAD/deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/ProjectorControl.exe.deploy -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | 10 | namespace rv 11 | { 12 | public partial class Form1 : Form 13 | { 14 | public Form1() 15 | { 16 | InitializeComponent(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace ProjectorControl 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new Form1()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual C# Express 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectorControl", "ProjectorControl\ProjectorControl.csproj", "{F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|x86 = Debug|x86 9 | Release|x86 = Release|x86 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2}.Debug|x86.ActiveCfg = Debug|x86 13 | {F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2}.Debug|x86.Build.0 = Debug|x86 14 | {F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2}.Release|x86.ActiveCfg = Release|x86 15 | {F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2}.Release|x86.Build.0 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.296 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProjectorControl.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace rv 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 33 | this.Text = "Form1"; 34 | } 35 | 36 | #endregion 37 | } 38 | } -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PJLink")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PJLink")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f1ebd576-4bf3-4c5b-8e99-827b14d4de03")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ProjectorControl")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ProjectorControl")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b2501602-ddb3-4e0c-8ca4-7627a0751d26")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/Example/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ConsoleApplication1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ConsoleApplication1")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f8b4e131-a5c0-4b6d-95b8-53ddb27b1339")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/2f/2f83bd1b49bf0b186117ec4e47ed6e7f3d773588.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PJLink")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PJLink")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f1ebd576-4bf3-4c5b-8e99-827b14d4de03")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/61/61c5b99653c9f62a4847c9abfed76cb39e5de2e3.svn-base: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ConsoleApplication1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ConsoleApplication1")] 13 | [assembly: AssemblyCopyright("Copyright © 2010")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f8b4e131-a5c0-4b6d-95b8-53ddb27b1339")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual C# Express 2010 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PJLink", "PJLink\PJLink.csproj", "{7C7E83DB-47B5-476D-9F0D-151F01051E07}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "Example\Example.csproj", "{8001E34A-3D13-4579-AD8A-B3B1981486FC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x86 = Debug|x86 12 | Release|Any CPU = Release|Any CPU 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|Any CPU.ActiveCfg = Debug|x86 17 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|x86.ActiveCfg = Debug|x86 18 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|x86.Build.0 = Debug|x86 19 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|Any CPU.ActiveCfg = Release|x86 20 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|x86.ActiveCfg = Release|x86 21 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|x86.Build.0 = Release|x86 22 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|x86.ActiveCfg = Debug|x86 25 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|x86.Build.0 = Debug|x86 26 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|x86.ActiveCfg = Release|x86 29 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/aa/aa81e56f183f7f12518c19fc8d735c9b0915f42c.svn-base: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PJLink", "PJLink\PJLink.csproj", "{7C7E83DB-47B5-476D-9F0D-151F01051E07}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example", "Example\Example.csproj", "{8001E34A-3D13-4579-AD8A-B3B1981486FC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Debug|x86 = Debug|x86 12 | Release|Any CPU = Release|Any CPU 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|Any CPU.ActiveCfg = Debug|x86 17 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|x86.ActiveCfg = Debug|x86 18 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Debug|x86.Build.0 = Debug|x86 19 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|Any CPU.ActiveCfg = Release|x86 20 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|x86.ActiveCfg = Release|x86 21 | {7C7E83DB-47B5-476D-9F0D-151F01051E07}.Release|x86.Build.0 = Release|x86 22 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|x86.ActiveCfg = Debug|x86 25 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Debug|x86.Build.0 = Debug|x86 26 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|x86.ActiveCfg = Release|x86 29 | {8001E34A-3D13-4579-AD8A-B3B1981486FC}.Release|x86.Build.0 = Release|x86 30 | EndGlobalSection 31 | GlobalSection(SolutionProperties) = preSolution 32 | HideSolutionNode = FALSE 33 | EndGlobalSection 34 | EndGlobal 35 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/OtherInfoCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class OtherInfoCommand : Command 26 | { 27 | private string _info = ""; 28 | 29 | public OtherInfoCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INFO ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _info = a.Replace("%1INFO=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "Info: " + _info; 55 | return toRet; 56 | } 57 | 58 | public string Info 59 | { 60 | get { return _info; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/ProductNameCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ProductNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ProductNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INF2 ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _name = a.Replace("%1INF2=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "ProductName: " + _name; 55 | return toRet; 56 | } 57 | 58 | public string ProductName 59 | { 60 | get { return _name; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/ManufacturerNameCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ManufacturerNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ManufacturerNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INF1 ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _name = a.Replace("%1INF1=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "Manufacturer: " + _name; 55 | return toRet; 56 | } 57 | 58 | public string Manufacturer 59 | { 60 | get { return _name; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/84/84e63f732da97e4470d6efb13ffb09256284e03c.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class OtherInfoCommand : Command 26 | { 27 | private string _info = ""; 28 | 29 | public OtherInfoCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INFO ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _info = a.Replace("%1INFO=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "Info: " + _info; 55 | return toRet; 56 | } 57 | 58 | public string Info 59 | { 60 | get { return _info; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/e9/e9b4ac05e276bf649d546d39829cc7708a198f5b.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ProductNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ProductNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INF2 ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _name = a.Replace("%1INF2=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "ProductName: " + _name; 55 | return toRet; 56 | } 57 | 58 | public string ProductName 59 | { 60 | get { return _name; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/df/dfadc93a1499a923c7a8aff1a7fcdf40a0def54e.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ManufacturerNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ManufacturerNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1INF1 ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | _name = a.Replace("%1INF1=", ""); 47 | 48 | return true; 49 | } 50 | 51 | 52 | public override string dumpToString() 53 | { 54 | string toRet = "Manufacturer: " + _name; 55 | return toRet; 56 | } 57 | 58 | public string Manufacturer 59 | { 60 | get { return _name; } 61 | } 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/ProjectorNameCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ProjectorNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ProjectorNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1NAME ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | a = a.Replace("%1NAME=", ""); 47 | 48 | byte[] dec = Encoding.ASCII.GetBytes(a); 49 | _name = Encoding.UTF8.GetString(dec); 50 | 51 | return true; 52 | } 53 | 54 | 55 | public override string dumpToString() 56 | { 57 | return "Name: " + _name; 58 | } 59 | 60 | public string Name 61 | { 62 | get { return _name; } 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/ce/cee92f5e0a1a2be52587fa6b3165913f8ade8b7d.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ProjectorNameCommand : Command 26 | { 27 | private string _name = ""; 28 | 29 | public ProjectorNameCommand() 30 | { 31 | 32 | } 33 | 34 | internal override string getCommandString() 35 | { 36 | return "%1NAME ?"; 37 | } 38 | 39 | internal override bool processAnswerString(string a) 40 | { 41 | if (!base.processAnswerString(a)) 42 | { 43 | return false; 44 | } 45 | 46 | a = a.Replace("%1NAME=", ""); 47 | 48 | byte[] dec = Encoding.ASCII.GetBytes(a); 49 | _name = Encoding.UTF8.GetString(dec); 50 | 51 | return true; 52 | } 53 | 54 | 55 | public override string dumpToString() 56 | { 57 | return "Name: " + _name; 58 | } 59 | 60 | public string Name 61 | { 62 | get { return _name; } 63 | } 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/Command.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class Command 26 | { 27 | public delegate void CommandResultHandler(Command sender, Response response); 28 | 29 | protected Response _cmdResponse; 30 | 31 | public enum Response 32 | { 33 | SUCCESS, 34 | UNDEFINED_CMD, 35 | OUT_OF_PARAMETER, 36 | UNVAILABLE_TIME, 37 | PROJECTOR_FAILURE, 38 | AUTH_FAILURE, 39 | COMMUNICATION_ERROR 40 | } 41 | 42 | internal virtual string getCommandString(){ 43 | //NOOP 44 | return ""; 45 | } 46 | 47 | internal virtual bool processAnswerString(string a) 48 | { 49 | 50 | if (a.IndexOf("=ERR1") >= 0) 51 | _cmdResponse = Response.UNDEFINED_CMD; 52 | else if (a.IndexOf("=ERR2") >= 0) 53 | _cmdResponse = Response.UNDEFINED_CMD; 54 | else if (a.IndexOf("=ERR3") >= 0) 55 | _cmdResponse = Response.UNVAILABLE_TIME; 56 | else if (a.IndexOf("=ERR4") >= 0) 57 | _cmdResponse = Response.PROJECTOR_FAILURE; 58 | else if (a.IndexOf(" ERRA") >= 0) 59 | _cmdResponse = Response.AUTH_FAILURE; 60 | else //OK or query answer... 61 | _cmdResponse = Response.SUCCESS; 62 | 63 | return _cmdResponse == Response.SUCCESS; 64 | } 65 | 66 | public Response CmdResponse 67 | { 68 | get { return _cmdResponse; } 69 | } 70 | 71 | public virtual string dumpToString() 72 | { 73 | return ""; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/53/537f08bfb4a8c6d4f73d9d6d253a3a7b0677ab22.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class Command 26 | { 27 | public delegate void CommandResultHandler(Command sender, Response response); 28 | 29 | protected Response _cmdResponse; 30 | 31 | public enum Response 32 | { 33 | SUCCESS, 34 | UNDEFINED_CMD, 35 | OUT_OF_PARAMETER, 36 | UNVAILABLE_TIME, 37 | PROJECTOR_FAILURE, 38 | AUTH_FAILURE, 39 | COMMUNICATION_ERROR 40 | } 41 | 42 | internal virtual string getCommandString(){ 43 | //NOOP 44 | return ""; 45 | } 46 | 47 | internal virtual bool processAnswerString(string a) 48 | { 49 | 50 | if (a.IndexOf("=ERR1") >= 0) 51 | _cmdResponse = Response.UNDEFINED_CMD; 52 | else if (a.IndexOf("=ERR2") >= 0) 53 | _cmdResponse = Response.UNDEFINED_CMD; 54 | else if (a.IndexOf("=ERR3") >= 0) 55 | _cmdResponse = Response.UNVAILABLE_TIME; 56 | else if (a.IndexOf("=ERR4") >= 0) 57 | _cmdResponse = Response.PROJECTOR_FAILURE; 58 | else if (a.IndexOf(" ERRA") >= 0) 59 | _cmdResponse = Response.AUTH_FAILURE; 60 | else //OK or query answer... 61 | _cmdResponse = Response.SUCCESS; 62 | 63 | return _cmdResponse == Response.SUCCESS; 64 | } 65 | 66 | public Response CmdResponse 67 | { 68 | get { return _cmdResponse; } 69 | } 70 | 71 | public virtual string dumpToString() 72 | { 73 | return ""; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.296 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ProjectorControl.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ProjectorControl.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/InputCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class InputCommand : Command 26 | { 27 | private InputType _type = InputType.UNKNOWN; 28 | private int _port = -1; 29 | 30 | public enum InputType 31 | { 32 | UNKNOWN, 33 | RGB, 34 | VIDEO, 35 | DIGITAL, 36 | STORAGE, 37 | NETWORK 38 | } 39 | 40 | ///ports start with 1 !!! 41 | public InputCommand(InputType type, int port) 42 | { 43 | _type = type; 44 | _port = port; 45 | } 46 | 47 | ///Query 48 | public InputCommand() 49 | { 50 | 51 | } 52 | 53 | internal override string getCommandString() 54 | { 55 | string cmdString = "%1INPT "; 56 | 57 | if(_port > 0){ 58 | cmdString += ((int)_type).ToString() + _port.ToString(); 59 | } 60 | else{ 61 | cmdString += "?"; 62 | } 63 | 64 | return cmdString; 65 | } 66 | 67 | internal override bool processAnswerString(string a) 68 | { 69 | if (!base.processAnswerString(a)) 70 | return false; 71 | 72 | if(_port < 0) 73 | { 74 | a = a.Replace("%1INPT=", ""); 75 | int retVal = int.Parse(a); 76 | 77 | _type = (InputType)(retVal / 10); 78 | _port = retVal % 10; 79 | } 80 | 81 | return true; 82 | } 83 | 84 | 85 | public InputType Input 86 | { 87 | get { return _type; } 88 | } 89 | 90 | public int Port 91 | { 92 | get { return _port; } 93 | } 94 | 95 | public override string dumpToString() 96 | { 97 | string toRet = "Input: " + _type.ToString()+_port.ToString(); 98 | return toRet; 99 | } 100 | 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/PowerCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class PowerCommand : Command 26 | { 27 | private PowerStatus _status = PowerStatus.UNKNOWN; 28 | private Power _cmdDetail; 29 | 30 | public enum Power 31 | { 32 | QUERY, 33 | ON, 34 | OFF 35 | } 36 | 37 | public enum PowerStatus 38 | { 39 | OFF, 40 | ON, 41 | COOLING, 42 | WARMUP, 43 | UNKNOWN 44 | } 45 | 46 | public PowerCommand(Power cmd) 47 | { 48 | _cmdDetail = cmd; 49 | } 50 | 51 | internal override string getCommandString() 52 | { 53 | string cmdString = "%1POWR "; 54 | 55 | switch(_cmdDetail){ 56 | 57 | case Power.QUERY: 58 | cmdString += "?"; 59 | break; 60 | case Power.OFF: 61 | cmdString += "0"; 62 | break; 63 | case Power.ON: 64 | cmdString += "1"; 65 | break; 66 | } 67 | 68 | return cmdString; 69 | } 70 | 71 | internal override bool processAnswerString(string a) 72 | { 73 | if (!base.processAnswerString(a)) 74 | { 75 | _status = PowerStatus.UNKNOWN; 76 | return false; 77 | } 78 | 79 | if(_cmdDetail == Power.QUERY){ 80 | a = a.Replace("%1POWR=", ""); 81 | int retVal = int.Parse(a); 82 | if (retVal >= (int)PowerStatus.OFF && retVal <= (int)PowerStatus.WARMUP) 83 | _status = (PowerStatus)(retVal); 84 | else 85 | _status = PowerStatus.UNKNOWN; 86 | } 87 | 88 | return true; 89 | } 90 | 91 | 92 | public PowerStatus Status 93 | { 94 | get { return _status; } 95 | } 96 | 97 | 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/b8/b8a968cbe883af736d7f3a729d25ca8ac5c6d64f.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class InputCommand : Command 26 | { 27 | private InputType _type = InputType.UNKNOWN; 28 | private int _port = -1; 29 | 30 | public enum InputType 31 | { 32 | UNKNOWN, 33 | RGB, 34 | VIDEO, 35 | DIGITAL, 36 | STORAGE, 37 | NETWORK 38 | } 39 | 40 | ///ports start with 1 !!! 41 | public InputCommand(InputType type, int port) 42 | { 43 | _type = type; 44 | _port = port; 45 | } 46 | 47 | ///Query 48 | public InputCommand() 49 | { 50 | 51 | } 52 | 53 | internal override string getCommandString() 54 | { 55 | string cmdString = "%1INPT "; 56 | 57 | if(_port > 0){ 58 | cmdString += ((int)_type).ToString() + _port.ToString(); 59 | } 60 | else{ 61 | cmdString += "?"; 62 | } 63 | 64 | return cmdString; 65 | } 66 | 67 | internal override bool processAnswerString(string a) 68 | { 69 | if (!base.processAnswerString(a)) 70 | return false; 71 | 72 | if(_port < 0) 73 | { 74 | a = a.Replace("%1INPT=", ""); 75 | int retVal = int.Parse(a); 76 | 77 | _type = (InputType)(retVal / 10); 78 | _port = retVal % 10; 79 | } 80 | 81 | return true; 82 | } 83 | 84 | 85 | public InputType Input 86 | { 87 | get { return _type; } 88 | } 89 | 90 | public int Port 91 | { 92 | get { return _port; } 93 | } 94 | 95 | public override string dumpToString() 96 | { 97 | string toRet = "Input: " + _type.ToString()+_port.ToString(); 98 | return toRet; 99 | } 100 | 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/dc/dc457fe6ce22b8ac9f8410ecc622e1705ab03c4e.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class PowerCommand : Command 26 | { 27 | private PowerStatus _status = PowerStatus.UNKNOWN; 28 | private Power _cmdDetail; 29 | 30 | public enum Power 31 | { 32 | QUERY, 33 | ON, 34 | OFF 35 | } 36 | 37 | public enum PowerStatus 38 | { 39 | OFF, 40 | ON, 41 | COOLING, 42 | WARMUP, 43 | UNKNOWN 44 | } 45 | 46 | public PowerCommand(Power cmd) 47 | { 48 | _cmdDetail = cmd; 49 | } 50 | 51 | internal override string getCommandString() 52 | { 53 | string cmdString = "%1POWR "; 54 | 55 | switch(_cmdDetail){ 56 | 57 | case Power.QUERY: 58 | cmdString += "?"; 59 | break; 60 | case Power.OFF: 61 | cmdString += "0"; 62 | break; 63 | case Power.ON: 64 | cmdString += "1"; 65 | break; 66 | } 67 | 68 | return cmdString; 69 | } 70 | 71 | internal override bool processAnswerString(string a) 72 | { 73 | if (!base.processAnswerString(a)) 74 | { 75 | _status = PowerStatus.UNKNOWN; 76 | return false; 77 | } 78 | 79 | if(_cmdDetail == Power.QUERY){ 80 | a = a.Replace("%1POWR=", ""); 81 | int retVal = int.Parse(a); 82 | if (retVal >= (int)PowerStatus.OFF && retVal <= (int)PowerStatus.WARMUP) 83 | _status = (PowerStatus)(retVal); 84 | else 85 | _status = PowerStatus.UNKNOWN; 86 | } 87 | 88 | return true; 89 | } 90 | 91 | 92 | public PowerStatus Status 93 | { 94 | get { return _status; } 95 | } 96 | 97 | 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/LampStatusCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class LampStatusCommand : Command 26 | { 27 | public enum Status 28 | { 29 | OFF, 30 | ON, 31 | UNKNOWN 32 | } 33 | 34 | private List _status = new List(); 35 | private List _hours = new List(); 36 | 37 | public LampStatusCommand() 38 | { 39 | 40 | } 41 | 42 | internal override string getCommandString() 43 | { 44 | return "%1LAMP ?"; 45 | } 46 | 47 | internal override bool processAnswerString(string a) 48 | { 49 | if (!base.processAnswerString(a)) 50 | { 51 | return false; 52 | } 53 | 54 | a = a.Replace("%1LAMP=", ""); 55 | 56 | string [] arr = a.Split(' '); 57 | for (int i = 0; i < arr.Length; i+=2) 58 | { 59 | _hours.Add(int.Parse(arr[i])); 60 | _status.Add((Status)(int.Parse(arr[i + 1]))); 61 | } 62 | 63 | return true; 64 | } 65 | 66 | public List StatusList 67 | { 68 | get { return _status; } 69 | } 70 | 71 | public List HoursList 72 | { 73 | get { return _hours; } 74 | } 75 | 76 | public int NumOfLamps{ 77 | get { return _hours.Count; } 78 | } 79 | 80 | public Status getStatusOfLamp(int l) 81 | { 82 | if (l < NumOfLamps) 83 | return _status[l]; 84 | return Status.UNKNOWN; 85 | } 86 | 87 | public int getHoursOfLamp(int l) 88 | { 89 | if (l < NumOfLamps) 90 | return _hours[l]; 91 | return -1; 92 | } 93 | 94 | public override string dumpToString() 95 | { 96 | string toRet = ""; 97 | 98 | toRet += "Num of Lamps: " + NumOfLamps.ToString(); 99 | for (int i = 0; i < NumOfLamps; ++i) { 100 | toRet += "\n Lamp " + i.ToString() + ": " + _status[i].ToString() + "(" + _hours[i].ToString() + "h)"; 101 | } 102 | 103 | return toRet; 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/c9/c9f86e9d1fb81e164069ce4a0caeed9b314346a5.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class LampStatusCommand : Command 26 | { 27 | public enum Status 28 | { 29 | OFF, 30 | ON, 31 | UNKNOWN 32 | } 33 | 34 | private List _status = new List(); 35 | private List _hours = new List(); 36 | 37 | public LampStatusCommand() 38 | { 39 | 40 | } 41 | 42 | internal override string getCommandString() 43 | { 44 | return "%1LAMP ?"; 45 | } 46 | 47 | internal override bool processAnswerString(string a) 48 | { 49 | if (!base.processAnswerString(a)) 50 | { 51 | return false; 52 | } 53 | 54 | a = a.Replace("%1LAMP=", ""); 55 | 56 | string [] arr = a.Split(' '); 57 | for (int i = 0; i < arr.Length; i+=2) 58 | { 59 | _hours.Add(int.Parse(arr[i])); 60 | _status.Add((Status)(int.Parse(arr[i + 1]))); 61 | } 62 | 63 | return true; 64 | } 65 | 66 | public List StatusList 67 | { 68 | get { return _status; } 69 | } 70 | 71 | public List HoursList 72 | { 73 | get { return _hours; } 74 | } 75 | 76 | public int NumOfLamps{ 77 | get { return _hours.Count; } 78 | } 79 | 80 | public Status getStatusOfLamp(int l) 81 | { 82 | if (l < NumOfLamps) 83 | return _status[l]; 84 | return Status.UNKNOWN; 85 | } 86 | 87 | public int getHoursOfLamp(int l) 88 | { 89 | if (l < NumOfLamps) 90 | return _hours[l]; 91 | return -1; 92 | } 93 | 94 | public override string dumpToString() 95 | { 96 | string toRet = ""; 97 | 98 | toRet += "Num of Lamps: " + NumOfLamps.ToString(); 99 | for (int i = 0; i < NumOfLamps; ++i) { 100 | toRet += "\n Lamp " + i.ToString() + ": " + _status[i].ToString() + "(" + _hours[i].ToString() + "h)"; 101 | } 102 | 103 | return toRet; 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/35/357c1d525eeba45e1813f20ba154e92022140d51.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {8001E34A-3D13-4579-AD8A-B3B1981486FC} 9 | Exe 10 | Properties 11 | ConsoleApplication1 12 | ConsoleApplication1 13 | v3.5 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | true 35 | bin\x86\Debug\ 36 | DEBUG;TRACE 37 | full 38 | x86 39 | prompt 40 | 41 | 42 | bin\x86\Release\ 43 | TRACE 44 | true 45 | pdbonly 46 | x86 47 | prompt 48 | 49 | 50 | 51 | 52 | 3.5 53 | 54 | 55 | 3.5 56 | 57 | 58 | 3.5 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | {7C7E83DB-47B5-476D-9F0D-151F01051E07} 70 | PJLink 71 | 72 | 73 | 74 | 81 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/Example/Example.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {8001E34A-3D13-4579-AD8A-B3B1981486FC} 9 | Exe 10 | Properties 11 | ConsoleApplication1 12 | ConsoleApplication1 13 | v4.0 14 | 512 15 | 16 | 17 | 18 | 19 | 3.5 20 | 21 | 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | 30 | 31 | pdbonly 32 | true 33 | bin\Release\ 34 | TRACE 35 | prompt 36 | 4 37 | 38 | 39 | true 40 | bin\x86\Debug\ 41 | DEBUG;TRACE 42 | full 43 | x86 44 | prompt 45 | 46 | 47 | bin\x86\Release\ 48 | TRACE 49 | true 50 | pdbonly 51 | x86 52 | prompt 53 | 54 | 55 | 56 | 57 | 3.5 58 | 59 | 60 | 3.5 61 | 62 | 63 | 3.5 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | {7C7E83DB-47B5-476D-9F0D-151F01051E07} 75 | PJLink 76 | 77 | 78 | 79 | 86 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/ErrorStatusCommand.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ErrorStatusCommand : Command 26 | { 27 | public enum Status 28 | { 29 | OK, 30 | WARNING, 31 | ERROR, 32 | UNKNOWN 33 | } 34 | 35 | public enum SysComponent 36 | { 37 | FAN, 38 | LAMP, 39 | TEMP, 40 | COVER, 41 | FILTER, 42 | OTHER 43 | } 44 | 45 | private List _status = new List(6); 46 | 47 | public ErrorStatusCommand() 48 | { 49 | for (int i = 0; i < 6; ++i) 50 | _status.Add(Status.UNKNOWN); 51 | } 52 | 53 | internal override string getCommandString() 54 | { 55 | return "%1ERST ?"; 56 | } 57 | 58 | internal override bool processAnswerString(string a) 59 | { 60 | if (!base.processAnswerString(a)) 61 | { 62 | return false; 63 | } 64 | 65 | a = a.Replace("%1ERST=", ""); 66 | for (int i = 0; i < a.Length; ++i ) 67 | { 68 | _status[i] = (Status)int.Parse(a[i].ToString()); 69 | } 70 | 71 | return true; 72 | } 73 | 74 | public List StatusList 75 | { 76 | get { return _status; } 77 | } 78 | 79 | public Status FanStatus 80 | { 81 | get { return _status[(int)SysComponent.FAN]; } 82 | } 83 | 84 | public Status LampStatus 85 | { 86 | get { return _status[(int)SysComponent.LAMP]; } 87 | } 88 | 89 | public Status TempStatus 90 | { 91 | get { return _status[(int)SysComponent.TEMP]; } 92 | } 93 | 94 | public Status CoverStatus 95 | { 96 | get { return _status[(int)SysComponent.COVER]; } 97 | } 98 | 99 | public Status FilterStatus 100 | { 101 | get { return _status[(int)SysComponent.FILTER]; } 102 | } 103 | 104 | public Status OtherStatus 105 | { 106 | get { return _status[(int)SysComponent.OTHER]; } 107 | } 108 | 109 | public override string dumpToString() 110 | { 111 | string toRet = ""; 112 | 113 | toRet += "Fan: " + FanStatus.ToString(); 114 | toRet += "\nLamp: " + LampStatus.ToString(); 115 | toRet += "\nTemp: " + TempStatus.ToString(); 116 | toRet += "\nCover: " + CoverStatus.ToString(); 117 | toRet += "\nFilter: " + FilterStatus.ToString(); 118 | toRet += "\nOther: " + OtherStatus.ToString(); 119 | return toRet; 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/f9/f9499207b2b7a8760af43e475ab077f4fcd302d3.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | 23 | namespace rv 24 | { 25 | public class ErrorStatusCommand : Command 26 | { 27 | public enum Status 28 | { 29 | OK, 30 | WARNING, 31 | ERROR, 32 | UNKNOWN 33 | } 34 | 35 | public enum SysComponent 36 | { 37 | FAN, 38 | LAMP, 39 | TEMP, 40 | COVER, 41 | FILTER, 42 | OTHER 43 | } 44 | 45 | private List _status = new List(6); 46 | 47 | public ErrorStatusCommand() 48 | { 49 | for (int i = 0; i < 6; ++i) 50 | _status.Add(Status.UNKNOWN); 51 | } 52 | 53 | internal override string getCommandString() 54 | { 55 | return "%1ERST ?"; 56 | } 57 | 58 | internal override bool processAnswerString(string a) 59 | { 60 | if (!base.processAnswerString(a)) 61 | { 62 | return false; 63 | } 64 | 65 | a = a.Replace("%1ERST=", ""); 66 | for (int i = 0; i < a.Length; ++i ) 67 | { 68 | _status[i] = (Status)int.Parse(a[i].ToString()); 69 | } 70 | 71 | return true; 72 | } 73 | 74 | public List StatusList 75 | { 76 | get { return _status; } 77 | } 78 | 79 | public Status FanStatus 80 | { 81 | get { return _status[(int)SysComponent.FAN]; } 82 | } 83 | 84 | public Status LampStatus 85 | { 86 | get { return _status[(int)SysComponent.LAMP]; } 87 | } 88 | 89 | public Status TempStatus 90 | { 91 | get { return _status[(int)SysComponent.TEMP]; } 92 | } 93 | 94 | public Status CoverStatus 95 | { 96 | get { return _status[(int)SysComponent.COVER]; } 97 | } 98 | 99 | public Status FilterStatus 100 | { 101 | get { return _status[(int)SysComponent.FILTER]; } 102 | } 103 | 104 | public Status OtherStatus 105 | { 106 | get { return _status[(int)SysComponent.OTHER]; } 107 | } 108 | 109 | public override string dumpToString() 110 | { 111 | string toRet = ""; 112 | 113 | toRet += "Fan: " + FanStatus.ToString(); 114 | toRet += "\nLamp: " + LampStatus.ToString(); 115 | toRet += "\nTemp: " + TempStatus.ToString(); 116 | toRet += "\nCover: " + CoverStatus.ToString(); 117 | toRet += "\nFilter: " + FilterStatus.ToString(); 118 | toRet += "\nOther: " + OtherStatus.ToString(); 119 | return toRet; 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/Example/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using System.Net.Sockets; 7 | using System.IO; 8 | using System.Security.Cryptography; 9 | using rv; 10 | 11 | namespace ConsoleApplication1 12 | { 13 | class Program 14 | { 15 | static void Main(string[] args) 16 | { 17 | PJLinkConnection c = new PJLinkConnection("192.168.1.14", "rv"); 18 | 19 | //shortcuts 20 | //c.turnOn(); 21 | //System.Console.WriteLine(c.getProjectorInfo()); 22 | 23 | //detailed command calls 24 | 25 | //PowerCommand pc1 = new PowerCommand(PowerCommand.Powr.QUERY); 26 | //if (c.sendCommand(pc1) == Command.Response.SUCCESS) 27 | // Console.WriteLine("Projector is " + pc1.Status.ToString()); 28 | //else 29 | // Console.WriteLine("Communication Error"); 30 | 31 | //PowerCommand pc2 = new PowerCommand(PowerCommand.Powr.ON); 32 | //if (c.sendCommand(pc2) == Command.Response.SUCCESS) 33 | // Console.WriteLine("Switching on successful"); 34 | //else 35 | // Console.WriteLine("Communication Error"); 36 | 37 | //PowerCommand pc3 = new PowerCommand(PowerCommand.Powr.QUERY); 38 | //if (c.sendCommand(pc3) == Command.Response.SUCCESS) 39 | // Console.WriteLine("Projector is " + pc3.Status.ToString()); 40 | //else 41 | // Console.WriteLine("Communication Error"); 42 | 43 | //ErrorStatusCommand esc = new ErrorStatusCommand(); 44 | //if (c.sendCommand(esc) == Command.Response.SUCCESS) 45 | // Console.WriteLine(esc.dumpToString()); 46 | //else 47 | // Console.WriteLine("Communication Error"); 48 | 49 | //LampStatusCommand lsc = new LampStatusCommand(); 50 | //if (c.sendCommand(lsc) == Command.Response.SUCCESS) 51 | // Console.WriteLine(lsc.dumpToString()); 52 | //else 53 | // Console.WriteLine("Communication Error"); 54 | 55 | //ProjectorNameCommand pnc = new ProjectorNameCommand(); 56 | //if (c.sendCommand(pnc) == Command.Response.SUCCESS) 57 | // Console.WriteLine(pnc.dumpToString()); 58 | //else 59 | // Console.WriteLine("Communication Error"); 60 | 61 | //ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 62 | //if (c.sendCommand(mnc) == Command.Response.SUCCESS) 63 | // Console.WriteLine(mnc.dumpToString()); 64 | //else 65 | // Console.WriteLine("Communication Error"); 66 | 67 | //ProductNameCommand prnc = new ProductNameCommand(); 68 | //if (c.sendCommand(prnc) == Command.Response.SUCCESS) 69 | // Console.WriteLine(prnc.dumpToString()); 70 | //else 71 | // Console.WriteLine("Communication Error"); 72 | 73 | //OtherInfoCommand oic = new OtherInfoCommand(); 74 | //if (c.sendCommand(oic) == Command.Response.SUCCESS) 75 | // Console.WriteLine(oic.dumpToString()); 76 | //else 77 | // Console.WriteLine("Communication Error"); 78 | 79 | //InputCommand ic1 = new InputCommand(); 80 | //if (c.sendCommand(ic1) == Command.Response.SUCCESS) 81 | // Console.WriteLine(ic1.dumpToString()); 82 | //else 83 | // Console.WriteLine("Communication Error"); 84 | 85 | //InputCommand ic2 = new InputCommand(InputCommand.InputType.RGB, 2); 86 | //if (c.sendCommand(ic2) == Command.Response.SUCCESS) 87 | // Console.WriteLine(ic2.dumpToString()); 88 | //else 89 | // Console.WriteLine("Communication Error"); 90 | 91 | ProjectorInfo pi = ProjectorInfo.create(c); 92 | string s = pi.toXmlString(); 93 | Console.WriteLine(s); 94 | 95 | Console.ReadKey(); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/8e/8eaea99f5f7a589474880dded7b590e36da84d26.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Net; 6 | using System.Net.Sockets; 7 | using System.IO; 8 | using System.Security.Cryptography; 9 | using rv; 10 | 11 | namespace ConsoleApplication1 12 | { 13 | class Program 14 | { 15 | static void Main(string[] args) 16 | { 17 | PJLinkConnection c = new PJLinkConnection("192.168.1.14", "rv"); 18 | 19 | //shortcuts 20 | //c.turnOn(); 21 | //System.Console.WriteLine(c.getProjectorInfo()); 22 | 23 | //detailed command calls 24 | 25 | //PowerCommand pc1 = new PowerCommand(PowerCommand.Powr.QUERY); 26 | //if (c.sendCommand(pc1) == Command.Response.SUCCESS) 27 | // Console.WriteLine("Projector is " + pc1.Status.ToString()); 28 | //else 29 | // Console.WriteLine("Communication Error"); 30 | 31 | //PowerCommand pc2 = new PowerCommand(PowerCommand.Powr.ON); 32 | //if (c.sendCommand(pc2) == Command.Response.SUCCESS) 33 | // Console.WriteLine("Switching on successful"); 34 | //else 35 | // Console.WriteLine("Communication Error"); 36 | 37 | //PowerCommand pc3 = new PowerCommand(PowerCommand.Powr.QUERY); 38 | //if (c.sendCommand(pc3) == Command.Response.SUCCESS) 39 | // Console.WriteLine("Projector is " + pc3.Status.ToString()); 40 | //else 41 | // Console.WriteLine("Communication Error"); 42 | 43 | //ErrorStatusCommand esc = new ErrorStatusCommand(); 44 | //if (c.sendCommand(esc) == Command.Response.SUCCESS) 45 | // Console.WriteLine(esc.dumpToString()); 46 | //else 47 | // Console.WriteLine("Communication Error"); 48 | 49 | //LampStatusCommand lsc = new LampStatusCommand(); 50 | //if (c.sendCommand(lsc) == Command.Response.SUCCESS) 51 | // Console.WriteLine(lsc.dumpToString()); 52 | //else 53 | // Console.WriteLine("Communication Error"); 54 | 55 | //ProjectorNameCommand pnc = new ProjectorNameCommand(); 56 | //if (c.sendCommand(pnc) == Command.Response.SUCCESS) 57 | // Console.WriteLine(pnc.dumpToString()); 58 | //else 59 | // Console.WriteLine("Communication Error"); 60 | 61 | //ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 62 | //if (c.sendCommand(mnc) == Command.Response.SUCCESS) 63 | // Console.WriteLine(mnc.dumpToString()); 64 | //else 65 | // Console.WriteLine("Communication Error"); 66 | 67 | //ProductNameCommand prnc = new ProductNameCommand(); 68 | //if (c.sendCommand(prnc) == Command.Response.SUCCESS) 69 | // Console.WriteLine(prnc.dumpToString()); 70 | //else 71 | // Console.WriteLine("Communication Error"); 72 | 73 | //OtherInfoCommand oic = new OtherInfoCommand(); 74 | //if (c.sendCommand(oic) == Command.Response.SUCCESS) 75 | // Console.WriteLine(oic.dumpToString()); 76 | //else 77 | // Console.WriteLine("Communication Error"); 78 | 79 | //InputCommand ic1 = new InputCommand(); 80 | //if (c.sendCommand(ic1) == Command.Response.SUCCESS) 81 | // Console.WriteLine(ic1.dumpToString()); 82 | //else 83 | // Console.WriteLine("Communication Error"); 84 | 85 | //InputCommand ic2 = new InputCommand(InputCommand.InputType.RGB, 2); 86 | //if (c.sendCommand(ic2) == Command.Response.SUCCESS) 87 | // Console.WriteLine(ic2.dumpToString()); 88 | //else 89 | // Console.WriteLine("Communication Error"); 90 | 91 | ProjectorInfo pi = ProjectorInfo.create(c); 92 | string s = pi.toXmlString(); 93 | Console.WriteLine(s); 94 | 95 | Console.ReadKey(); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Net; 10 | using System.Net.Sockets; 11 | using System.IO; 12 | using System.Security.Cryptography; 13 | using System.Text.RegularExpressions; 14 | 15 | 16 | using rv; 17 | 18 | 19 | namespace ProjectorControl 20 | { 21 | public partial class Form1 : Form 22 | { 23 | public PJLinkConnection c = null; 24 | 25 | public Form1() 26 | { 27 | InitializeComponent(); 28 | 29 | 30 | Status.Text = "Program Started"; 31 | 32 | } 33 | 34 | 35 | 36 | private void On_Click(object sender, EventArgs e) 37 | { 38 | //turn on, update status 39 | Status.Text = "Turning Projector On"; 40 | c.turnOn(); 41 | Status.Text = "Projector is now:" + c.powerQuery().ToString(); 42 | 43 | } 44 | 45 | private void Off_Click(object sender, EventArgs e) 46 | { 47 | //turn off, update status 48 | Status.Text = "Turning Projector Off"; 49 | c.turnOff(); 50 | Status.Text = "Projector is now:" + c.powerQuery().ToString(); 51 | } 52 | 53 | 54 | 55 | 56 | private void ipAddress_TextChanged(object sender, EventArgs e) 57 | { 58 | Status.Text = "New Address Set"; 59 | } 60 | 61 | private void connect_Click(object sender, EventArgs e) 62 | { 63 | 64 | System.Net.IPAddress address = null; 65 | 66 | if (System.Net.IPAddress.TryParse(ipAddress.Text, out address)) 67 | { 68 | Status.Text = "Connecting to " + address.ToString(); 69 | c = new PJLinkConnection(ipAddress.Text, "JBMIAProjectorLink"); 70 | 71 | LampStatusCommand l = new LampStatusCommand(); 72 | int hours = l.getHoursOfLamp(1); 73 | string status = l.getStatusOfLamp(1).ToString(); 74 | string power = c.powerQuery().ToString(); 75 | ProjectorInfo pi = new ProjectorInfo(); 76 | Status.Text = "Connected. \n Projector is now: " + power + "\n" + "\nstatus: " + status + "\nlamphours: " + hours; 77 | Status.Text += "\nFan:" + pi.FanStatus; 78 | Status.Text += " Lamp:" + pi.LampStatus; 79 | Status.Text += " Input:" + pi.Input; 80 | Status.Text += "\nCover:" + pi.CoverStatus; 81 | Status.Text += " Filter:" + pi.FilterStatus; 82 | Status.Text += " NumLamps:" + pi.NumOfLamps; 83 | Status.Text += "\nOthers:" + pi.PowerStatus; 84 | 85 | 86 | 87 | 88 | 89 | } 90 | else 91 | { 92 | Status.Text = "Invalid IP Address Entered"; 93 | } 94 | 95 | 96 | 97 | } 98 | 99 | 100 | 101 | private void Form1_FormClosed(object sender, FormClosedEventArgs e) 102 | { 103 | //c.sendCommand( 104 | } 105 | 106 | 107 | private void change_Input(rv.InputCommand.InputType x, int i) 108 | { 109 | InputCommand ic2 = new InputCommand(x, i); 110 | 111 | if (c.sendCommand(ic2) == Command.Response.SUCCESS) 112 | Console.WriteLine(ic2.dumpToString()); 113 | else 114 | Console.WriteLine("Communication Error"); 115 | 116 | } 117 | 118 | private void button_video_Click(object sender, EventArgs e) 119 | { 120 | change_Input(InputCommand.InputType.VIDEO,1); 121 | } 122 | 123 | private void button_vga_Click(object sender, EventArgs e) 124 | { 125 | change_Input(InputCommand.InputType.RGB,1); 126 | } 127 | 128 | private void button_digital_Click(object sender, EventArgs e) 129 | { 130 | change_Input(InputCommand.InputType.DIGITAL, 1); 131 | } 132 | 133 | private void button_network_Click(object sender, EventArgs e) 134 | { 135 | change_Input(InputCommand.InputType.NETWORK, 1); 136 | } 137 | 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/PJLink.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {7C7E83DB-47B5-476D-9F0D-151F01051E07} 9 | Library 10 | Properties 11 | rv 12 | PJLink 13 | v3.5 14 | 512 15 | 16 | 17 | 3.5 18 | 19 | 20 | 21 | true 22 | bin\x86\Debug\ 23 | DEBUG;TRACE 24 | full 25 | x86 26 | prompt 27 | 28 | 29 | bin\x86\Release\ 30 | 31 | 32 | true 33 | none 34 | x86 35 | prompt 36 | 37 | 38 | true 39 | bin\AnyCPU\Debug\ 40 | DEBUG;TRACE 41 | full 42 | AnyCPU 43 | prompt 44 | true 45 | true 46 | 47 | 48 | bin\Release\ 49 | true 50 | AnyCPU 51 | prompt 52 | false 53 | false 54 | 55 | 56 | true 57 | 58 | 59 | pjlink.snk 60 | 61 | 62 | 63 | 64 | 3.5 65 | 66 | 67 | 3.5 68 | 69 | 70 | 3.5 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/98/983dad6c21948a85df8a51842012293fab7cd806.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | 9.0.30729 7 | 2.0 8 | {7C7E83DB-47B5-476D-9F0D-151F01051E07} 9 | Library 10 | Properties 11 | rv 12 | PJLink 13 | v3.5 14 | 512 15 | 16 | 17 | 3.5 18 | 19 | 20 | 21 | true 22 | bin\x86\Debug\ 23 | DEBUG;TRACE 24 | full 25 | x86 26 | prompt 27 | 28 | 29 | bin\x86\Release\ 30 | 31 | 32 | true 33 | none 34 | x86 35 | prompt 36 | 37 | 38 | true 39 | bin\AnyCPU\Debug\ 40 | DEBUG;TRACE 41 | full 42 | AnyCPU 43 | prompt 44 | true 45 | true 46 | 47 | 48 | bin\Release\ 49 | true 50 | AnyCPU 51 | prompt 52 | false 53 | false 54 | 55 | 56 | true 57 | 58 | 59 | pjlink.snk 60 | 61 | 62 | 63 | 64 | 3.5 65 | 66 | 67 | 3.5 68 | 69 | 70 | 3.5 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | -------------------------------------------------------------------------------- /deploy/ProjectorControl/ProjectorControl.application: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | EAJ2Q2Dpsj1CmkVnG8R/sYZn/h8= 19 | 20 | 21 | 22 | YS9hJvBVhJ83sebiEAhh3UnRhaM=dgNZLUnWRJhmdSbQXnV2P7krhBGOpD2UYM7O2RScAxJx6vBPfvD26Fl4h44ir82OxqbFAWzucikIJs180FSTz7JjHI/PmtdqlSPT+YUWNjY2CoWZgDZihy31r5FISgvK16WPbASO481dn5WBNu4qzEzNinqIoAyyqP8ZeH09RZ8=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABCN=bismuth\davidBWJ/Zra0PNK6z3jP4ZLimq5rlZg=UgkRJBZYvSVMsMbqbvgMsSAMwALayRsxqwga7N6+MByrCh2zXqiY5fHP0+xTBYhD4YBmyiHMU0VDD+rbTwf8KfagaHxfVdxre+cMAzLxwtFKBcjdmNdkI6cojuXx6beeQLmQSMzOEXGn+QO+D+2hJ/yz6cETTZoo/MaMaAbZZeY=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABMIIBzTCCATagAwIBAgIQFXSFq+W3wblIj0xcbBa+oDANBgkqhkiG9w0BAQUFADAlMSMwIQYDVQQDHhoAYgBpAHMAbQB1AHQAaABcAGQAYQB2AGkAZDAeFw0xMzAzMDQxMjA0MjhaFw0xNDAzMDQxODA0MjhaMCUxIzAhBgNVBAMeGgBiAGkAcwBtAHUAdABoAFwAZABhAHYAaQBkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEnL065dME64faop6g6NGLcgozDolz58lbSc5cuNlyh6AjNAURBVJCipTa7iRZirYy9SVpQ7mXhxS5g7RkeZhwsgEsRbTWCf21FNurouAB51Rci1XDbgiDFeryFR/VP4LJT1WJkgYES0tWc6QVHfjLgPe+YZMwtITglOKzENzVKQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADWIfv85xjLgSOhI4Q5XeGQrI0zQgt49yzHbbDyJnLHT2KvGLsxbJ/z5oGRIH0Ngh9QlYrDD+FPKV0DpdCe9lxSE5HP8tsEsw+6rhZ3vO416IpXygKzoNpkO3S/mU1296Th6ZWIyYICn5JsfWevS50QD3tzu8NZF1rFXdepDF9pD -------------------------------------------------------------------------------- /deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/ProjectorControl.application: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | EAJ2Q2Dpsj1CmkVnG8R/sYZn/h8= 19 | 20 | 21 | 22 | YS9hJvBVhJ83sebiEAhh3UnRhaM=dgNZLUnWRJhmdSbQXnV2P7krhBGOpD2UYM7O2RScAxJx6vBPfvD26Fl4h44ir82OxqbFAWzucikIJs180FSTz7JjHI/PmtdqlSPT+YUWNjY2CoWZgDZihy31r5FISgvK16WPbASO481dn5WBNu4qzEzNinqIoAyyqP8ZeH09RZ8=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABCN=bismuth\davidBWJ/Zra0PNK6z3jP4ZLimq5rlZg=UgkRJBZYvSVMsMbqbvgMsSAMwALayRsxqwga7N6+MByrCh2zXqiY5fHP0+xTBYhD4YBmyiHMU0VDD+rbTwf8KfagaHxfVdxre+cMAzLxwtFKBcjdmNdkI6cojuXx6beeQLmQSMzOEXGn+QO+D+2hJ/yz6cETTZoo/MaMaAbZZeY=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABMIIBzTCCATagAwIBAgIQFXSFq+W3wblIj0xcbBa+oDANBgkqhkiG9w0BAQUFADAlMSMwIQYDVQQDHhoAYgBpAHMAbQB1AHQAaABcAGQAYQB2AGkAZDAeFw0xMzAzMDQxMjA0MjhaFw0xNDAzMDQxODA0MjhaMCUxIzAhBgNVBAMeGgBiAGkAcwBtAHUAdABoAFwAZABhAHYAaQBkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEnL065dME64faop6g6NGLcgozDolz58lbSc5cuNlyh6AjNAURBVJCipTa7iRZirYy9SVpQ7mXhxS5g7RkeZhwsgEsRbTWCf21FNurouAB51Rci1XDbgiDFeryFR/VP4LJT1WJkgYES0tWc6QVHfjLgPe+YZMwtITglOKzENzVKQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADWIfv85xjLgSOhI4Q5XeGQrI0zQgt49yzHbbDyJnLHT2KvGLsxbJ/z5oGRIH0Ngh9QlYrDD+FPKV0DpdCe9lxSE5HP8tsEsw+6rhZ3vO416IpXygKzoNpkO3S/mU1296Th6ZWIyYICn5JsfWevS50QD3tzu8NZF1rFXdepDF9pD -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | 165 | ## Ignore Visual Studio temporary files, build results, and 166 | ## files generated by popular Visual Studio add-ons. 167 | 168 | # User-specific files 169 | *.suo 170 | *.user 171 | *.sln.docstates 172 | 173 | # Build results 174 | 175 | [Dd]ebug/ 176 | [Rr]elease/ 177 | x64/ 178 | build/ 179 | [Bb]in/ 180 | [Oo]bj/ 181 | 182 | # MSTest test Results 183 | [Tt]est[Rr]esult*/ 184 | [Bb]uild[Ll]og.* 185 | 186 | *_i.c 187 | *_p.c 188 | *.ilk 189 | *.meta 190 | *.obj 191 | *.pch 192 | *.pdb 193 | *.pgc 194 | *.pgd 195 | *.rsp 196 | *.sbr 197 | *.tlb 198 | *.tli 199 | *.tlh 200 | *.tmp 201 | *.tmp_proj 202 | *.log 203 | *.vspscc 204 | *.vssscc 205 | .builds 206 | *.pidb 207 | *.log 208 | *.scc 209 | 210 | # Visual C++ cache files 211 | ipch/ 212 | *.aps 213 | *.ncb 214 | *.opensdf 215 | *.sdf 216 | *.cachefile 217 | 218 | # Visual Studio profiler 219 | *.psess 220 | *.vsp 221 | *.vspx 222 | 223 | # Guidance Automation Toolkit 224 | *.gpState 225 | 226 | # ReSharper is a .NET coding add-in 227 | _ReSharper*/ 228 | *.[Rr]e[Ss]harper 229 | 230 | # TeamCity is a build add-in 231 | _TeamCity* 232 | 233 | # DotCover is a Code Coverage Tool 234 | *.dotCover 235 | 236 | # NCrunch 237 | *.ncrunch* 238 | .*crunch*.local.xml 239 | 240 | # Installshield output folder 241 | [Ee]xpress/ 242 | 243 | # DocProject is a documentation generator add-in 244 | DocProject/buildhelp/ 245 | DocProject/Help/*.HxT 246 | DocProject/Help/*.HxC 247 | DocProject/Help/*.hhc 248 | DocProject/Help/*.hhk 249 | DocProject/Help/*.hhp 250 | DocProject/Help/Html2 251 | DocProject/Help/html 252 | 253 | # Click-Once directory 254 | publish/ 255 | 256 | # Publish Web Output 257 | *.Publish.xml 258 | *.pubxml 259 | 260 | # NuGet Packages Directory 261 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 262 | #packages/ 263 | 264 | # Windows Azure Build Output 265 | csx 266 | *.build.csdef 267 | 268 | # Windows Store app package directory 269 | AppPackages/ 270 | 271 | # Others 272 | sql/ 273 | *.Cache 274 | ClientBin/ 275 | [Ss]tyle[Cc]op.* 276 | ~$* 277 | *~ 278 | *.dbmdl 279 | *.[Pp]ublish.xml 280 | *.pfx 281 | *.publishsettings 282 | 283 | # RIA/Silverlight projects 284 | Generated_Code/ 285 | 286 | # Backup & report files from converting an old project file to a newer 287 | # Visual Studio version. Backup files are not needed, because we have git ;-) 288 | _UpgradeReport_Files/ 289 | Backup*/ 290 | UpgradeLog*.XML 291 | UpgradeLog*.htm 292 | 293 | # SQL Server files 294 | App_Data/*.mdf 295 | App_Data/*.ldf 296 | 297 | # ========================= 298 | # Windows detritus 299 | # ========================= 300 | 301 | # Windows image file caches 302 | Thumbs.db 303 | ehthumbs.db 304 | 305 | # Folder config file 306 | Desktop.ini 307 | 308 | # Recycle Bin used on file shares 309 | $RECYCLE.BIN/ 310 | 311 | # Mac crap 312 | .DS_Store -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/ProjectorInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Xml.Serialization; 6 | using System.IO; 7 | 8 | namespace rv 9 | { 10 | [Serializable] 11 | public class ProjectorInfo 12 | { 13 | private string _projectorHostName = "not set"; 14 | private string _projectorName = "not set"; 15 | private string _projectorManufacturerName; 16 | private string _projectorProductName; 17 | private PowerCommand.PowerStatus _powerStatus; 18 | 19 | private int _numOfLamps; 20 | private List _multiLampStatus; 21 | private List _multiLampHours; 22 | 23 | private ErrorStatusCommand.Status _fanStatus; 24 | private ErrorStatusCommand.Status _lampStatus; 25 | private ErrorStatusCommand.Status _coverStatus; 26 | private ErrorStatusCommand.Status _filterStatus; 27 | private ErrorStatusCommand.Status _otherStatus; 28 | 29 | private InputCommand.InputType _input; 30 | private int _inputPort; 31 | 32 | 33 | public static ProjectorInfo create(PJLinkConnection c) 34 | { 35 | ProjectorInfo pi = new ProjectorInfo(); 36 | pi._projectorHostName = c.HostName; 37 | ProjectorNameCommand pnc = new ProjectorNameCommand(); 38 | if (c.sendCommand(pnc) == Command.Response.SUCCESS) 39 | pi._projectorHostName = pnc.Name; 40 | 41 | ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 42 | if (c.sendCommand(mnc) == Command.Response.SUCCESS) 43 | pi._projectorManufacturerName = mnc.Manufacturer; 44 | 45 | ProductNameCommand prnc = new ProductNameCommand(); 46 | if (c.sendCommand(prnc) == Command.Response.SUCCESS) 47 | pi._projectorProductName = prnc.ProductName; 48 | 49 | ErrorStatusCommand esc = new ErrorStatusCommand(); 50 | if (c.sendCommand(esc) == Command.Response.SUCCESS) 51 | { 52 | pi._fanStatus = esc.FanStatus; 53 | pi._lampStatus = esc.LampStatus; 54 | pi._coverStatus = esc.CoverStatus; 55 | pi._filterStatus = esc.FilterStatus; 56 | pi._otherStatus = esc.OtherStatus; 57 | } 58 | 59 | PowerCommand pc = new PowerCommand(PowerCommand.Power.QUERY); 60 | if (c.sendCommand(pc) == Command.Response.SUCCESS) 61 | pi._powerStatus = pc.Status; 62 | 63 | LampStatusCommand lsc = new LampStatusCommand(); 64 | if (c.sendCommand(lsc) == Command.Response.SUCCESS) 65 | { 66 | pi._multiLampStatus = lsc.StatusList; 67 | pi._multiLampHours = lsc.HoursList; 68 | pi._numOfLamps = lsc.NumOfLamps; 69 | } 70 | 71 | InputCommand ic = new InputCommand(); 72 | if (c.sendCommand(ic) == Command.Response.SUCCESS) 73 | { 74 | pi._input = ic.Input; 75 | pi._inputPort = ic.Port; 76 | } 77 | 78 | return pi; 79 | } 80 | 81 | public static ProjectorInfo create(string xmlString) 82 | { 83 | XmlSerializer serializer = new XmlSerializer(typeof(ProjectorInfo)); 84 | ProjectorInfo pi = (ProjectorInfo)serializer.Deserialize(new StringReader(xmlString)); 85 | return pi; 86 | } 87 | 88 | public string toXmlString() 89 | { 90 | XmlSerializer serializer = new XmlSerializer(typeof(ProjectorInfo)); 91 | StringWriter sw = new StringWriter(); 92 | serializer.Serialize(sw, this); 93 | string serializedXml = sw.ToString(); 94 | return serializedXml; 95 | } 96 | 97 | public string ProjectorHostName 98 | { 99 | get { return _projectorHostName; } 100 | set { _projectorHostName = value; } 101 | } 102 | public string ProjectorName 103 | { 104 | get { return _projectorName; } 105 | set { _projectorName = value; } 106 | } 107 | public string ProjectorProductName 108 | { 109 | get { return _projectorProductName; } 110 | set { _projectorProductName = value; } 111 | } 112 | public string ProjectorManufacturerName 113 | { 114 | get { return _projectorManufacturerName; } 115 | set { _projectorManufacturerName = value; } 116 | 117 | } 118 | public PowerCommand.PowerStatus PowerStatus 119 | { 120 | get { return _powerStatus; } 121 | set { _powerStatus = value; } 122 | } 123 | public int NumOfLamps 124 | { 125 | get { return _numOfLamps; } 126 | set { _numOfLamps = value; } 127 | } 128 | public ErrorStatusCommand.Status FanStatus 129 | { 130 | get { return _fanStatus; } 131 | set { _fanStatus = value; } 132 | } 133 | public ErrorStatusCommand.Status LampStatus 134 | { 135 | get { return _lampStatus; } 136 | set { _lampStatus = value; } 137 | } 138 | 139 | public ErrorStatusCommand.Status CoverStatus 140 | { 141 | get { return _coverStatus; } 142 | set { _coverStatus = value; } 143 | } 144 | public ErrorStatusCommand.Status FilterStatus 145 | { 146 | get { return _filterStatus; } 147 | set { _filterStatus = value; } 148 | } 149 | public InputCommand.InputType Input 150 | { 151 | get { return _input; } 152 | set { _input = value; } 153 | } 154 | public int InputPort 155 | { 156 | get { return _inputPort; } 157 | set { _inputPort = value; } 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/af/af01be318f384ff6c866bb7f9b576f129082b42a.svn-base: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Xml.Serialization; 6 | using System.IO; 7 | 8 | namespace rv 9 | { 10 | [Serializable] 11 | public class ProjectorInfo 12 | { 13 | private string _projectorHostName = "not set"; 14 | private string _projectorName = "not set"; 15 | private string _projectorManufacturerName; 16 | private string _projectorProductName; 17 | private PowerCommand.PowerStatus _powerStatus; 18 | 19 | private int _numOfLamps; 20 | private List _multiLampStatus; 21 | private List _multiLampHours; 22 | 23 | private ErrorStatusCommand.Status _fanStatus; 24 | private ErrorStatusCommand.Status _lampStatus; 25 | private ErrorStatusCommand.Status _coverStatus; 26 | private ErrorStatusCommand.Status _filterStatus; 27 | private ErrorStatusCommand.Status _otherStatus; 28 | 29 | private InputCommand.InputType _input; 30 | private int _inputPort; 31 | 32 | 33 | public static ProjectorInfo create(PJLinkConnection c) 34 | { 35 | ProjectorInfo pi = new ProjectorInfo(); 36 | pi._projectorHostName = c.HostName; 37 | ProjectorNameCommand pnc = new ProjectorNameCommand(); 38 | if (c.sendCommand(pnc) == Command.Response.SUCCESS) 39 | pi._projectorHostName = pnc.Name; 40 | 41 | ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 42 | if (c.sendCommand(mnc) == Command.Response.SUCCESS) 43 | pi._projectorManufacturerName = mnc.Manufacturer; 44 | 45 | ProductNameCommand prnc = new ProductNameCommand(); 46 | if (c.sendCommand(prnc) == Command.Response.SUCCESS) 47 | pi._projectorProductName = prnc.ProductName; 48 | 49 | ErrorStatusCommand esc = new ErrorStatusCommand(); 50 | if (c.sendCommand(esc) == Command.Response.SUCCESS) 51 | { 52 | pi._fanStatus = esc.FanStatus; 53 | pi._lampStatus = esc.LampStatus; 54 | pi._coverStatus = esc.CoverStatus; 55 | pi._filterStatus = esc.FilterStatus; 56 | pi._otherStatus = esc.OtherStatus; 57 | } 58 | 59 | PowerCommand pc = new PowerCommand(PowerCommand.Power.QUERY); 60 | if (c.sendCommand(pc) == Command.Response.SUCCESS) 61 | pi._powerStatus = pc.Status; 62 | 63 | LampStatusCommand lsc = new LampStatusCommand(); 64 | if (c.sendCommand(lsc) == Command.Response.SUCCESS) 65 | { 66 | pi._multiLampStatus = lsc.StatusList; 67 | pi._multiLampHours = lsc.HoursList; 68 | pi._numOfLamps = lsc.NumOfLamps; 69 | } 70 | 71 | InputCommand ic = new InputCommand(); 72 | if (c.sendCommand(ic) == Command.Response.SUCCESS) 73 | { 74 | pi._input = ic.Input; 75 | pi._inputPort = ic.Port; 76 | } 77 | 78 | return pi; 79 | } 80 | 81 | public static ProjectorInfo create(string xmlString) 82 | { 83 | XmlSerializer serializer = new XmlSerializer(typeof(ProjectorInfo)); 84 | ProjectorInfo pi = (ProjectorInfo)serializer.Deserialize(new StringReader(xmlString)); 85 | return pi; 86 | } 87 | 88 | public string toXmlString() 89 | { 90 | XmlSerializer serializer = new XmlSerializer(typeof(ProjectorInfo)); 91 | StringWriter sw = new StringWriter(); 92 | serializer.Serialize(sw, this); 93 | string serializedXml = sw.ToString(); 94 | return serializedXml; 95 | } 96 | 97 | public string ProjectorHostName 98 | { 99 | get { return _projectorHostName; } 100 | set { _projectorHostName = value; } 101 | } 102 | public string ProjectorName 103 | { 104 | get { return _projectorName; } 105 | set { _projectorName = value; } 106 | } 107 | public string ProjectorProductName 108 | { 109 | get { return _projectorProductName; } 110 | set { _projectorProductName = value; } 111 | } 112 | public string ProjectorManufacturerName 113 | { 114 | get { return _projectorManufacturerName; } 115 | set { _projectorManufacturerName = value; } 116 | 117 | } 118 | public PowerCommand.PowerStatus PowerStatus 119 | { 120 | get { return _powerStatus; } 121 | set { _powerStatus = value; } 122 | } 123 | public int NumOfLamps 124 | { 125 | get { return _numOfLamps; } 126 | set { _numOfLamps = value; } 127 | } 128 | public ErrorStatusCommand.Status FanStatus 129 | { 130 | get { return _fanStatus; } 131 | set { _fanStatus = value; } 132 | } 133 | public ErrorStatusCommand.Status LampStatus 134 | { 135 | get { return _lampStatus; } 136 | set { _lampStatus = value; } 137 | } 138 | 139 | public ErrorStatusCommand.Status CoverStatus 140 | { 141 | get { return _coverStatus; } 142 | set { _coverStatus = value; } 143 | } 144 | public ErrorStatusCommand.Status FilterStatus 145 | { 146 | get { return _filterStatus; } 147 | set { _filterStatus = value; } 148 | } 149 | public InputCommand.InputType Input 150 | { 151 | get { return _input; } 152 | set { _input = value; } 153 | } 154 | public int InputPort 155 | { 156 | get { return _inputPort; } 157 | set { _inputPort = value; } 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Form1.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/ProjectorControl.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {F2EE5EF6-A22C-4331-B714-DDCEFACFBCA2} 9 | WinExe 10 | Properties 11 | ProjectorControl 12 | ProjectorControl 13 | v4.0 14 | Client 15 | 512 16 | false 17 | c:\deploy\ProjectorControl\ 18 | true 19 | Disk 20 | false 21 | Foreground 22 | 7 23 | Days 24 | false 25 | false 26 | true 27 | 1 28 | 1.0.0.%2a 29 | false 30 | true 31 | true 32 | 33 | 34 | x86 35 | true 36 | full 37 | false 38 | bin\Debug\ 39 | DEBUG;TRACE 40 | prompt 41 | 4 42 | 43 | 44 | x86 45 | pdbonly 46 | true 47 | bin\Release\ 48 | TRACE 49 | prompt 50 | 4 51 | 52 | 53 | 8BC16BD6F5F31BF26A99452E8631E15D1CD61BB6 54 | 55 | 56 | ProjectorControl_TemporaryKey.pfx 57 | 58 | 59 | true 60 | 61 | 62 | true 63 | 64 | 65 | 66 | ..\..\pjlink-sharp-read-only\PJLink\bin\x86\Debug\PJLink.dll 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | Form 82 | 83 | 84 | Form1.cs 85 | 86 | 87 | 88 | 89 | Form1.cs 90 | 91 | 92 | ResXFileCodeGenerator 93 | Resources.Designer.cs 94 | Designer 95 | 96 | 97 | True 98 | Resources.resx 99 | 100 | 101 | 102 | SettingsSingleFileGenerator 103 | Settings.Designer.cs 104 | 105 | 106 | True 107 | Settings.settings 108 | True 109 | 110 | 111 | 112 | 113 | False 114 | Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 115 | true 116 | 117 | 118 | False 119 | .NET Framework 3.5 SP1 Client Profile 120 | false 121 | 122 | 123 | False 124 | .NET Framework 3.5 SP1 125 | false 126 | 127 | 128 | False 129 | Windows Installer 3.1 130 | true 131 | 132 | 133 | 134 | 141 | -------------------------------------------------------------------------------- /deploy/ProjectorControl/Application Files/ProjectorControl_1_0_0_0/ProjectorControl.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | ML1GGuMwYrdUVO2QX00VqdDfwBU= 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | HoZYJxN+ljEJ0oRYLZ8XHZNgASQ= 65 | 66 | 67 | 68 | cj8yGSRTLe7M2OHXPAx3d3sbeYo=XqzuGaw2BwWg7XIQ/4qcXeobDytKZTh9NMdsHskb2mOhUIiK6xj9x3Yq4ML0QzQPxwSQ0bBOjO6Gm5o4NSroDzQ69HARWyC+wRXOm+YP4tqK36Lk1IlnLCobuavTxGLUut0GEKliKOBTNXpwss6Gt8G/RS6G3v1MMEOuNVkmx5o=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABCN=bismuth\davidXmEultkbndMLHLiZ947XYPLRIcM=X/jkHxRCltGl3fj9iX/OggnTTozlszE975+jhHkwMDy/biI843YPjtKQgL6pigzzKBPlOKZ+W+D9kJCs0S3MXRkwDACB2FFmNr+aA7UMuDHO7LvH//6qFvyNl6NGNLmNkCUkSxVjVcC5XESaABXbUJymr8f/rwH1I3npI4PNy0c=xJy9OuXTBOuH2qKeoOjRi3IKMw6Jc+fJW0nOXLjZcoegIzQFEQVSQoqU2u4kWYq2MvUlaUO5l4cUuYO0ZHmYcLIBLEW01gn9tRTbq6LgAedUXItVw24IgxXq8hUf1T+CyU9ViZIGBEtLVnOkFR34y4D3vmGTMLSE4JTisxDc1Sk=AQABMIIBzTCCATagAwIBAgIQFXSFq+W3wblIj0xcbBa+oDANBgkqhkiG9w0BAQUFADAlMSMwIQYDVQQDHhoAYgBpAHMAbQB1AHQAaABcAGQAYQB2AGkAZDAeFw0xMzAzMDQxMjA0MjhaFw0xNDAzMDQxODA0MjhaMCUxIzAhBgNVBAMeGgBiAGkAcwBtAHUAdABoAFwAZABhAHYAaQBkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEnL065dME64faop6g6NGLcgozDolz58lbSc5cuNlyh6AjNAURBVJCipTa7iRZirYy9SVpQ7mXhxS5g7RkeZhwsgEsRbTWCf21FNurouAB51Rci1XDbgiDFeryFR/VP4LJT1WJkgYES0tWc6QVHfjLgPe+YZMwtITglOKzENzVKQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADWIfv85xjLgSOhI4Q5XeGQrI0zQgt49yzHbbDyJnLHT2KvGLsxbJ/z5oGRIH0Ngh9QlYrDD+FPKV0DpdCe9lxSE5HP8tsEsw+6rhZ3vO416IpXygKzoNpkO3S/mU1296Th6ZWIyYICn5JsfWevS50QD3tzu8NZF1rFXdepDF9pD -------------------------------------------------------------------------------- /ProjectorControl/ProjectorControl/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ProjectorControl 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.On = new System.Windows.Forms.Button(); 32 | this.Off = new System.Windows.Forms.Button(); 33 | this.Status = new System.Windows.Forms.Label(); 34 | this.ipAddress = new System.Windows.Forms.TextBox(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.Connect = new System.Windows.Forms.Button(); 37 | this.button_rgb = new System.Windows.Forms.Button(); 38 | this.button_video = new System.Windows.Forms.Button(); 39 | this.button_digital = new System.Windows.Forms.Button(); 40 | this.button_strage = new System.Windows.Forms.Button(); 41 | this.SuspendLayout(); 42 | // 43 | // On 44 | // 45 | this.On.Location = new System.Drawing.Point(300, 2); 46 | this.On.Name = "On"; 47 | this.On.Size = new System.Drawing.Size(134, 45); 48 | this.On.TabIndex = 0; 49 | this.On.Text = "On"; 50 | this.On.UseVisualStyleBackColor = true; 51 | this.On.Click += new System.EventHandler(this.On_Click); 52 | // 53 | // Off 54 | // 55 | this.Off.Location = new System.Drawing.Point(300, 56); 56 | this.Off.Name = "Off"; 57 | this.Off.Size = new System.Drawing.Size(134, 48); 58 | this.Off.TabIndex = 1; 59 | this.Off.Text = "Off"; 60 | this.Off.UseVisualStyleBackColor = true; 61 | this.Off.Click += new System.EventHandler(this.Off_Click); 62 | // 63 | // Status 64 | // 65 | this.Status.BackColor = System.Drawing.SystemColors.ControlLightLight; 66 | this.Status.Font = new System.Drawing.Font("Corbel", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 67 | this.Status.Location = new System.Drawing.Point(12, 234); 68 | this.Status.Name = "Status"; 69 | this.Status.Size = new System.Drawing.Size(422, 153); 70 | this.Status.TabIndex = 2; 71 | this.Status.Text = "Status"; 72 | // 73 | // ipAddress 74 | // 75 | this.ipAddress.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 76 | | System.Windows.Forms.AnchorStyles.Left) 77 | | System.Windows.Forms.AnchorStyles.Right))); 78 | this.ipAddress.Font = new System.Drawing.Font("Courier New", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 79 | this.ipAddress.Location = new System.Drawing.Point(16, 75); 80 | this.ipAddress.Name = "ipAddress"; 81 | this.ipAddress.Size = new System.Drawing.Size(160, 29); 82 | this.ipAddress.TabIndex = 3; 83 | this.ipAddress.Text = "192.168.1.150"; 84 | this.ipAddress.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 85 | this.ipAddress.WordWrap = false; 86 | this.ipAddress.TextChanged += new System.EventHandler(this.ipAddress_TextChanged); 87 | // 88 | // label1 89 | // 90 | this.label1.Font = new System.Drawing.Font("Meiryo UI", 12F); 91 | this.label1.Location = new System.Drawing.Point(12, 50); 92 | this.label1.Name = "label1"; 93 | this.label1.Size = new System.Drawing.Size(168, 22); 94 | this.label1.TabIndex = 4; 95 | this.label1.Text = "Projector Address"; 96 | this.label1.TextAlign = System.Drawing.ContentAlignment.BottomCenter; 97 | // 98 | // Connect 99 | // 100 | this.Connect.Location = new System.Drawing.Point(16, 2); 101 | this.Connect.Name = "Connect"; 102 | this.Connect.Size = new System.Drawing.Size(164, 45); 103 | this.Connect.TabIndex = 5; 104 | this.Connect.Text = "Connect"; 105 | this.Connect.UseVisualStyleBackColor = true; 106 | this.Connect.Click += new System.EventHandler(this.connect_Click); 107 | // 108 | // button_rgb 109 | // 110 | this.button_rgb.Location = new System.Drawing.Point(16, 139); 111 | this.button_rgb.Name = "button_rgb"; 112 | this.button_rgb.Size = new System.Drawing.Size(100, 48); 113 | this.button_rgb.TabIndex = 6; 114 | this.button_rgb.Text = "RGB"; 115 | this.button_rgb.UseVisualStyleBackColor = true; 116 | this.button_rgb.Click += new System.EventHandler(this.button_vga_Click); 117 | // 118 | // button_video 119 | // 120 | this.button_video.Location = new System.Drawing.Point(122, 139); 121 | this.button_video.Name = "button_video"; 122 | this.button_video.Size = new System.Drawing.Size(100, 48); 123 | this.button_video.TabIndex = 7; 124 | this.button_video.Text = "VIDEO"; 125 | this.button_video.UseVisualStyleBackColor = true; 126 | this.button_video.Click += new System.EventHandler(this.button_video_Click); 127 | // 128 | // button_digital 129 | // 130 | this.button_digital.Location = new System.Drawing.Point(228, 139); 131 | this.button_digital.Name = "button_digital"; 132 | this.button_digital.Size = new System.Drawing.Size(100, 48); 133 | this.button_digital.TabIndex = 8; 134 | this.button_digital.Text = "DIGITAL"; 135 | this.button_digital.UseVisualStyleBackColor = true; 136 | this.button_digital.Click += new System.EventHandler(this.button_digital_Click); 137 | // 138 | // button_strage 139 | // 140 | this.button_strage.Location = new System.Drawing.Point(334, 139); 141 | this.button_strage.Name = "button_strage"; 142 | this.button_strage.Size = new System.Drawing.Size(100, 48); 143 | this.button_strage.TabIndex = 9; 144 | this.button_strage.Text = "NETWORK"; 145 | this.button_strage.UseVisualStyleBackColor = true; 146 | this.button_strage.Click += new System.EventHandler(this.button_network_Click); 147 | // 148 | // Form1 149 | // 150 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 151 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 152 | this.ClientSize = new System.Drawing.Size(446, 396); 153 | this.Controls.Add(this.button_strage); 154 | this.Controls.Add(this.button_digital); 155 | this.Controls.Add(this.button_video); 156 | this.Controls.Add(this.button_rgb); 157 | this.Controls.Add(this.Connect); 158 | this.Controls.Add(this.label1); 159 | this.Controls.Add(this.ipAddress); 160 | this.Controls.Add(this.Status); 161 | this.Controls.Add(this.Off); 162 | this.Controls.Add(this.On); 163 | this.Name = "Form1"; 164 | this.Text = "Form1"; 165 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); 166 | this.ResumeLayout(false); 167 | this.PerformLayout(); 168 | 169 | } 170 | 171 | #endregion 172 | 173 | private System.Windows.Forms.Button On; 174 | private System.Windows.Forms.Button Off; 175 | private System.Windows.Forms.Label Status; 176 | private System.Windows.Forms.TextBox ipAddress; 177 | private System.Windows.Forms.Label label1; 178 | private System.Windows.Forms.Button Connect; 179 | private System.Windows.Forms.Button button_rgb; 180 | private System.Windows.Forms.Button button_video; 181 | private System.Windows.Forms.Button button_digital; 182 | private System.Windows.Forms.Button button_strage; 183 | } 184 | } 185 | 186 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/PJLink/PJLinkConnection.cs: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | using System.Net.Sockets; 23 | using System.IO; 24 | using System.Security.Cryptography; 25 | 26 | namespace rv 27 | { 28 | /// 29 | /// Simple class to control networked projectors via the PJLink protocol. 30 | /// See full spec here: http://pjlink.jbmia.or.jp/english/data/PJLink%20Specifications100.pdf 31 | /// 32 | /// This library was written in one day, so don't expect perfection. Most information must be 33 | /// fetched from commands after execution (sendCommand). For most common tasks, there are some 34 | /// shortcuts available in the PJLinkConnectionPJLinkConnection class. 35 | /// 36 | /// Basic usage: 37 | /// 38 | /// // Create connection object, communicating with projector with IP 192.168.1.14 39 | /// // Projector has authentication enabled, password is rv (ignored if auth disabled) 40 | /// PJLinkConnection c = new PJLinkConnection("192.168.1.14", "rv"); 41 | /// 42 | /// //using shortcuts 43 | /// c.turnOn(); 44 | /// c.turnOff(); 45 | /// System.Console.WriteLine(c.getProjectorInfo()); 46 | /// 47 | /// //using low(er) level commands 48 | /// ErrorStatusCommand esc = new ErrorStatusCommand(); 49 | /// if (c.sendCommand(esc) == Command.Response.SUCCESS) 50 | /// Console.WriteLine(esc.dumpToString()); 51 | /// else 52 | /// Console.WriteLine("Communication Error"); 53 | /// 54 | /// 55 | public class PJLinkConnection 56 | { 57 | /// 58 | /// hostname or IP (as string, e.g. "192.168.1.12") of the projector 59 | /// 60 | private string _hostName = ""; 61 | /// 62 | /// PJLink port, default ist 4352 (see Spec) 63 | /// 64 | private int _port = 4352; 65 | /// 66 | /// Flag is true, if the projector requires authentication 67 | /// 68 | private bool _useAuth = false; 69 | /// 70 | /// Password supplied by user if authentication is enabled 71 | /// 72 | private string _passwd = ""; 73 | /// 74 | /// Random key returned by projector for MD5 sum generation 75 | /// 76 | private string _pjKey = ""; 77 | /// 78 | /// The connection client 79 | /// 80 | TcpClient _client = null; 81 | /// 82 | /// The Network stream the _client provides 83 | /// 84 | NetworkStream _stream = null; 85 | 86 | #region C'tors 87 | 88 | public PJLinkConnection(string host, int port, string passwd) 89 | { 90 | _hostName = host; 91 | _port = port; 92 | _passwd = passwd; 93 | _useAuth = (passwd != ""); 94 | } 95 | 96 | public PJLinkConnection(string host, string passwd) 97 | { 98 | _hostName = host; 99 | _passwd = passwd; 100 | _useAuth = (passwd != ""); 101 | } 102 | 103 | public PJLinkConnection(string host, int port) 104 | { 105 | _hostName = host; 106 | _port = port; 107 | _useAuth = false; 108 | } 109 | 110 | public PJLinkConnection(string host) 111 | { 112 | _hostName = host; 113 | _useAuth = false; 114 | } 115 | 116 | #endregion 117 | 118 | public Command.Response sendCommand(Command cmd) 119 | { 120 | if(initConnection()) 121 | { 122 | try 123 | { 124 | string cmdString = cmd.getCommandString() + "\r"; 125 | 126 | if (_useAuth && _pjKey != "") 127 | cmdString = getMD5Hash(_pjKey + _passwd) + cmdString; 128 | 129 | byte[] sendBytes = Encoding.ASCII.GetBytes(cmdString); 130 | _stream.Write(sendBytes, 0, sendBytes.Length); 131 | 132 | byte[] recvBytes = new byte[_client.ReceiveBufferSize]; 133 | int bytesRcvd = _stream.Read(recvBytes, 0, (int)_client.ReceiveBufferSize); 134 | string returndata = Encoding.ASCII.GetString(recvBytes, 0, bytesRcvd); 135 | returndata = returndata.Trim(); 136 | cmd.processAnswerString(returndata); 137 | return cmd.CmdResponse; 138 | } 139 | finally 140 | { 141 | closeConnection(); 142 | } 143 | } 144 | 145 | return Command.Response.COMMUNICATION_ERROR; 146 | } 147 | 148 | /// 149 | /// Sends a command asynchronously. The specified resultCallback will be called when 150 | /// the command has executed. 151 | /// 152 | public void sendCommandAsync(Command cmd, Command.CommandResultHandler resultCallback) 153 | { 154 | System.Threading.Thread t = new System.Threading.Thread((System.Threading.ThreadStart)delegate 155 | { 156 | var response = sendCommand(cmd); 157 | resultCallback(cmd, response); 158 | }); 159 | t.IsBackground = true; 160 | t.Start(); 161 | } 162 | 163 | #region Shortcuts 164 | 165 | /// 166 | /// Turn on projector. Returns true if projector answered with SUCCESS 167 | /// 168 | public bool turnOn() 169 | { 170 | PowerCommand pc = new PowerCommand(PowerCommand.Power.ON); 171 | return (sendCommand(pc) == Command.Response.SUCCESS); 172 | } 173 | 174 | /// 175 | /// Turn off projector. Returns true if projector answered with SUCCESS 176 | /// 177 | public bool turnOff() 178 | { 179 | PowerCommand pc = new PowerCommand(PowerCommand.Power.OFF); 180 | return (sendCommand(pc) == Command.Response.SUCCESS); 181 | } 182 | 183 | /// 184 | /// Check power state of Projector. Returns unknown in case of an error 185 | /// 186 | public PowerCommand.PowerStatus powerQuery() 187 | { 188 | PowerCommand pc3 = new PowerCommand(PowerCommand.Power.QUERY); 189 | if (sendCommand(pc3) == Command.Response.SUCCESS) 190 | return pc3.Status; 191 | return PowerCommand.PowerStatus.UNKNOWN; 192 | } 193 | 194 | /// 195 | /// Return String in the form 196 | /// Manufacturer Product (ProjectorName) 197 | /// or 198 | /// Manufacturer Product 199 | /// if no projector name is set. 200 | /// 201 | public string getProjectorInfo() 202 | { 203 | string toRet = ""; 204 | ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 205 | if (sendCommand(mnc) == Command.Response.SUCCESS) 206 | toRet = mnc.Manufacturer; 207 | 208 | ProductNameCommand prnc = new ProductNameCommand(); 209 | if (sendCommand(prnc) == Command.Response.SUCCESS) 210 | toRet+= " " + prnc.ProductName; 211 | 212 | ProjectorNameCommand pnc = new ProjectorNameCommand(); 213 | if (sendCommand(pnc) == Command.Response.SUCCESS) { 214 | if (pnc.Name.Length > 0) 215 | toRet += " (" + pnc.Name + ")"; 216 | } 217 | return toRet; 218 | } 219 | 220 | public ProjectorInfo getFullProjectorInfo() 221 | { 222 | return ProjectorInfo.create(this); 223 | } 224 | 225 | #endregion 226 | 227 | public string HostName 228 | { 229 | get { return _hostName; } 230 | } 231 | 232 | #region private methods 233 | 234 | private bool initConnection() 235 | { 236 | try 237 | { 238 | if (_client == null || !_client.Connected) 239 | { 240 | _client = new TcpClient(_hostName, _port); 241 | _stream = _client.GetStream(); 242 | byte[] recvBytes = new byte[_client.ReceiveBufferSize]; 243 | int bytesRcvd = _stream.Read(recvBytes, 0, (int)_client.ReceiveBufferSize); 244 | string retVal = Encoding.ASCII.GetString(recvBytes, 0, bytesRcvd); 245 | retVal = retVal.Trim(); 246 | 247 | if(retVal.IndexOf("PJLINK 0") >= 0) 248 | { 249 | _useAuth = false; //pw provided but projector doesn't need it. 250 | return true; 251 | } 252 | else if (retVal.IndexOf("PJLINK 1 ") >= 0) 253 | { 254 | _pjKey = retVal.Replace("PJLINK 1 ", ""); 255 | return true; 256 | } 257 | } 258 | return false; 259 | } 260 | catch(Exception){ 261 | return false; 262 | } 263 | 264 | } 265 | 266 | private void closeConnection() 267 | { 268 | if (_client != null) 269 | _client.Close(); 270 | if (_stream != null) 271 | _stream.Close(); 272 | } 273 | 274 | private string getMD5Hash(string input) 275 | { 276 | MD5CryptoServiceProvider x = new MD5CryptoServiceProvider(); 277 | byte[] bs = Encoding.ASCII.GetBytes(input); 278 | byte[] hash = x.ComputeHash(bs); 279 | 280 | string toRet = ""; 281 | foreach (byte b in hash) 282 | { 283 | toRet += b.ToString("x2"); 284 | } 285 | return toRet; 286 | } 287 | 288 | #endregion 289 | 290 | } 291 | } 292 | -------------------------------------------------------------------------------- /pjlink-sharp-read-only/.svn/pristine/4a/4a250d347a2f131eb277d9423444eb3fd06cde31.svn-base: -------------------------------------------------------------------------------- 1 | // The C# PJLink library. 2 | // Copyright (C) 2010 RV realtime visions GmbH (www.realtimevisions.com) 3 | // 4 | // This library is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 2.1 of the License, or (at your option) any later version. 8 | // 9 | // This library is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | // 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this library; if not, write to the Free Software 16 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | 18 | using System; 19 | using System.Collections.Generic; 20 | using System.Linq; 21 | using System.Text; 22 | using System.Net.Sockets; 23 | using System.IO; 24 | using System.Security.Cryptography; 25 | 26 | namespace rv 27 | { 28 | /// 29 | /// Simple class to control networked projectors via the PJLink protocol. 30 | /// See full spec here: http://pjlink.jbmia.or.jp/english/data/PJLink%20Specifications100.pdf 31 | /// 32 | /// This library was written in one day, so don't expect perfection. Most information must be 33 | /// fetched from commands after execution (sendCommand). For most common tasks, there are some 34 | /// shortcuts available in the PJLinkConnectionPJLinkConnection class. 35 | /// 36 | /// Basic usage: 37 | /// 38 | /// // Create connection object, communicating with projector with IP 192.168.1.14 39 | /// // Projector has authentication enabled, password is rv (ignored if auth disabled) 40 | /// PJLinkConnection c = new PJLinkConnection("192.168.1.14", "rv"); 41 | /// 42 | /// //using shortcuts 43 | /// c.turnOn(); 44 | /// c.turnOff(); 45 | /// System.Console.WriteLine(c.getProjectorInfo()); 46 | /// 47 | /// //using low(er) level commands 48 | /// ErrorStatusCommand esc = new ErrorStatusCommand(); 49 | /// if (c.sendCommand(esc) == Command.Response.SUCCESS) 50 | /// Console.WriteLine(esc.dumpToString()); 51 | /// else 52 | /// Console.WriteLine("Communication Error"); 53 | /// 54 | /// 55 | public class PJLinkConnection 56 | { 57 | /// 58 | /// hostname or IP (as string, e.g. "192.168.1.12") of the projector 59 | /// 60 | private string _hostName = ""; 61 | /// 62 | /// PJLink port, default ist 4352 (see Spec) 63 | /// 64 | private int _port = 4352; 65 | /// 66 | /// Flag is true, if the projector requires authentication 67 | /// 68 | private bool _useAuth = false; 69 | /// 70 | /// Password supplied by user if authentication is enabled 71 | /// 72 | private string _passwd = ""; 73 | /// 74 | /// Random key returned by projector for MD5 sum generation 75 | /// 76 | private string _pjKey = ""; 77 | /// 78 | /// The connection client 79 | /// 80 | TcpClient _client = null; 81 | /// 82 | /// The Network stream the _client provides 83 | /// 84 | NetworkStream _stream = null; 85 | 86 | #region C'tors 87 | 88 | public PJLinkConnection(string host, int port, string passwd) 89 | { 90 | _hostName = host; 91 | _port = port; 92 | _passwd = passwd; 93 | _useAuth = (passwd != ""); 94 | } 95 | 96 | public PJLinkConnection(string host, string passwd) 97 | { 98 | _hostName = host; 99 | _passwd = passwd; 100 | _useAuth = (passwd != ""); 101 | } 102 | 103 | public PJLinkConnection(string host, int port) 104 | { 105 | _hostName = host; 106 | _port = port; 107 | _useAuth = false; 108 | } 109 | 110 | public PJLinkConnection(string host) 111 | { 112 | _hostName = host; 113 | _useAuth = false; 114 | } 115 | 116 | #endregion 117 | 118 | public Command.Response sendCommand(Command cmd) 119 | { 120 | if(initConnection()) 121 | { 122 | try 123 | { 124 | string cmdString = cmd.getCommandString() + "\r"; 125 | 126 | if (_useAuth && _pjKey != "") 127 | cmdString = getMD5Hash(_pjKey + _passwd) + cmdString; 128 | 129 | byte[] sendBytes = Encoding.ASCII.GetBytes(cmdString); 130 | _stream.Write(sendBytes, 0, sendBytes.Length); 131 | 132 | byte[] recvBytes = new byte[_client.ReceiveBufferSize]; 133 | int bytesRcvd = _stream.Read(recvBytes, 0, (int)_client.ReceiveBufferSize); 134 | string returndata = Encoding.ASCII.GetString(recvBytes, 0, bytesRcvd); 135 | returndata = returndata.Trim(); 136 | cmd.processAnswerString(returndata); 137 | return cmd.CmdResponse; 138 | } 139 | finally 140 | { 141 | closeConnection(); 142 | } 143 | } 144 | 145 | return Command.Response.COMMUNICATION_ERROR; 146 | } 147 | 148 | /// 149 | /// Sends a command asynchronously. The specified resultCallback will be called when 150 | /// the command has executed. 151 | /// 152 | public void sendCommandAsync(Command cmd, Command.CommandResultHandler resultCallback) 153 | { 154 | System.Threading.Thread t = new System.Threading.Thread((System.Threading.ThreadStart)delegate 155 | { 156 | var response = sendCommand(cmd); 157 | resultCallback(cmd, response); 158 | }); 159 | t.IsBackground = true; 160 | t.Start(); 161 | } 162 | 163 | #region Shortcuts 164 | 165 | /// 166 | /// Turn on projector. Returns true if projector answered with SUCCESS 167 | /// 168 | public bool turnOn() 169 | { 170 | PowerCommand pc = new PowerCommand(PowerCommand.Power.ON); 171 | return (sendCommand(pc) == Command.Response.SUCCESS); 172 | } 173 | 174 | /// 175 | /// Turn off projector. Returns true if projector answered with SUCCESS 176 | /// 177 | public bool turnOff() 178 | { 179 | PowerCommand pc = new PowerCommand(PowerCommand.Power.OFF); 180 | return (sendCommand(pc) == Command.Response.SUCCESS); 181 | } 182 | 183 | /// 184 | /// Check power state of Projector. Returns unknown in case of an error 185 | /// 186 | public PowerCommand.PowerStatus powerQuery() 187 | { 188 | PowerCommand pc3 = new PowerCommand(PowerCommand.Power.QUERY); 189 | if (sendCommand(pc3) == Command.Response.SUCCESS) 190 | return pc3.Status; 191 | return PowerCommand.PowerStatus.UNKNOWN; 192 | } 193 | 194 | /// 195 | /// Return String in the form 196 | /// Manufacturer Product (ProjectorName) 197 | /// or 198 | /// Manufacturer Product 199 | /// if no projector name is set. 200 | /// 201 | public string getProjectorInfo() 202 | { 203 | string toRet = ""; 204 | ManufacturerNameCommand mnc = new ManufacturerNameCommand(); 205 | if (sendCommand(mnc) == Command.Response.SUCCESS) 206 | toRet = mnc.Manufacturer; 207 | 208 | ProductNameCommand prnc = new ProductNameCommand(); 209 | if (sendCommand(prnc) == Command.Response.SUCCESS) 210 | toRet+= " " + prnc.ProductName; 211 | 212 | ProjectorNameCommand pnc = new ProjectorNameCommand(); 213 | if (sendCommand(pnc) == Command.Response.SUCCESS) { 214 | if (pnc.Name.Length > 0) 215 | toRet += " (" + pnc.Name + ")"; 216 | } 217 | return toRet; 218 | } 219 | 220 | public ProjectorInfo getFullProjectorInfo() 221 | { 222 | return ProjectorInfo.create(this); 223 | } 224 | 225 | #endregion 226 | 227 | public string HostName 228 | { 229 | get { return _hostName; } 230 | } 231 | 232 | #region private methods 233 | 234 | private bool initConnection() 235 | { 236 | try 237 | { 238 | if (_client == null || !_client.Connected) 239 | { 240 | _client = new TcpClient(_hostName, _port); 241 | _stream = _client.GetStream(); 242 | byte[] recvBytes = new byte[_client.ReceiveBufferSize]; 243 | int bytesRcvd = _stream.Read(recvBytes, 0, (int)_client.ReceiveBufferSize); 244 | string retVal = Encoding.ASCII.GetString(recvBytes, 0, bytesRcvd); 245 | retVal = retVal.Trim(); 246 | 247 | if(retVal.IndexOf("PJLINK 0") >= 0) 248 | { 249 | _useAuth = false; //pw provided but projector doesn't need it. 250 | return true; 251 | } 252 | else if (retVal.IndexOf("PJLINK 1 ") >= 0) 253 | { 254 | _pjKey = retVal.Replace("PJLINK 1 ", ""); 255 | return true; 256 | } 257 | } 258 | return false; 259 | } 260 | catch(Exception){ 261 | return false; 262 | } 263 | 264 | } 265 | 266 | private void closeConnection() 267 | { 268 | if (_client != null) 269 | _client.Close(); 270 | if (_stream != null) 271 | _stream.Close(); 272 | } 273 | 274 | private string getMD5Hash(string input) 275 | { 276 | MD5CryptoServiceProvider x = new MD5CryptoServiceProvider(); 277 | byte[] bs = Encoding.ASCII.GetBytes(input); 278 | byte[] hash = x.ComputeHash(bs); 279 | 280 | string toRet = ""; 281 | foreach (byte b in hash) 282 | { 283 | toRet += b.ToString("x2"); 284 | } 285 | return toRet; 286 | } 287 | 288 | #endregion 289 | 290 | } 291 | } 292 | --------------------------------------------------------------------------------