From: <an...@us...> - 2008-04-24 16:41:09
|
Revision: 1704 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1704&view=rev Author: and-81 Date: 2008-04-24 09:39:14 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/setup/setup.nsi trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/PlayOnStart/PlayOnStart.cs trunk/plugins/TelnetInterface/TelnetInterface.cs Added Paths: ----------- trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Icon.ico trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Keyboard.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Mouse.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Properties/ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Properties/Resources.resx trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/RawInput.cs trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/ReceiverWindow.cs trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/iMon USB Receivers/ trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/iMon USB Receivers/Imon Front Panel.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/iMon USB Receivers/Imon PAD.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/iMon USB Receivers/Imon Volume Knob.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/iMon USB Receivers/Microsoft MCE.xml Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-04-24 16:33:56 UTC (rev 1703) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-04-24 16:39:14 UTC (rev 1704) @@ -186,7 +186,7 @@ _notifyIcon.Icon = Properties.Resources.Icon16Connecting; _notifyIcon.Text = "Translator - Connecting ..."; _notifyIcon.DoubleClick += new EventHandler(ClickSetup); - _notifyIcon.Visible = false; + _notifyIcon.Visible = !_config.HideTrayIcon; // Setup the main form ... _mainForm = new MainForm(); @@ -223,8 +223,6 @@ IrssLog.Error("Error enabling CopyData messages: {0}", ex.ToString()); } - _notifyIcon.Visible = !_config.HideTrayIcon; - Application.Run(); if (_copyDataWM != null) Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs 2008-04-24 16:33:56 UTC (rev 1703) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs 2008-04-24 16:39:14 UTC (rev 1704) @@ -165,7 +165,7 @@ public enum RawInputCommand { Input = 0x10000003, - Header = 0x10000005 + Header = 0x10000005, } [Flags()] Property changes on: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs 2008-04-24 16:39:14 UTC (rev 1704) @@ -0,0 +1,556 @@ +namespace InputService.Plugin +{ + + partial class Configuration + { + + /// <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.labelButtonRepeatDelay = new System.Windows.Forms.Label(); + this.labelButtonHeldDelay = new System.Windows.Forms.Label(); + this.numericUpDownButtonRepeatDelay = new System.Windows.Forms.NumericUpDown(); + this.numericUpDownButtonHeldDelay = new System.Windows.Forms.NumericUpDown(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.groupBoxRemoteTiming = new System.Windows.Forms.GroupBox(); + this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.numericUpDownKeyHeldDelay = new System.Windows.Forms.NumericUpDown(); + this.numericUpDownKeyRepeatDelay = new System.Windows.Forms.NumericUpDown(); + this.checkBoxHandleKeyboardLocal = new System.Windows.Forms.CheckBox(); + this.checkBoxHandleMouseLocal = new System.Windows.Forms.CheckBox(); + this.numericUpDownMouseSensitivity = new System.Windows.Forms.NumericUpDown(); + this.checkBoxEnableRemote = new System.Windows.Forms.CheckBox(); + this.checkBoxEnableKeyboard = new System.Windows.Forms.CheckBox(); + this.checkBoxEnableMouse = new System.Windows.Forms.CheckBox(); + this.checkBoxUseSystemRatesRemote = new System.Windows.Forms.CheckBox(); + this.checkBoxUseSystemRatesKeyboard = new System.Windows.Forms.CheckBox(); + this.comboBoxHardwareMode = new System.Windows.Forms.ComboBox(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPageRemote = new System.Windows.Forms.TabPage(); + this.labelHardwareMode = new System.Windows.Forms.Label(); + this.tabPageKeyboard = new System.Windows.Forms.TabPage(); + this.groupBoxKeypressTiming = new System.Windows.Forms.GroupBox(); + this.labelKeyRepeatDelay = new System.Windows.Forms.Label(); + this.labelKeyHeldDelay = new System.Windows.Forms.Label(); + this.tabPageMouse = new System.Windows.Forms.TabPage(); + this.labelMouseSensitivity = new System.Windows.Forms.Label(); + this.comboBoxRemoteMode = new System.Windows.Forms.ComboBox(); + this.labelRemoteMode = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).BeginInit(); + this.groupBoxRemoteTiming.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyHeldDelay)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyRepeatDelay)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseSensitivity)).BeginInit(); + this.tabControl.SuspendLayout(); + this.tabPageRemote.SuspendLayout(); + this.tabPageKeyboard.SuspendLayout(); + this.groupBoxKeypressTiming.SuspendLayout(); + this.tabPageMouse.SuspendLayout(); + this.SuspendLayout(); + // + // labelButtonRepeatDelay + // + this.labelButtonRepeatDelay.Location = new System.Drawing.Point(8, 24); + this.labelButtonRepeatDelay.Name = "labelButtonRepeatDelay"; + this.labelButtonRepeatDelay.Size = new System.Drawing.Size(128, 20); + this.labelButtonRepeatDelay.TabIndex = 0; + this.labelButtonRepeatDelay.Text = "Button repeat delay:"; + this.labelButtonRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelButtonHeldDelay + // + this.labelButtonHeldDelay.Location = new System.Drawing.Point(8, 56); + this.labelButtonHeldDelay.Name = "labelButtonHeldDelay"; + this.labelButtonHeldDelay.Size = new System.Drawing.Size(128, 20); + this.labelButtonHeldDelay.TabIndex = 2; + this.labelButtonHeldDelay.Text = "Button held delay:"; + this.labelButtonHeldDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // numericUpDownButtonRepeatDelay + // + this.numericUpDownButtonRepeatDelay.Increment = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownButtonRepeatDelay.Location = new System.Drawing.Point(144, 24); + this.numericUpDownButtonRepeatDelay.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numericUpDownButtonRepeatDelay.Name = "numericUpDownButtonRepeatDelay"; + this.numericUpDownButtonRepeatDelay.Size = new System.Drawing.Size(80, 20); + this.numericUpDownButtonRepeatDelay.TabIndex = 1; + this.numericUpDownButtonRepeatDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownButtonRepeatDelay.ThousandsSeparator = true; + this.toolTips.SetToolTip(this.numericUpDownButtonRepeatDelay, "When the button is held this is the time between the first press and the first re" + + "peat"); + this.numericUpDownButtonRepeatDelay.Value = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + // + // numericUpDownButtonHeldDelay + // + this.numericUpDownButtonHeldDelay.Increment = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownButtonHeldDelay.Location = new System.Drawing.Point(144, 56); + this.numericUpDownButtonHeldDelay.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numericUpDownButtonHeldDelay.Name = "numericUpDownButtonHeldDelay"; + this.numericUpDownButtonHeldDelay.Size = new System.Drawing.Size(80, 20); + this.numericUpDownButtonHeldDelay.TabIndex = 3; + this.numericUpDownButtonHeldDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownButtonHeldDelay.ThousandsSeparator = true; + this.toolTips.SetToolTip(this.numericUpDownButtonHeldDelay, "When the button is held this is the time between repeats"); + this.numericUpDownButtonHeldDelay.Value = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + // + // 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(128, 263); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 1; + 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(200, 263); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 2; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // groupBoxRemoteTiming + // + this.groupBoxRemoteTiming.Controls.Add(this.labelButtonRepeatDelay); + this.groupBoxRemoteTiming.Controls.Add(this.numericUpDownButtonHeldDelay); + this.groupBoxRemoteTiming.Controls.Add(this.labelButtonHeldDelay); + this.groupBoxRemoteTiming.Controls.Add(this.numericUpDownButtonRepeatDelay); + this.groupBoxRemoteTiming.Location = new System.Drawing.Point(8, 72); + this.groupBoxRemoteTiming.Name = "groupBoxRemoteTiming"; + this.groupBoxRemoteTiming.Size = new System.Drawing.Size(232, 88); + this.groupBoxRemoteTiming.TabIndex = 2; + this.groupBoxRemoteTiming.TabStop = false; + this.groupBoxRemoteTiming.Text = "Remote button timing (in milliseconds)"; + // + // numericUpDownKeyHeldDelay + // + this.numericUpDownKeyHeldDelay.Increment = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownKeyHeldDelay.Location = new System.Drawing.Point(144, 56); + this.numericUpDownKeyHeldDelay.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownKeyHeldDelay.Name = "numericUpDownKeyHeldDelay"; + this.numericUpDownKeyHeldDelay.Size = new System.Drawing.Size(80, 20); + this.numericUpDownKeyHeldDelay.TabIndex = 4; + this.numericUpDownKeyHeldDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownKeyHeldDelay.ThousandsSeparator = true; + this.toolTips.SetToolTip(this.numericUpDownKeyHeldDelay, "When a key is held this is the time between repeats"); + this.numericUpDownKeyHeldDelay.Value = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + // + // numericUpDownKeyRepeatDelay + // + this.numericUpDownKeyRepeatDelay.Increment = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.numericUpDownKeyRepeatDelay.Location = new System.Drawing.Point(144, 24); + this.numericUpDownKeyRepeatDelay.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDownKeyRepeatDelay.Name = "numericUpDownKeyRepeatDelay"; + this.numericUpDownKeyRepeatDelay.Size = new System.Drawing.Size(80, 20); + this.numericUpDownKeyRepeatDelay.TabIndex = 2; + this.numericUpDownKeyRepeatDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownKeyRepeatDelay.ThousandsSeparator = true; + this.toolTips.SetToolTip(this.numericUpDownKeyRepeatDelay, "When a key is held this is the time between the first press and the first repeat"); + this.numericUpDownKeyRepeatDelay.Value = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + // + // checkBoxHandleKeyboardLocal + // + this.checkBoxHandleKeyboardLocal.AutoSize = true; + this.checkBoxHandleKeyboardLocal.Checked = true; + this.checkBoxHandleKeyboardLocal.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxHandleKeyboardLocal.Location = new System.Drawing.Point(8, 168); + this.checkBoxHandleKeyboardLocal.Name = "checkBoxHandleKeyboardLocal"; + this.checkBoxHandleKeyboardLocal.Size = new System.Drawing.Size(139, 17); + this.checkBoxHandleKeyboardLocal.TabIndex = 2; + this.checkBoxHandleKeyboardLocal.Text = "Handle keyboard locally"; + this.toolTips.SetToolTip(this.checkBoxHandleKeyboardLocal, "Act on key presses locally (on the machine Input Servie is running on)"); + this.checkBoxHandleKeyboardLocal.UseVisualStyleBackColor = true; + // + // checkBoxHandleMouseLocal + // + this.checkBoxHandleMouseLocal.AutoSize = true; + this.checkBoxHandleMouseLocal.Checked = true; + this.checkBoxHandleMouseLocal.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxHandleMouseLocal.Location = new System.Drawing.Point(8, 40); + this.checkBoxHandleMouseLocal.Name = "checkBoxHandleMouseLocal"; + this.checkBoxHandleMouseLocal.Size = new System.Drawing.Size(126, 17); + this.checkBoxHandleMouseLocal.TabIndex = 1; + this.checkBoxHandleMouseLocal.Text = "Handle mouse locally"; + this.toolTips.SetToolTip(this.checkBoxHandleMouseLocal, "Act on mouse locally (on the machine Input Service is running on)"); + this.checkBoxHandleMouseLocal.UseVisualStyleBackColor = true; + // + // numericUpDownMouseSensitivity + // + this.numericUpDownMouseSensitivity.DecimalPlaces = 1; + this.numericUpDownMouseSensitivity.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.numericUpDownMouseSensitivity.Location = new System.Drawing.Point(160, 80); + this.numericUpDownMouseSensitivity.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numericUpDownMouseSensitivity.Minimum = new decimal(new int[] { + 10, + 0, + 0, + -2147483648}); + this.numericUpDownMouseSensitivity.Name = "numericUpDownMouseSensitivity"; + this.numericUpDownMouseSensitivity.Size = new System.Drawing.Size(80, 20); + this.numericUpDownMouseSensitivity.TabIndex = 3; + this.numericUpDownMouseSensitivity.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.toolTips.SetToolTip(this.numericUpDownMouseSensitivity, "Multiply mouse movements by this number"); + this.numericUpDownMouseSensitivity.Value = new decimal(new int[] { + 10, + 0, + 0, + 65536}); + // + // checkBoxEnableRemote + // + this.checkBoxEnableRemote.AutoSize = true; + this.checkBoxEnableRemote.Checked = true; + this.checkBoxEnableRemote.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxEnableRemote.Location = new System.Drawing.Point(8, 8); + this.checkBoxEnableRemote.Name = "checkBoxEnableRemote"; + this.checkBoxEnableRemote.Size = new System.Drawing.Size(155, 17); + this.checkBoxEnableRemote.TabIndex = 0; + this.checkBoxEnableRemote.Text = "Enable remote control input"; + this.toolTips.SetToolTip(this.checkBoxEnableRemote, "Decode remote control button presses"); + this.checkBoxEnableRemote.UseVisualStyleBackColor = true; + // + // checkBoxEnableKeyboard + // + this.checkBoxEnableKeyboard.AutoSize = true; + this.checkBoxEnableKeyboard.Checked = true; + this.checkBoxEnableKeyboard.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxEnableKeyboard.Location = new System.Drawing.Point(8, 8); + this.checkBoxEnableKeyboard.Name = "checkBoxEnableKeyboard"; + this.checkBoxEnableKeyboard.Size = new System.Drawing.Size(132, 17); + this.checkBoxEnableKeyboard.TabIndex = 0; + this.checkBoxEnableKeyboard.Text = "Enable keyboard input"; + this.toolTips.SetToolTip(this.checkBoxEnableKeyboard, "Decode remote keyboard input"); + this.checkBoxEnableKeyboard.UseVisualStyleBackColor = true; + // + // checkBoxEnableMouse + // + this.checkBoxEnableMouse.AutoSize = true; + this.checkBoxEnableMouse.Checked = true; + this.checkBoxEnableMouse.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxEnableMouse.Location = new System.Drawing.Point(8, 8); + this.checkBoxEnableMouse.Name = "checkBoxEnableMouse"; + this.checkBoxEnableMouse.Size = new System.Drawing.Size(119, 17); + this.checkBoxEnableMouse.TabIndex = 0; + this.checkBoxEnableMouse.Text = "Enable mouse input"; + this.toolTips.SetToolTip(this.checkBoxEnableMouse, "Decode remote mouse input"); + this.checkBoxEnableMouse.UseVisualStyleBackColor = true; + // + // checkBoxUseSystemRatesRemote + // + this.checkBoxUseSystemRatesRemote.AutoSize = true; + this.checkBoxUseSystemRatesRemote.Location = new System.Drawing.Point(8, 40); + this.checkBoxUseSystemRatesRemote.Name = "checkBoxUseSystemRatesRemote"; + this.checkBoxUseSystemRatesRemote.Size = new System.Drawing.Size(187, 17); + this.checkBoxUseSystemRatesRemote.TabIndex = 1; + this.checkBoxUseSystemRatesRemote.Text = "Use system keyboard rate settings"; + this.toolTips.SetToolTip(this.checkBoxUseSystemRatesRemote, "Use the system keyboard repeat rate settings for remote button timing"); + this.checkBoxUseSystemRatesRemote.UseVisualStyleBackColor = true; + // + // checkBoxUseSystemRatesKeyboard + // + this.checkBoxUseSystemRatesKeyboard.AutoSize = true; + this.checkBoxUseSystemRatesKeyboard.Location = new System.Drawing.Point(8, 40); + this.checkBoxUseSystemRatesKeyboard.Name = "checkBoxUseSystemRatesKeyboard"; + this.checkBoxUseSystemRatesKeyboard.Size = new System.Drawing.Size(187, 17); + this.checkBoxUseSystemRatesKeyboard.TabIndex = 0; + this.checkBoxUseSystemRatesKeyboard.Text = "Use system keyboard rate settings"; + this.toolTips.SetToolTip(this.checkBoxUseSystemRatesKeyboard, "Use the system keyboard repeat rate settings for remote keyboard repeat rates"); + this.checkBoxUseSystemRatesKeyboard.UseVisualStyleBackColor = true; + // + // comboBoxHardwareMode + // + this.comboBoxHardwareMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxHardwareMode.FormattingEnabled = true; + this.comboBoxHardwareMode.Location = new System.Drawing.Point(152, 168); + this.comboBoxHardwareMode.Name = "comboBoxHardwareMode"; + this.comboBoxHardwareMode.Size = new System.Drawing.Size(89, 21); + this.comboBoxHardwareMode.TabIndex = 4; + this.toolTips.SetToolTip(this.comboBoxHardwareMode, "Choose between MCE and iMon remote types"); + // + // tabControl + // + this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl.Controls.Add(this.tabPageRemote); + this.tabControl.Controls.Add(this.tabPageKeyboard); + this.tabControl.Controls.Add(this.tabPageMouse); + this.tabControl.Location = new System.Drawing.Point(8, 8); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(256, 247); + this.tabControl.TabIndex = 0; + // + // tabPageRemote + // + this.tabPageRemote.Controls.Add(this.comboBoxRemoteMode); + this.tabPageRemote.Controls.Add(this.labelRemoteMode); + this.tabPageRemote.Controls.Add(this.comboBoxHardwareMode); + this.tabPageRemote.Controls.Add(this.labelHardwareMode); + this.tabPageRemote.Controls.Add(this.checkBoxUseSystemRatesRemote); + this.tabPageRemote.Controls.Add(this.checkBoxEnableRemote); + this.tabPageRemote.Controls.Add(this.groupBoxRemoteTiming); + this.tabPageRemote.Location = new System.Drawing.Point(4, 22); + this.tabPageRemote.Name = "tabPageRemote"; + this.tabPageRemote.Padding = new System.Windows.Forms.Padding(3); + this.tabPageRemote.Size = new System.Drawing.Size(248, 221); + this.tabPageRemote.TabIndex = 1; + this.tabPageRemote.Text = "Remote"; + this.tabPageRemote.UseVisualStyleBackColor = true; + // + // labelHardwareMode + // + this.labelHardwareMode.Location = new System.Drawing.Point(8, 168); + this.labelHardwareMode.Name = "labelHardwareMode"; + this.labelHardwareMode.Size = new System.Drawing.Size(136, 21); + this.labelHardwareMode.TabIndex = 3; + this.labelHardwareMode.Text = "Hardware mode:"; + this.labelHardwareMode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabPageKeyboard + // + this.tabPageKeyboard.Controls.Add(this.checkBoxUseSystemRatesKeyboard); + this.tabPageKeyboard.Controls.Add(this.checkBoxHandleKeyboardLocal); + this.tabPageKeyboard.Controls.Add(this.checkBoxEnableKeyboard); + this.tabPageKeyboard.Controls.Add(this.groupBoxKeypressTiming); + this.tabPageKeyboard.Location = new System.Drawing.Point(4, 22); + this.tabPageKeyboard.Name = "tabPageKeyboard"; + this.tabPageKeyboard.Padding = new System.Windows.Forms.Padding(3); + this.tabPageKeyboard.Size = new System.Drawing.Size(248, 221); + this.tabPageKeyboard.TabIndex = 2; + this.tabPageKeyboard.Text = "Keyboard"; + this.tabPageKeyboard.UseVisualStyleBackColor = true; + // + // groupBoxKeypressTiming + // + this.groupBoxKeypressTiming.Controls.Add(this.labelKeyRepeatDelay); + this.groupBoxKeypressTiming.Controls.Add(this.numericUpDownKeyHeldDelay); + this.groupBoxKeypressTiming.Controls.Add(this.labelKeyHeldDelay); + this.groupBoxKeypressTiming.Controls.Add(this.numericUpDownKeyRepeatDelay); + this.groupBoxKeypressTiming.Location = new System.Drawing.Point(8, 72); + this.groupBoxKeypressTiming.Name = "groupBoxKeypressTiming"; + this.groupBoxKeypressTiming.Size = new System.Drawing.Size(232, 88); + this.groupBoxKeypressTiming.TabIndex = 1; + this.groupBoxKeypressTiming.TabStop = false; + this.groupBoxKeypressTiming.Text = "Key press timing (in milliseconds)"; + // + // labelKeyRepeatDelay + // + this.labelKeyRepeatDelay.Location = new System.Drawing.Point(8, 24); + this.labelKeyRepeatDelay.Name = "labelKeyRepeatDelay"; + this.labelKeyRepeatDelay.Size = new System.Drawing.Size(128, 20); + this.labelKeyRepeatDelay.TabIndex = 1; + this.labelKeyRepeatDelay.Text = "Key repeat delay:"; + this.labelKeyRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelKeyHeldDelay + // + this.labelKeyHeldDelay.Location = new System.Drawing.Point(8, 56); + this.labelKeyHeldDelay.Name = "labelKeyHeldDelay"; + this.labelKeyHeldDelay.Size = new System.Drawing.Size(128, 20); + this.labelKeyHeldDelay.TabIndex = 3; + this.labelKeyHeldDelay.Text = "Key held delay:"; + this.labelKeyHeldDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabPageMouse + // + this.tabPageMouse.Controls.Add(this.labelMouseSensitivity); + this.tabPageMouse.Controls.Add(this.numericUpDownMouseSensitivity); + this.tabPageMouse.Controls.Add(this.checkBoxHandleMouseLocal); + this.tabPageMouse.Controls.Add(this.checkBoxEnableMouse); + this.tabPageMouse.Location = new System.Drawing.Point(4, 22); + this.tabPageMouse.Name = "tabPageMouse"; + this.tabPageMouse.Padding = new System.Windows.Forms.Padding(3); + this.tabPageMouse.Size = new System.Drawing.Size(248, 221); + this.tabPageMouse.TabIndex = 3; + this.tabPageMouse.Text = "Mouse"; + this.tabPageMouse.UseVisualStyleBackColor = true; + // + // labelMouseSensitivity + // + this.labelMouseSensitivity.Location = new System.Drawing.Point(8, 80); + this.labelMouseSensitivity.Name = "labelMouseSensitivity"; + this.labelMouseSensitivity.Size = new System.Drawing.Size(144, 20); + this.labelMouseSensitivity.TabIndex = 2; + this.labelMouseSensitivity.Text = "Mouse sensitivity:"; + this.labelMouseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxRemoteMode + // + this.comboBoxRemoteMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxRemoteMode.FormattingEnabled = true; + this.comboBoxRemoteMode.Location = new System.Drawing.Point(152, 194); + this.comboBoxRemoteMode.Name = "comboBoxRemoteMode"; + this.comboBoxRemoteMode.Size = new System.Drawing.Size(89, 21); + this.comboBoxRemoteMode.TabIndex = 6; + this.toolTips.SetToolTip(this.comboBoxRemoteMode, "Choose between MCE and iMon remote types"); + // + // labelRemoteMode + // + this.labelRemoteMode.Location = new System.Drawing.Point(8, 194); + this.labelRemoteMode.Name = "labelRemoteMode"; + this.labelRemoteMode.Size = new System.Drawing.Size(136, 21); + this.labelRemoteMode.TabIndex = 5; + this.labelRemoteMode.Text = "Remote MouseStick mode:"; + this.labelRemoteMode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // AdvancedSettings + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(272, 295); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(280, 306); + this.Name = "AdvancedSettings"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "iMon Configuration"; + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).EndInit(); + this.groupBoxRemoteTiming.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyHeldDelay)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyRepeatDelay)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseSensitivity)).EndInit(); + this.tabControl.ResumeLayout(false); + this.tabPageRemote.ResumeLayout(false); + this.tabPageRemote.PerformLayout(); + this.tabPageKeyboard.ResumeLayout(false); + this.tabPageKeyboard.PerformLayout(); + this.groupBoxKeypressTiming.ResumeLayout(false); + this.tabPageMouse.ResumeLayout(false); + this.tabPageMouse.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelButtonRepeatDelay; + private System.Windows.Forms.Label labelButtonHeldDelay; + private System.Windows.Forms.NumericUpDown numericUpDownButtonRepeatDelay; + private System.Windows.Forms.NumericUpDown numericUpDownButtonHeldDelay; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.GroupBox groupBoxRemoteTiming; + private System.Windows.Forms.ToolTip toolTips; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPageRemote; + private System.Windows.Forms.CheckBox checkBoxEnableRemote; + private System.Windows.Forms.TabPage tabPageKeyboard; + private System.Windows.Forms.GroupBox groupBoxKeypressTiming; + private System.Windows.Forms.Label labelKeyRepeatDelay; + private System.Windows.Forms.NumericUpDown numericUpDownKeyHeldDelay; + private System.Windows.Forms.Label labelKeyHeldDelay; + private System.Windows.Forms.NumericUpDown numericUpDownKeyRepeatDelay; + private System.Windows.Forms.CheckBox checkBoxHandleKeyboardLocal; + private System.Windows.Forms.CheckBox checkBoxEnableKeyboard; + private System.Windows.Forms.TabPage tabPageMouse; + private System.Windows.Forms.Label labelMouseSensitivity; + private System.Windows.Forms.NumericUpDown numericUpDownMouseSensitivity; + private System.Windows.Forms.CheckBox checkBoxHandleMouseLocal; + private System.Windows.Forms.CheckBox checkBoxEnableMouse; + private System.Windows.Forms.CheckBox checkBoxUseSystemRatesRemote; + private System.Windows.Forms.CheckBox checkBoxUseSystemRatesKeyboard; + private System.Windows.Forms.ComboBox comboBoxHardwareMode; + private System.Windows.Forms.Label labelHardwareMode; + private System.Windows.Forms.ComboBox comboBoxRemoteMode; + private System.Windows.Forms.Label labelRemoteMode; + + } + +} Added: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs 2008-04-24 16:39:14 UTC (rev 1704) @@ -0,0 +1,110 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace InputService.Plugin +{ + + partial class Configuration : Form + { + + public iMonUSBReceivers.RcMode HardwareMode + { + get { return (iMonUSBReceivers.RcMode)Enum.Parse(typeof(iMonUSBReceivers.RcMode), comboBoxHardwareMode.SelectedItem as string); } + set { comboBoxHardwareMode.SelectedItem = Enum.GetName(typeof(iMonUSBReceivers.RcMode), value); } + } + + public iMonUSBReceivers.RemoteMode RemoteMode + { + get { return (iMonUSBReceivers.RemoteMode)Enum.Parse(typeof(iMonUSBReceivers.RemoteMode), comboBoxRemoteMode.SelectedItem as string); } + set { comboBoxRemoteMode.SelectedItem = Enum.GetName(typeof(iMonUSBReceivers.RemoteMode), value); } + } + + public bool EnableRemote + { + get { return checkBoxEnableRemote.Checked; } + set { checkBoxEnableRemote.Checked = value; } + } + public bool UseSystemRatesForRemote + { + get { return checkBoxUseSystemRatesRemote.Checked; } + set { checkBoxUseSystemRatesRemote.Checked = value; } + } + public int RemoteRepeatDelay + { + get { return Decimal.ToInt32(numericUpDownButtonRepeatDelay.Value); } + set { numericUpDownButtonRepeatDelay.Value = new Decimal(value); } + } + public int RemoteHeldDelay + { + get { return Decimal.ToInt32(numericUpDownButtonHeldDelay.Value); } + set { numericUpDownButtonHeldDelay.Value = new Decimal(value); } + } + + public bool EnableKeyboard + { + get { return checkBoxEnableKeyboard.Checked; } + set { checkBoxEnableKeyboard.Checked = value; } + } + public bool UseSystemRatesForKeyboard + { + get { return checkBoxUseSystemRatesKeyboard.Checked; } + set { checkBoxUseSystemRatesKeyboard.Checked = value; } + } + public int KeyboardRepeatDelay + { + get { return Decimal.ToInt32(numericUpDownKeyRepeatDelay.Value); } + set { numericUpDownKeyRepeatDelay.Value = new Decimal(value); } + } + public int KeyboardHeldDelay + { + get { return Decimal.ToInt32(numericUpDownKeyHeldDelay.Value); } + set { numericUpDownKeyHeldDelay.Value = new Decimal(value); } + } + public bool HandleKeyboardLocal + { + get { return checkBoxHandleKeyboardLocal.Checked; } + set { checkBoxHandleKeyboardLocal.Checked = value; } + } + + public bool EnableMouse + { + get { return checkBoxEnableMouse.Checked; } + set { checkBoxEnableMouse.Checked = value; } + } + public double MouseSensitivity + { + get { return Decimal.ToDouble(numericUpDownMouseSensitivity.Value); } + set { numericUpDownMouseSensitivity.Value = new Decimal(value); } + } + public bool HandleMouseLocal + { + get { return checkBoxHandleMouseLocal.Checked; } + set { checkBoxHandleMouseLocal.Checked = value; } + } + + public Configuration() + { + InitializeComponent(); + comboBoxHardwareMode.Items.AddRange(Enum.GetNames(typeof(iMonUSBReceivers.RcMode))); + comboBoxRemoteMode.Items.AddRange(Enum.GetNames(typeof(iMonUSBReceivers.RemoteMode))); + } + + 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(); + } + + } + +} Added: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx 2008-04-24 16:39:14 UTC (rev 1704) @@ -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/IR Server Plugins/Imon USB Receivers/Icon.ico =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Icon.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs 2008-04-24 16:39:14 UTC (rev 1704) @@ -0,0 +1,3974 @@ +//#define TEST_APPLICATION +//#define DEBUG +//#define DISABLE_DEVICE_FILTER +//#define DEBUG_FAKE_KEYBOARD +//#define DEBUG_FAKE_MOUSE +//#define DEBUG_FAKE_HID + +using System; +using System.ComponentModel; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using System.Xml; +using Microsoft.Win32; +using Microsoft.Win32.SafeHandles; + +namespace InputService.Plugin +{ + + /// <summary> + /// IR Server plugin to support iMon USB devices. + /// </summary> + public partial class iMonUSBReceivers : PluginBase, IConfigure, IRemoteReceiver, IKeyboardReceiver, IMouseReceiver, IDisposable + { + #region Code to impliment the test application version of the plugin + // #define TEST_APPLICATION in the project properties when creating the console test app ... +#if TEST_APPLICATION + + #region Test Application - Enumeration for KeyCode Translation + /// <summary> + /// Remote Key Mapping (for displaying the remote button names). + /// </summary> + internal enum iMonRemoteKeyMapping + { + // iMon PAD mappings + IMON_PAD_BUTTON_APPEXIT = 1002, + IMON_PAD_BUTTON_POWER = 1016, + IMON_PAD_BUTTON_RECORD = 1064, + IMON_PAD_BUTTON_PLAY = 1128, + IMON_PAD_BUTTON_EJECT = 1114, + IMON_PAD_BUTTON_REWIND = 1130, + IMON_PAD_BUTTON_PAUSE = 1144, + IMON_PAD_BUTTON_FORWARD = 1192, + IMON_PAD_BUTTON_REPLAY = 1208, + IMON_PAD_BUTTON_STOP = 1220, + IMON_PAD_BUTTON_SKIP = 1066, + + IMON_PAD_BUTTON_BACKSPACE = 1032, + IMON_PAD_BUTTON_MOUSE_KEYBD = 1080, + IMON_PAD_BUTTON_SELECT_SPACE = 1148, + IMON_PAD_BUTTON_WINKEY = 1194, + IMON_PAD_BUTTON_MENUKEY = 1060, + + IMON_PAD_BUTTON_LEFTCLICK = 1226, + IMON_PAD_BUTTON_RIGHTCLICK = 1228, + + IMON_PAD_BUTTON_ENTER = 1034, + IMON_PAD_BUTTON_ESC = 1252, + IMON_PAD_BUTTON_EJECT2 = 1086, + IMON_PAD_BUTTON_APPLAUNCH = 1124, + IMON_PAD_BUTTON_GREENBUTTON = 1178, + IMON_PAD_BUTTON_TASKSWITCH = 1150, + + IMON_PAD_BUTTON_MUTE = 1218, + IMON_PAD_BUTTON_VOLUME_UP = 1038, + IMON_PAD_BUTTON_CHANNEL_UP = 1022, + IMON_PAD_BUTTON_TIMER = 1198, + IMON_PAD_BUTTON_VOLUME_DOWN = 1042, + IMON_PAD_BUTTON_CHANNEL_DOWN = 1014, + + IMON_PAD_BUTTON_NUMPAD_1 = 1058, + IMON_PAD_BUTTON_NUMPAD_2 = 1242, + IMON_PAD_BUTTON_NUMPAD_3 = 1050, + IMON_PAD_BUTTON_NUMPAD_4 = 1138, + IMON_PAD_BUTTON_NUMPAD_5 = 1090, + IMON_PAD_BUTTON_NUMPAD_6 = 1170, + IMON_PAD_BUTTON_NUMPAD_7 = 1214, + IMON_PAD_BUTTON_NUMPAD_8 = 1136, + IMON_PAD_BUTTON_NUMPAD_9 = 1160, + IMON_PAD_BUTTON_NUMPAD_STAR = 1056, + IMON_PAD_BUTTON_NUMPAD_0 = 1234, + IMON_PAD_BUTTON_NUMPAD_HASH = 1096, + + IMON_PAD_BUTTON_MY_MOVIE = 1200, + IMON_PAD_BUTTON_MY_MUSIC = 1082, + IMON_PAD_BUTTON_MY_PHOTO = 1224, + IMON_PAD_BUTTON_MY_TV = 1040, + IMON_PAD_BUTTON_BOOKMARK = 1008, + IMON_PAD_BUTTON_THUMBNAIL = 1188, + IMON_PAD_BUTTON_ASPECT_RATIO = 1106, + IMON_PAD_BUTTON_FULLSCREEN = 1166, + IMON_PAD_BUTTON_MY_DVD = 1102, + IMON_PAD_BUTTON_MENU = 1230, + IMON_PAD_BUTTON_CAPTION = 1074, + IMON_PAD_BUTTON_LANGUAGE = 1202, + + + IMON_PAD_BUTTON_RIGHT = 1244, + IMON_PAD_BUTTON_LEFT = 1246, + IMON_PAD_BUTTON_DOWN = 1248, + IMON_PAD_BUTTON_UP = 1250, + + IMON_MCE_BUTTON_POWER_TV = 2101, + IMON_MCE_BUTTON_RECORD = 2023, + IMON_MCE_BUTTON_STOP = 2025, + IMON_MCE_BUTTON_PAUSE = 2024, + IMON_MCE_BUTTON_REWIND = 2021, + IMON_MCE_BUTTON_PLAY = 2022, + IMON_MCE_BUTTON_FORWARD = 2020, + IMON_MCE_BUTTON_REPLAY = 2027, + IMON_MCE_BUTTON_SKIP = 2026, + IMON_MCE_BUTTON_BACK = 2035, + IMON_MCE_BUTTON_UP = 2030, + IMON_MCE_BUTTON_DOWN = 2031, + IMON_MCE_BUTTON_LEFT = 2032, + IMON_MCE_BUTTON_RIGHT = 2033, + IMON_MCE_BUTTON_OK = 2034, + IMON_MCE_BUTTON_INFO = 2015, + IMON_MCE_BUTTON_VOLUME_UP = 2016, + IMON_MCE_BUTTON_VOLUME_DOWN = 2017, + IMON_MCE_BUTTON_START = 2013, + IMON_MCE_BUTTON_CHANNEL_UP = 2018, + IMON_MCE_BUTTON_CHANNEL_DOWN = 2019, + IMON_MCE_BUTTON_MUTE = 2014, + IMON_MCE_BUTTON_RECORDED_TV = 2072, + IMON_MCE_BUTTON_GUIDE = 2038, + IMON_MCE_BUTTON_LIVE_TV = 2037, + IMON_MCE_BUTTON_DVD_MENU = 2036, + IMON_MCE_BUTTON_NUMPAD_1 = 2001, + IMON_MCE_BUTTON_NUMPAD_2 = 2002, + IMON_MCE_BUTTON_NUMPAD_3 = 2003, + IMON_MCE_BUTTON_NUMPAD_4 = 2004, + IMON_MCE_BUTTON_NUMPAD_5 = 2005, + IMON_MCE_BUTTON_NUMPAD_6 = 2006, + IMON_MCE_BUTTON_NUMPAD_7 = 2007, + IMON_MCE_BUTTON_NUMPAD_8 = 2008, + IMON_MCE_BUTTON_NUMPAD_9 = 2009, + IMON_MCE_BUTTON_NUMPAD_0 = 2000, + IMON_MCE_BUTTON_NUMPAD_STAR = 2029, + IMON_MCE_BUTTON_NUMPAD_HASH = 2028, + IMON_MCE_BUTTON_CLEAR = 2010, + IMON_MCE_BUTTON_ENTER = 2011, + IMON_MCE_BUTTON_TELETEXT = 2090, + IMON_MCE_BUTTON_RED = 2091, + IMON_MCE_BUTTON_GREEN = 2092, + IMON_MCE_BUTTON_YELLOW = 2093, + IMON_MCE_BUTTON_BLUE = 2094, + IMON_MCE_BUTTON_MY_TV = 2070, + IMON_MCE_BUTTON_MY_MUSIC = 2071, + IMON_MCE_BUTTON_MY_PICTURES = 2073, + IMON_MCE_BUTTON_MY_VIDEOS = 2074, + IMON_MCE_BUTTON_MY_RADIO = 2080, + IMON_MCE_BUTTON_MESSENGER = 2105, + IMON_MCE_BUTTON_ASPECT_RATIO = 2012, + IMON_MCE_BUTTON_PRINT = 2078, + + IMON_PANEL_BUTTON = 3000, + + IMON_PANEL_BUTTON_VOLUME_KNOB = 3001, + IMON_PANEL_BUTTON_MCE = 3015, + IMON_PANEL_BUTTON_APPEXIT = 3043, + IMON_PANEL_BUTTON_BACK = 3023, + IMON_PANEL_BUTTON_UP = 3018, + IMON_PANEL_BUTTON_ENTER = 3022, + IMON_PANEL_BUTTON_START = 3044, + IMON_PANEL_BUTTON_MENU = 3045, + IMON_PANEL_BUTTON_LEFT = 3020, + IMON_PANEL_BUTTON_DOWN = 3019, + IMON_PANEL_BUTTON_RIGHT = 3021, + + IMON_VOLUME_UP = 4001, + IMON_VOLUME_DOWN = 4002, + } + #endregion + + static void xRemote_HID(string deviceName, string code) + { + Console.WriteLine("iMon HID Remote: {0} (button = {1})\n", code, Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), code))); +#if DEBUG + DebugWriteLine("iMon HID Remote: {0} (button = {1})\n", code, Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), code))); +#endif + } + + static void xRemote_DOS(string deviceName, string code) + { + Console.WriteLine("iMon DOS Remote: {0} (button = {1})\n", code, Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), code))); +#if DEBUG + DebugWriteLine("iMon DOS Remote: {0} (button = {1})\n", code, Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), code))); +#endif + } + + static void xKeyboard_HID(string deviceName, int button, bool up) + { + Console.WriteLine("iMon HID Keyboard: {0}, {1} (key = {2})\n", button, (up ? "Released" : "Pressed"), Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), button.ToString()))); +#if DEBUG + DebugWriteLine("iMon HID Keyboard: {0}, {1} (key = {2})\n", button, (up ? "Released" : "Pressed"), Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), button.ToString()))); +#endif + } + + static void xKeyboard_DOS(string deviceName, int button, bool up) + { + Console.WriteLine("iMon DOS Keyboard: {0}, {1} (key = {2})\n", button, (up ? "Released" : "Pressed"), Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), button.ToString()))); +#if DEBUG + DebugWriteLine("iMon DOS Keyboard: {0}, {1} (key = {2})\n", button, (up ? "Released" : "Pressed"), Enum.GetName(typeof(iMonRemoteKeyMapping), Enum.Parse(typeof(iMonRemoteKeyMapping), button.ToString()))); +#endif + } + + static void xMouse_HID(string deviceName, int x, int y, int buttons) + { + Console.WriteLine("iMon HID Mouse: ({0}, {1}) - {2}\n", x, y, buttons); +#if DEBUG + DebugWriteLine("iMon HID Mouse: ({0}, {1}) - {2}\n", x, y, buttons); +#endif + } + + static void xMouse_DOS(string deviceName, int x, int y, int buttons) + { + Console.WriteLine("iMon DOS Mouse: ({0}, {1}) - {2}\n", x, y, buttons); +#if DEBUG + DebugWriteLine("iMon DOS Mouse: ({0}, {1}) - {2}\n", x, y, buttons); +#endif + } + + [STAThread] + static void Main() + { +#if DEBUG + DebugOpen("iMonTestApp.log"); + DebugWriteLine("Main()"); +#endif + + DeviceType DevType; + + iMonUSBReceiver device = new iMonUSBReceiver(); + + try + { + device.Configure(null); + + DevType = device.DeviceDriverMode; + +#if DEBUG + DebugWriteLine("Main(): Detected device type = {0}", Enum.GetName(typeof(DeviceType), DevType)); +#endif + + if (DevType == DeviceType.DOS) + { + Console.WriteLine("Found an iMon DOS Device\n"); +#if DEBUG + DebugWriteLine("Found an iMon DOS Device\n"); +#endif + device.RemoteCallback += new RemoteHandler(xRemote_DOS); + device.KeyboardCallback += new KeyboardHandler(xKeyboard_DOS); + device.MouseCallback += new MouseHandler(xMouse_DOS); + } + else if (DevType == DeviceType.HID) + { + Console.WriteLine("Found an iMon HID Device\n"); +#if DEBUG + DebugWriteLine("Found an iMon HID Device\n"); +#endif + device.RemoteCallback += new RemoteHandler(xRemote_HID); + device.KeyboardCallback += new KeyboardHandler(xKeyboard_HID); + device.MouseCallback += new MouseHandler(xMouse_HID); + } + + if ((DevType == DeviceType.DOS) | (DevType == DeviceType.HID)) + { + device.Start(); + + Application.Run(); + + device.Stop(); + } + else + { +#if DEBUG + DebugWriteLine("Main(): NO SUPPORTED iMon DEVICE FOUND\n"); +#endif + throw new Exception("NO SUPPORTED iMon DEVICE FOUND"); + } + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } + finally + { + device = null; + } +#if DEBUG + DebugWriteLine("Main(): completed"); +#endif + + Console.ReadKey(); + } + +#endif + #endregion + + #region iMon DosDevice Constants + + const int DosDeviceBufferSize = 8; + const string DosDevicePath = @"\\.\SGIMON"; + + const int ErrorIoPending = 997; + + // IOCTL definitions 0x0022xxxx + const uint IOCTL_IMON_READ = 0x00222008; // function 0x802 - read data (64 bytes?) from device + const uint IOCTL_IMON_WRITE = 0x00222018; // function 0x806 - write data (8 bytes) to device + const uint IOCTL_IMON_READ_RC = 0x00222030; // function 0x80C - read data (8 bytes) from device + const uint IOCTL_IMON_RC_SET = 0x00222010; // function 0x804 - write RCset data (2 bytes) to device + const uint IOCTL_IMON_FW_VER = 0x00222014; // function 0x805 - read FW version (4 bytes) + const uint IOCTL_IMON_READ2 = 0x00222034; // function 0x80D - ??? read (8 bytes) + + static readonly byte[][] SetModeMCE = new byte[][] { + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00 }, + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x02 }, + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x04 }, + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x06 }, + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x08 }, + new byte[] { 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0A } + }; + + static readonly byte[][] SetModeiMon = new byte[][] { + new byte[] { 0x20, 0x20, 0x20, 0x20,... [truncated message content] |