From: <an...@us...> - 2008-02-23 10:54:30
|
Revision: 1391 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1391&view=rev Author: and-81 Date: 2008-02-23 02:54:21 -0800 (Sat, 23 Feb 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/ExternalChannels.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs trunk/plugins/MCEReplacement/MCEReplacement.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150 Tuner.csproj trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150Tuner.exe.manifest trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Program.cs trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Properties/ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/SageSetup/ trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.Designer.cs trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.resx trunk/plugins/IR Server Suite/Applications/SageSetup/Program.cs trunk/plugins/IR Server Suite/Applications/SageSetup/Properties/ trunk/plugins/IR Server Suite/Applications/SageSetup/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj trunk/plugins/IR Server Suite/Applications/SageSetup/SageSetup.exe.manifest Removed Paths: ------------- trunk/plugins/IR Server Suite/Util Apps/Log File Multi-Viewer/ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/ trunk/plugins/IR Server Suite/Util Apps/PVR150 Tuner/ trunk/plugins/IR Server Suite/Util Apps/SageSetup/ trunk/plugins/IR Server Suite/Util Apps/TestClient/ trunk/plugins/IR Server Suite/Util Apps/TestServer/ Property changes on: trunk/plugins/IR Server Suite/Applications/PVR150 Tuner ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150 Tuner.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150 Tuner.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150 Tuner.csproj 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,51 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{EDE4F0AC-CA13-4E4F-8466-EF0519B7B0EF}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>PVR150Tuner</RootNamespace> + <AssemblyName>PVR150Tuner</AssemblyName> + <StartupObject>PVR150Tuner.Program</StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="PVR150Tuner.exe.manifest"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150Tuner.exe.manifest =================================================================== --- trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150Tuner.exe.manifest (rev 0) +++ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/PVR150Tuner.exe.manifest 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" > + <assemblyIdentity version="1.0.4.2" processorArchitecture="X86" name="PVR150 Tuner" type="win32" /> + <description>Tune channels with Hauppauge IR Blaster built into PVR150 and compatible TV Cards</description> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level="requireAdministrator" /> + </requestedPrivileges> + </security> + </trustInfo> +</assembly> Added: trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Program.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,136 @@ +using System; +using System.Runtime.InteropServices; + +namespace PVR150Tuner +{ + + static class Program + { + + #region Interop + + [DllImport("hcwIRblast.dll")] + static extern ushort UIR_Open(uint bVerbose, ushort wIRPort); + + [DllImport("hcwIRblast.dll")] + static extern int UIR_Close(); + + [DllImport("hcwIRblast.dll")] + static extern int UIR_GetConfig(int device, int codeset, ref UIR_CFG cfgPtr); + + [DllImport("hcwIRblast.dll")] + static extern int UIR_GotoChannel(int device, int codeset, int channel); + + #endregion Interop + + #region Structures + + [StructLayout(LayoutKind.Sequential, Pack = 8)] + struct UIR_CFG + { + public int a; // 0x38; + public int b; + public int c; // Region + public int d; // Device + public int e; // Vendor + public int f; // Code Set + public int g; + public int h; + public int i; // Minimum Digits + public int j; // Digit Delay + public int k; // Need Enter + public int l; // Enter Delay + public int m; // Tune Delay + public int n; // One Digit Delay + } + + #endregion Structures + + #region Constants + + const int ReturnError = 1; + const int ReturnSuccess = 0; + + #endregion Constants + + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static int Main(string[] args) + { + Console.WriteLine("PVR150 Tuner"); + Console.WriteLine(); + + if (args.Length != 1) + { + Console.WriteLine("Usage:"); + Console.WriteLine(" PVR150Tuner.exe <Channel Number>"); + Console.WriteLine(); + return ReturnError; + } + + bool deviceOpen = false; + + try + { + int channelNumber; + if (!int.TryParse(args[0], out channelNumber)) + throw new ApplicationException(String.Format("Failed to convert command line parameter ({0}) to channel number", args[0])); + + Console.WriteLine("Attempting to tune channel {0} ...", channelNumber); + Console.WriteLine(); + + int returnValue = UIR_Open(0, 0); + if (returnValue == 0) + throw new ApplicationException(String.Format("Failed to start device access ({0})", returnValue)); + else + deviceOpen = true; + + UIR_CFG config = new UIR_CFG(); + config.a = 0x38; + + returnValue = UIR_GetConfig(-1, -1, ref config); + if (returnValue == 0) + { + Console.WriteLine("Device configuration ..."); + Console.WriteLine(); + Console.WriteLine("Device: {0} Vendor: {1}", config.d, config.e); + Console.WriteLine("Region: {0} Code Set: {1}", config.c, config.f); + Console.WriteLine("Digit Delay: {0} Minimum Digits: {1}", config.j, config.i); + Console.WriteLine("One Digit Delay: {0} Tune Delay: {1}", config.n, config.m); + Console.WriteLine("Need Enter: {0} Enter Delay: {1}", config.k, config.l); + Console.WriteLine(); + } + else + { + throw new ApplicationException(String.Format("Failed to retrieve device configuration ({0})", returnValue)); + } + + returnValue = UIR_GotoChannel(config.d, config.f, channelNumber); + if (returnValue == 0) + throw new ApplicationException(String.Format("Failed to tune channel ({0})", returnValue)); + } + catch (ApplicationException ex) + { + Console.WriteLine("Error: {0}", ex.Message); + return ReturnError; + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + return ReturnError; + } + finally + { + if (deviceOpen) + UIR_Close(); + } + + Console.WriteLine("Done."); + return ReturnSuccess; + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/PVR150 Tuner/Properties/AssemblyInfo.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PVR150 Tuner")] +[assembly: AssemblyDescription("Command line tuner for Hauppauge PVR-150 devices")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("PVR150 Tuner")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("57d8b7f1-678f-4169-80ba-e190dd01fba4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] Property changes on: trunk/plugins/IR Server Suite/Applications/SageSetup ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.Designer.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,248 @@ +namespace SageSetup +{ + + partial class FormMain + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.buttonSet = new System.Windows.Forms.Button(); + this.groupBoxIRBlast = new System.Windows.Forms.GroupBox(); + this.radioButtonConsole = new System.Windows.Forms.RadioButton(); + this.radioButtonWindowless = new System.Windows.Forms.RadioButton(); + this.groupBoxSagePlugin = new System.Windows.Forms.GroupBox(); + this.radioButtonExeTuner = new System.Windows.Forms.RadioButton(); + this.radioButtonExeMultiTuner = new System.Windows.Forms.RadioButton(); + this.groupBoxIRServer = new System.Windows.Forms.GroupBox(); + this.comboBoxComputer = new System.Windows.Forms.ComboBox(); + this.groupBoxChannelFormat = new System.Windows.Forms.GroupBox(); + this.checkBoxPad = new System.Windows.Forms.CheckBox(); + this.numericUpDownPad = new System.Windows.Forms.NumericUpDown(); + this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.groupBoxIRBlast.SuspendLayout(); + this.groupBoxSagePlugin.SuspendLayout(); + this.groupBoxIRServer.SuspendLayout(); + this.groupBoxChannelFormat.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPad)).BeginInit(); + this.SuspendLayout(); + // + // buttonSet + // + this.buttonSet.Location = new System.Drawing.Point(184, 312); + this.buttonSet.Name = "buttonSet"; + this.buttonSet.Size = new System.Drawing.Size(56, 24); + this.buttonSet.TabIndex = 4; + this.buttonSet.Text = "Set!"; + this.toolTips.SetToolTip(this.buttonSet, "Put the setttings in place"); + this.buttonSet.UseVisualStyleBackColor = true; + this.buttonSet.Click += new System.EventHandler(this.buttonSet_Click); + // + // groupBoxIRBlast + // + this.groupBoxIRBlast.Controls.Add(this.radioButtonWindowless); + this.groupBoxIRBlast.Controls.Add(this.radioButtonConsole); + this.groupBoxIRBlast.Location = new System.Drawing.Point(8, 96); + this.groupBoxIRBlast.Name = "groupBoxIRBlast"; + this.groupBoxIRBlast.Size = new System.Drawing.Size(232, 80); + this.groupBoxIRBlast.TabIndex = 1; + this.groupBoxIRBlast.TabStop = false; + this.groupBoxIRBlast.Text = "IR Blast"; + // + // radioButtonConsole + // + this.radioButtonConsole.AutoSize = true; + this.radioButtonConsole.Checked = true; + this.radioButtonConsole.Location = new System.Drawing.Point(8, 24); + this.radioButtonConsole.Name = "radioButtonConsole"; + this.radioButtonConsole.Size = new System.Drawing.Size(121, 17); + this.radioButtonConsole.TabIndex = 0; + this.radioButtonConsole.TabStop = true; + this.radioButtonConsole.Text = "Use console version"; + this.toolTips.SetToolTip(this.radioButtonConsole, "Use the console version of IR Blast"); + this.radioButtonConsole.UseVisualStyleBackColor = true; + // + // radioButtonWindowless + // + this.radioButtonWindowless.AutoSize = true; + this.radioButtonWindowless.Location = new System.Drawing.Point(8, 48); + this.radioButtonWindowless.Name = "radioButtonWindowless"; + this.radioButtonWindowless.Size = new System.Drawing.Size(138, 17); + this.radioButtonWindowless.TabIndex = 1; + this.radioButtonWindowless.Text = "Use windowless version"; + this.toolTips.SetToolTip(this.radioButtonWindowless, "Use the No Window version of IR Blast"); + this.radioButtonWindowless.UseVisualStyleBackColor = true; + // + // groupBoxSagePlugin + // + this.groupBoxSagePlugin.Controls.Add(this.radioButtonExeMultiTuner); + this.groupBoxSagePlugin.Controls.Add(this.radioButtonExeTuner); + this.groupBoxSagePlugin.Location = new System.Drawing.Point(8, 8); + this.groupBoxSagePlugin.Name = "groupBoxSagePlugin"; + this.groupBoxSagePlugin.Size = new System.Drawing.Size(232, 80); + this.groupBoxSagePlugin.TabIndex = 0; + this.groupBoxSagePlugin.TabStop = false; + this.groupBoxSagePlugin.Text = "Sage Plugin"; + // + // radioButtonExeTuner + // + this.radioButtonExeTuner.AutoSize = true; + this.radioButtonExeTuner.Checked = true; + this.radioButtonExeTuner.Location = new System.Drawing.Point(8, 24); + this.radioButtonExeTuner.Name = "radioButtonExeTuner"; + this.radioButtonExeTuner.Size = new System.Drawing.Size(96, 17); + this.radioButtonExeTuner.TabIndex = 0; + this.radioButtonExeTuner.TabStop = true; + this.radioButtonExeTuner.Text = "Use EXETuner"; + this.toolTips.SetToolTip(this.radioButtonExeTuner, "Use the Sage EXE Tuner plugin"); + this.radioButtonExeTuner.UseVisualStyleBackColor = true; + // + // radioButtonExeMultiTuner + // + this.radioButtonExeMultiTuner.AutoSize = true; + this.radioButtonExeMultiTuner.Location = new System.Drawing.Point(8, 48); + this.radioButtonExeMultiTuner.Name = "radioButtonExeMultiTuner"; + this.radioButtonExeMultiTuner.Size = new System.Drawing.Size(118, 17); + this.radioButtonExeMultiTuner.TabIndex = 1; + this.radioButtonExeMultiTuner.Text = "Use EXEMultiTuner"; + this.toolTips.SetToolTip(this.radioButtonExeMultiTuner, "Use the Sage EXE Multi Tuner plugin"); + this.radioButtonExeMultiTuner.UseVisualStyleBackColor = true; + // + // groupBoxIRServer + // + this.groupBoxIRServer.Controls.Add(this.comboBoxComputer); + this.groupBoxIRServer.Location = new System.Drawing.Point(8, 184); + this.groupBoxIRServer.Name = "groupBoxIRServer"; + this.groupBoxIRServer.Size = new System.Drawing.Size(232, 56); + this.groupBoxIRServer.TabIndex = 2; + this.groupBoxIRServer.TabStop = false; + this.groupBoxIRServer.Text = "IR Server"; + // + // comboBoxComputer + // + this.comboBoxComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxComputer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.comboBoxComputer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.comboBoxComputer.FormattingEnabled = true; + this.comboBoxComputer.Location = new System.Drawing.Point(8, 24); + this.comboBoxComputer.Name = "comboBoxComputer"; + this.comboBoxComputer.Size = new System.Drawing.Size(216, 21); + this.comboBoxComputer.TabIndex = 0; + this.toolTips.SetToolTip(this.comboBoxComputer, "Host computer for IR Server"); + // + // groupBoxChannelFormat + // + this.groupBoxChannelFormat.Controls.Add(this.numericUpDownPad); + this.groupBoxChannelFormat.Controls.Add(this.checkBoxPad); + this.groupBoxChannelFormat.Location = new System.Drawing.Point(8, 248); + this.groupBoxChannelFormat.Name = "groupBoxChannelFormat"; + this.groupBoxChannelFormat.Size = new System.Drawing.Size(232, 56); + this.groupBoxChannelFormat.TabIndex = 3; + this.groupBoxChannelFormat.TabStop = false; + this.groupBoxChannelFormat.Text = "Channel Format"; + // + // checkBoxPad + // + this.checkBoxPad.Location = new System.Drawing.Point(8, 24); + this.checkBoxPad.Name = "checkBoxPad"; + this.checkBoxPad.Size = new System.Drawing.Size(144, 20); + this.checkBoxPad.TabIndex = 0; + this.checkBoxPad.Text = "Pad channel number"; + this.toolTips.SetToolTip(this.checkBoxPad, "Do you want to pad channel numbers?"); + this.checkBoxPad.UseVisualStyleBackColor = true; + // + // numericUpDownPad + // + this.numericUpDownPad.Location = new System.Drawing.Point(152, 24); + this.numericUpDownPad.Maximum = new decimal(new int[] { + 9, + 0, + 0, + 0}); + this.numericUpDownPad.Minimum = new decimal(new int[] { + 2, + 0, + 0, + 0}); + this.numericUpDownPad.Name = "numericUpDownPad"; + this.numericUpDownPad.Size = new System.Drawing.Size(72, 20); + this.numericUpDownPad.TabIndex = 1; + this.numericUpDownPad.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.toolTips.SetToolTip(this.numericUpDownPad, "Pad out channel numbers to this many digits"); + this.numericUpDownPad.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(248, 344); + this.Controls.Add(this.groupBoxChannelFormat); + this.Controls.Add(this.groupBoxIRServer); + this.Controls.Add(this.groupBoxSagePlugin); + this.Controls.Add(this.groupBoxIRBlast); + this.Controls.Add(this.buttonSet); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormMain"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "IR Server - Sage Setup"; + this.Load += new System.EventHandler(this.FormMain_Load); + this.groupBoxIRBlast.ResumeLayout(false); + this.groupBoxIRBlast.PerformLayout(); + this.groupBoxSagePlugin.ResumeLayout(false); + this.groupBoxSagePlugin.PerformLayout(); + this.groupBoxIRServer.ResumeLayout(false); + this.groupBoxChannelFormat.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownPad)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonSet; + private System.Windows.Forms.GroupBox groupBoxIRBlast; + private System.Windows.Forms.RadioButton radioButtonWindowless; + private System.Windows.Forms.RadioButton radioButtonConsole; + private System.Windows.Forms.GroupBox groupBoxSagePlugin; + private System.Windows.Forms.RadioButton radioButtonExeMultiTuner; + private System.Windows.Forms.RadioButton radioButtonExeTuner; + private System.Windows.Forms.GroupBox groupBoxIRServer; + private System.Windows.Forms.ComboBox comboBoxComputer; + private System.Windows.Forms.GroupBox groupBoxChannelFormat; + private System.Windows.Forms.CheckBox checkBoxPad; + private System.Windows.Forms.ToolTip toolTips; + private System.Windows.Forms.NumericUpDown numericUpDownPad; + } + +} + Added: trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,120 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using Microsoft.Win32; +using IrssUtils; + +namespace SageSetup +{ + + /// <summary> + /// Main Sage Setup form. + /// </summary> + public partial class FormMain : Form + { + + string _irBlastLocation = null; + + /// <summary> + /// Initializes a new instance of the <see cref="FormMain"/> class. + /// </summary> + public FormMain() + { + InitializeComponent(); + } + + private void FormMain_Load(object sender, EventArgs e) + { + List<string> networkPCs = Network.GetComputers(false); + if (networkPCs == null) + { + MessageBox.Show(this, "No server names detected.", "Network Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + Application.Exit(); + return; + } + else + { + comboBoxComputer.Items.AddRange(networkPCs.ToArray()); + } + + _irBlastLocation = SystemRegistry.GetInstallFolder(); + + if (String.IsNullOrEmpty(_irBlastLocation)) + { + MessageBox.Show(this, "IR Server Suite install location not found, please re-install IR Server Suite", "Application Location Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + Application.Exit(); + return; + } + } + + private void buttonSet_Click(object sender, EventArgs e) + { +/* +[HKEY_LOCAL_MACHINE\SOFTWARE\Sage\EXETunerPlugin] +"Command"="\"C:\\Program Files\\IR Server Suite\\IR Blast\\IRBlast.exe\" -host localhost -channel %CHANNEL%" + +[HKEY_LOCAL_MACHINE\SOFTWARE\Frey Technologies\Common\EXEMultiTunerPlugin] +"Command"="\"C:\\Program Files\\IR Server Suite\\IR Blast\\IRBlast.exe\" -host localhost -port Port_%DEVICE% -channel %CHANNEL%" +*/ + string hostComputer = comboBoxComputer.Text; + + if (String.IsNullOrEmpty(hostComputer)) + { + MessageBox.Show(this, "You must specify an IR Server host computer", "No Server Host", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + RegistryKey mainKey = null; + + try + { + if (radioButtonExeTuner.Checked) + mainKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Sage\\EXETunerPlugin"); + else + mainKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Frey Technologies\\Common\\EXEMultiTunerPlugin"); + + StringBuilder command = new StringBuilder(); + command.Append("\""); + command.Append(_irBlastLocation); + command.Append("\\IR Blast\\"); + if (radioButtonConsole.Checked) + command.Append("IRBlast.exe"); + else + command.Append("IRBlast-NoWindow.exe"); + command.Append("\""); + + command.Append(" -host "); + command.Append(hostComputer); + + if (radioButtonExeMultiTuner.Checked) + command.Append(" -port Port_%DEVICE%"); + + if (checkBoxPad.Checked) + command.AppendFormat(" -pad {0}", numericUpDownPad.Value); + + command.Append(" -channel %CHANNEL%"); + + mainKey.SetValue("Command", command.ToString(), RegistryValueKind.String); + + MessageBox.Show(this, "Sage plugin setup complete", "Done", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + finally + { + if (mainKey != null) + mainKey.Close(); + } + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.resx 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/SageSetup/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/Program.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace SageSetup +{ + + static class Program + { + + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FormMain()); + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/SageSetup/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/Properties/AssemblyInfo.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IR Server - Sage Setup")] +[assembly: AssemblyDescription("Setup the Sage EXE Tuner plugins for use with IR Server Suite")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("SageSetup")] +[assembly: AssemblyCopyright("Copyright © Aaron Dinnage, 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("98cabc3d-5464-4122-aa78-483535991e02")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] Added: trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,98 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{905131F8-F8AC-4A65-A722-37783902D7B8}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>SageSetup</RootNamespace> + <AssemblyName>SageSetup</AssemblyName> + <StartupObject>SageSetup.Program</StartupObject> + <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>bin\x86\Release\</OutputPath> + <Optimize>true</Optimize> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <DebugType>none</DebugType> + <PlatformTarget>x86</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <DocumentationFile> + </DocumentationFile> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <Optimize>true</Optimize> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <DebugType>pdbonly</DebugType> + <PlatformTarget>AnyCPU</PlatformTarget> + <UseVSHostingProcess>false</UseVSHostingProcess> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="FormMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormMain.Designer.cs"> + <DependentUpon>FormMain.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="FormMain.resx"> + <SubType>Designer</SubType> + <DependentUpon>FormMain.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj"> + <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> + <Name>IrssUtils</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="SageSetup.exe.manifest"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/SageSetup/SageSetup.exe.manifest =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/SageSetup.exe.manifest (rev 0) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/SageSetup.exe.manifest 2008-02-23 10:54:21 UTC (rev 1391) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" > + <assemblyIdentity version="1.0.4.2" processorArchitecture="X86" name="SageSetup" type="win32" /> + <description>Setup the Sage EXE Tuner plugins for use with IR Server Suite</description> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level="requireAdministrator" /> + </requestedPrivileges> + </security> + </trustInfo> +</assembly> Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -336,6 +336,7 @@ this.labelProgramsDelete.TabIndex = 2; this.labelProgramsDelete.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.toolTip.SetToolTip(this.labelProgramsDelete, "Remove program"); + this.labelProgramsDelete.Click += new System.EventHandler(this.labelProgramsDelete_Click); // // labelProgramsEdit // @@ -348,6 +349,7 @@ this.labelProgramsEdit.TabIndex = 1; this.labelProgramsEdit.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.toolTip.SetToolTip(this.labelProgramsEdit, "Edit program"); + this.labelProgramsEdit.Click += new System.EventHandler(this.labelProgramsEdit_Click); // // labelProgramsAdd // @@ -360,6 +362,7 @@ this.labelProgramsAdd.TabIndex = 0; this.labelProgramsAdd.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.toolTip.SetToolTip(this.labelProgramsAdd, "Add program"); + this.labelProgramsAdd.Click += new System.EventHandler(this.labelProgramsAdd_Click); // // toolStripButtonMappings // @@ -737,7 +740,7 @@ // this.checkBoxAutoRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxAutoRun.AutoSize = true; - this.checkBoxAutoRun.Location = new System.Drawing.Point(16, 440); + this.checkBoxAutoRun.Location = new System.Drawing.Point(8, 448); this.checkBoxAutoRun.Name = "checkBoxAutoRun"; this.checkBoxAutoRun.Size = new System.Drawing.Size(167, 17); this.checkBoxAutoRun.TabIndex = 2; @@ -861,15 +864,15 @@ this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(544, 472); + this.ClientSize = new System.Drawing.Size(544, 473); this.Controls.Add(this.tabControl); - this.Controls.Add(this.checkBoxAutoRun); this.Controls.Add(this.menuStrip); this.Controls.Add(this.buttonOK); + this.Controls.Add(this.checkBoxAutoRun); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuStrip; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(472, 448); + this.MinimumSize = new System.Drawing.Size(552, 480); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Translator"; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -1382,6 +1382,44 @@ } } + private void labelProgramsAdd_Click(object sender, EventArgs e) + { + AddProgram(); + } + private void labelProgramsEdit_Click(object sender, EventArgs e) + { + if (listViewPrograms.SelectedItems.Count == 0) + return; + + string selectedItem = listViewPrograms.SelectedItems[0].Text; + + EditProgram(selectedItem); + } + private void labelProgramsDelete_Click(object sender, EventArgs e) + { + if (listViewPrograms.SelectedItems.Count == 0) + return; + + string selectedItem = listViewPrograms.SelectedItems[0].Text; + + string message = String.Format("Are you sure you want to remove all mappings for {0}?", selectedItem); + string caption = String.Format("Remove {0}?", selectedItem); + + if (MessageBox.Show(this, message, caption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + foreach (ProgramSettings progSettings in Program.Config.Programs) + { + if (progSettings.Name.Equals(selectedItem)) + { + Program.Config.Programs.Remove(progSettings); + break; + } + } + + RefreshProgramList(); + } + } + } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -868,11 +868,11 @@ } static void MouseHandlerCallback(int deltaX, int deltaY, int buttons) { + if (deltaX != 0 || deltaY != 0) + Mouse.Move(deltaX, deltaY, false); + if (buttons != (int)Mouse.MouseEvents.None) Mouse.Button((Mouse.MouseEvents)buttons); - - if (deltaX != 0 || deltaY != 0) - Mouse.Move(deltaX, deltaY, false); } static void MapEvent(MappingEvent theEvent) Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -886,6 +886,7 @@ /// Get a list of commands found in the Command Libraries. /// </summary> /// <returns>Available commands.</returns> + /* public static Type[] GetLibraryCommands() { try @@ -936,7 +937,7 @@ return null; } } - + */ /// <summary> /// Returns a list of IR Commands. /// </summary> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-02-23 10:54:21 UTC (rev 1391) @@ -360,12 +360,6 @@ <Content Include="Graphics\TopLeft.png" /> <Content Include="Graphics\TopRight.png" /> </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Commands\Command\Command.csproj"> - <Project>{21E04B17-D850-43E7-AAD3-876C0E062BDB}</Project> - <Name>Command</Name> - </ProjectReference> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -37,6 +37,8 @@ this.numericUpDownInputByteMask = new System.Windows.Forms.NumericUpDown(); this.labelRepeatDelay = new System.Windows.Forms.Label(); this.numericUpDownRepeatDelay = new System.Windows.Forms.NumericUpDown(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByte)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByteMask)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatDelay)).BeginInit(); @@ -52,7 +54,7 @@ 0}); this.numericUpDownInputByte.Name = "numericUpDownInputByte"; this.numericUpDownInputByte.Size = new System.Drawing.Size(56, 20); - this.numericUpDownInputByte.TabIndex = 0; + this.numericUpDownInputByte.TabIndex = 1; this.numericUpDownInputByte.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // // labelInputByte @@ -60,7 +62,7 @@ this.labelInputByte.Location = new System.Drawing.Point(8, 8); this.labelInputByte.Name = "labelInputByte"; this.labelInputByte.Size = new System.Drawing.Size(104, 20); - this.labelInputByte.TabIndex = 1; + this.labelInputByte.TabIndex = 0; this.labelInputByte.Text = "Input byte:"; this.labelInputByte.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -70,7 +72,7 @@ this.checkBoxUseAllBytes.Location = new System.Drawing.Point(8, 72); this.checkBoxUseAllBytes.Name = "checkBoxUseAllBytes"; this.checkBoxUseAllBytes.Size = new System.Drawing.Size(112, 17); - this.checkBoxUseAllBytes.TabIndex = 2; + this.checkBoxUseAllBytes.TabIndex = 4; this.checkBoxUseAllBytes.Text = "Use all input bytes"; this.checkBoxUseAllBytes.UseVisualStyleBackColor = true; // @@ -79,7 +81,7 @@ this.labelInputByteMask.Location = new System.Drawing.Point(8, 40); this.labelInputByteMask.Name = "labelInputByteMask"; this.labelInputByteMask.Size = new System.Drawing.Size(104, 20); - this.labelInputByteMask.TabIndex = 4; + this.labelInputByteMask.TabIndex = 2; this.labelInputByteMask.Text = "Input byte mask:"; this.labelInputByteMask.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -101,7 +103,7 @@ this.labelRepeatDelay.Location = new System.Drawing.Point(8, 104); this.labelRepeatDelay.Name = "labelRepeatDelay"; this.labelRepeatDelay.Size = new System.Drawing.Size(104, 20); - this.labelRepeatDelay.TabIndex = 6; + this.labelRepeatDelay.TabIndex = 5; this.labelRepeatDelay.Text = "Repeat delay:"; this.labelRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -115,14 +117,41 @@ 0}); this.numericUpDownRepeatDelay.Name = "numericUpDownRepeatDelay"; this.numericUpDownRepeatDelay.Size = new System.Drawing.Size(56, 20); - this.numericUpDownRepeatDelay.TabIndex = 5; + this.numericUpDownRepeatDelay.TabIndex = 6; this.numericUpDownRepeatDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(32, 144); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 7; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(104, 144); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 8; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // // AdvancedSettings // + this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(176, 137); + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(176, 177); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); this.Controls.Add(this.labelRepeatDelay); this.Controls.Add(this.numericUpDownRepeatDelay); this.Controls.Add(this.labelInputByteMask); @@ -130,8 +159,10 @@ this.Controls.Add(this.checkBoxUseAllBytes); this.Controls.Add(this.labelInputByte); this.Controls.Add(this.numericUpDownInputByte); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(182, 202); this.Name = "AdvancedSettings"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -153,6 +184,8 @@ private System.Windows.Forms.NumericUpDown numericUpDownInputByteMask; private System.Windows.Forms.Label labelRepeatDelay; private System.Windows.Forms.NumericUpDown numericUpDownRepeatDelay; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -12,11 +12,44 @@ internal partial class AdvancedSettings : Form { + public int InputByte + { + get { return decimal.ToInt32(numericUpDownInputByte.Value); } + set { numericUpDownInputByte.Value = new decimal(value); } + } + public byte ByteMask + { + get { return decimal.ToByte(numericUpDownInputByteMask.Value); } + set { numericUpDownInputByteMask.Value = new decimal(value); } + } + public bool UseAllBytes + { + get { return checkBoxUseAllBytes.Checked; } + set { checkBoxUseAllBytes.Checked = value; } + } + public int RepeatDelay + { + get { return decimal.ToInt32(numericUpDownRepeatDelay.Value); } + set { numericUpDownRepeatDelay.Value = new decimal(value); } + } + public AdvancedSettings() { InitializeComponent(); } + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-02-22 21:54:13 UTC (rev 1390) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-02-23 10:54:21 UTC (rev 1391) @@ -162,12 +162,21 @@ { LoadSettings(); - DeviceSelect deviceSelect = new DeviceSelect(); + DeviceSelect deviceSelect = new DeviceSelect(); deviceSelect.SelectedDevice = _device; + deviceSelect.InputByte = _inputByte; + deviceSelect.ByteMask = _byteMask; + deviceSelect.UseAllBytes = _useAllBytes; + deviceSelect.RepeatDelay = _repeatDelay; if (deviceSelect.ShowDialog(owner) == DialogResult.OK) { - _device = deviceSelect.SelectedDevice; + _device = deviceSelect.SelectedDevice; + _inputByte = deviceSelect.InputByte; + _byteMask = deviceSelect.ByteMask; + _useAllBytes = deviceSelect.UseAllBytes; + _repeatDelay = deviceSelect.RepeatDelay; + SaveSettings(); } } @@ -363,6 +372,12 @@ string code = BitConverter.ToString(newArray); + if (!_useAllBytes) + { + int val = newArray[_inputByte] & _byteMask; + code = String.Format("{0:X2}", val); + } + #if TRACE Trace.WriteLine(code); #endif @@ -414,8 +429,8 @@ #if TRACE Trace.WriteLine(String.Format("E0: {0}", raw.keyboard.MakeCode)); #endif - if (_keyboardHandler != null) - _keyboardHandler(0xE000 | raw.keyboard.MakeCode, true); + //if (_keyboardHandler != null) + //_keyboardHandler(0xE000 | raw.keyboard.MakeCode, true); break; @@ -423,8 +438,8 @@ #if TRACE Trace.WriteLine("E1"); #endif - if (_keyboardHandler != null) - _keyboardHandler(0xE100, true); + //if (_keyboardHandler != n... [truncated message content] |