From: <be...@us...> - 2009-06-25 23:23:16
|
Revision: 2963 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2963&view=rev Author: belcom Date: 2009-06-25 23:21:50 +0000 (Thu, 25 Jun 2009) Log Message: ----------- - iMON pad mode (mouse/keyboard) is switchable through configuration and remotes switch button (if enabled in configuration). - Remote mode MCE working for DOS and HID devices (even xBox remote is working in MCE mode (at least with DOS) but lacks support from abstract layer -> needs to be done). - Apply mode changes when configuration dialog is closed (before a restart of IR Server or Input Service was required sometimes). - Modifications/rearranges to configuration dialog in order to support new features. Code cleanups and readability improvements. - tiny bug in IRServer.cs where it tries to free resources even if they are NULL. Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Imon USB Receivers.csproj trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/RawInput.cs Added Paths: ----------- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Debug.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Exclusions.txt trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/FileIO.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/PluginBaseInterfaces.cs trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/TestApplication.cs Modified: trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR Server/IRServer.cs 2009-06-25 21:55:39 UTC (rev 2962) +++ trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR Server/IRServer.cs 2009-06-25 23:21:50 UTC (rev 2963) @@ -1096,16 +1096,20 @@ private bool UnregisterClient(ClientManager removeClient) { - lock (_registeredClients) - { - if (!_registeredClients.Contains(removeClient)) - return false; + if (_registeredClients != null) + { + lock (_registeredClients) + { + if (!_registeredClients.Contains(removeClient)) + return false; - _registeredClients.Remove(removeClient); - } + _registeredClients.Remove(removeClient); + } - IrssLog.Info("Unregistered a client"); - return true; + IrssLog.Info("Unregistered a client"); + return true; + } + else return false; } private bool RegisterRepeater(ClientManager addRepeater) @@ -1122,16 +1126,20 @@ private bool UnregisterRepeater(ClientManager removeRepeater) { - lock (_registeredRepeaters) - { - if (!_registeredRepeaters.Contains(removeRepeater)) - return false; + if (_registeredRepeaters != null) + { + lock (_registeredRepeaters) + { + if (!_registeredRepeaters.Contains(removeRepeater)) + return false; - _registeredRepeaters.Remove(removeRepeater); - } + _registeredRepeaters.Remove(removeRepeater); + } - IrssLog.Info("Unregistered a repeater"); - return true; + IrssLog.Info("Unregistered a repeater"); + return true; + } + else return false; } private bool BlastIR(byte[] data) Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs 2009-06-25 21:55:39 UTC (rev 2962) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.Designer.cs 2009-06-25 23:21:50 UTC (rev 2963) @@ -43,45 +43,57 @@ 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.comboBoxRemoteMode = new System.Windows.Forms.ComboBox(); - this.labelHardwareMode = new System.Windows.Forms.Label(); + this.comboBoxPadMode = new System.Windows.Forms.ComboBox(); + this.labelRemoteMode = new System.Windows.Forms.Label(); this.tabControl = new System.Windows.Forms.TabControl(); this.tabPageRemote = new System.Windows.Forms.TabPage(); - this.labelRemoteMode = new System.Windows.Forms.Label(); + this.labelPadMode = 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.checkBoxUsePadSwitch = new System.Windows.Forms.CheckBox(); + this.trackBarKeyPadSensitivity = new System.Windows.Forms.TrackBar(); + this.labelKeyPadHarder = new System.Windows.Forms.Label(); + this.labelKeyPadSofter = new System.Windows.Forms.Label(); + this.groupBoxKeyPadSensitivity = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.trackBar1 = new System.Windows.Forms.TrackBar(); + this.groupBoxMouseSensitivity = new System.Windows.Forms.GroupBox(); + this.labelMouseFaster = new System.Windows.Forms.Label(); + this.labelMouseSlower = new System.Windows.Forms.Label(); + this.trackBarMouseSensitivity = new System.Windows.Forms.TrackBar(); this.labelMouseSensitivity = new System.Windows.Forms.Label(); - this.trackBarKeyPadSensitivity = new System.Windows.Forms.TrackBar(); - this.labelKeyPadSensitivity = new System.Windows.Forms.Label(); - this.labelKpsSoft = new System.Windows.Forms.Label(); - this.labelKpsHard = new System.Windows.Forms.Label(); + this.groupBoxHardwareConfig = new System.Windows.Forms.GroupBox(); ((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(); ((System.ComponentModel.ISupportInitialize)(this.trackBarKeyPadSensitivity)).BeginInit(); + this.groupBoxKeyPadSensitivity.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); + this.groupBoxMouseSensitivity.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBarMouseSensitivity)).BeginInit(); + this.groupBoxHardwareConfig.SuspendLayout(); this.SuspendLayout(); // // labelButtonRepeatDelay // - this.labelButtonRepeatDelay.Location = new System.Drawing.Point(8, 24); + this.labelButtonRepeatDelay.Location = new System.Drawing.Point(6, 17); this.labelButtonRepeatDelay.Name = "labelButtonRepeatDelay"; this.labelButtonRepeatDelay.Size = new System.Drawing.Size(128, 20); this.labelButtonRepeatDelay.TabIndex = 0; @@ -90,7 +102,7 @@ // // labelButtonHeldDelay // - this.labelButtonHeldDelay.Location = new System.Drawing.Point(8, 56); + this.labelButtonHeldDelay.Location = new System.Drawing.Point(6, 43); this.labelButtonHeldDelay.Name = "labelButtonHeldDelay"; this.labelButtonHeldDelay.Size = new System.Drawing.Size(128, 20); this.labelButtonHeldDelay.TabIndex = 2; @@ -104,7 +116,7 @@ 0, 0, 0}); - this.numericUpDownButtonRepeatDelay.Location = new System.Drawing.Point(144, 24); + this.numericUpDownButtonRepeatDelay.Location = new System.Drawing.Point(150, 19); this.numericUpDownButtonRepeatDelay.Maximum = new decimal(new int[] { 10000, 0, @@ -130,7 +142,7 @@ 0, 0, 0}); - this.numericUpDownButtonHeldDelay.Location = new System.Drawing.Point(144, 56); + this.numericUpDownButtonHeldDelay.Location = new System.Drawing.Point(150, 45); this.numericUpDownButtonHeldDelay.Maximum = new decimal(new int[] { 10000, 0, @@ -151,7 +163,7 @@ // 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.Location = new System.Drawing.Point(128, 275); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 1; @@ -163,7 +175,7 @@ // 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.Location = new System.Drawing.Point(200, 275); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 2; @@ -177,9 +189,9 @@ 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.Location = new System.Drawing.Point(6, 154); this.groupBoxRemoteTiming.Name = "groupBoxRemoteTiming"; - this.groupBoxRemoteTiming.Size = new System.Drawing.Size(232, 88); + this.groupBoxRemoteTiming.Size = new System.Drawing.Size(236, 73); this.groupBoxRemoteTiming.TabIndex = 2; this.groupBoxRemoteTiming.TabStop = false; this.groupBoxRemoteTiming.Text = "Remote button timing (in milliseconds)"; @@ -191,7 +203,7 @@ 0, 0, 0}); - this.numericUpDownKeyHeldDelay.Location = new System.Drawing.Point(144, 56); + this.numericUpDownKeyHeldDelay.Location = new System.Drawing.Point(150, 45); this.numericUpDownKeyHeldDelay.Maximum = new decimal(new int[] { 1000, 0, @@ -216,7 +228,7 @@ 0, 0, 0}); - this.numericUpDownKeyRepeatDelay.Location = new System.Drawing.Point(144, 24); + this.numericUpDownKeyRepeatDelay.Location = new System.Drawing.Point(150, 19); this.numericUpDownKeyRepeatDelay.Maximum = new decimal(new int[] { 1000, 0, @@ -239,7 +251,7 @@ 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.Location = new System.Drawing.Point(6, 29); this.checkBoxHandleKeyboardLocal.Name = "checkBoxHandleKeyboardLocal"; this.checkBoxHandleKeyboardLocal.Size = new System.Drawing.Size(139, 17); this.checkBoxHandleKeyboardLocal.TabIndex = 2; @@ -252,7 +264,7 @@ 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.Location = new System.Drawing.Point(6, 29); this.checkBoxHandleMouseLocal.Name = "checkBoxHandleMouseLocal"; this.checkBoxHandleMouseLocal.Size = new System.Drawing.Size(126, 17); this.checkBoxHandleMouseLocal.TabIndex = 1; @@ -260,42 +272,12 @@ 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.Location = new System.Drawing.Point(6, 6); this.checkBoxEnableRemote.Name = "checkBoxEnableRemote"; this.checkBoxEnableRemote.Size = new System.Drawing.Size(155, 17); this.checkBoxEnableRemote.TabIndex = 0; @@ -308,7 +290,7 @@ 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.Location = new System.Drawing.Point(6, 6); this.checkBoxEnableKeyboard.Name = "checkBoxEnableKeyboard"; this.checkBoxEnableKeyboard.Size = new System.Drawing.Size(132, 17); this.checkBoxEnableKeyboard.TabIndex = 0; @@ -321,7 +303,7 @@ 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.Location = new System.Drawing.Point(6, 6); this.checkBoxEnableMouse.Name = "checkBoxEnableMouse"; this.checkBoxEnableMouse.Size = new System.Drawing.Size(119, 17); this.checkBoxEnableMouse.TabIndex = 0; @@ -332,7 +314,7 @@ // checkBoxUseSystemRatesRemote // this.checkBoxUseSystemRatesRemote.AutoSize = true; - this.checkBoxUseSystemRatesRemote.Location = new System.Drawing.Point(8, 40); + this.checkBoxUseSystemRatesRemote.Location = new System.Drawing.Point(6, 131); this.checkBoxUseSystemRatesRemote.Name = "checkBoxUseSystemRatesRemote"; this.checkBoxUseSystemRatesRemote.Size = new System.Drawing.Size(187, 17); this.checkBoxUseSystemRatesRemote.TabIndex = 1; @@ -343,7 +325,7 @@ // checkBoxUseSystemRatesKeyboard // this.checkBoxUseSystemRatesKeyboard.AutoSize = true; - this.checkBoxUseSystemRatesKeyboard.Location = new System.Drawing.Point(8, 40); + this.checkBoxUseSystemRatesKeyboard.Location = new System.Drawing.Point(6, 131); this.checkBoxUseSystemRatesKeyboard.Name = "checkBoxUseSystemRatesKeyboard"; this.checkBoxUseSystemRatesKeyboard.Size = new System.Drawing.Size(187, 17); this.checkBoxUseSystemRatesKeyboard.TabIndex = 0; @@ -351,37 +333,37 @@ 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"); - // // comboBoxRemoteMode // this.comboBoxRemoteMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxRemoteMode.FormattingEnabled = true; - this.comboBoxRemoteMode.Location = new System.Drawing.Point(152, 194); + this.comboBoxRemoteMode.Location = new System.Drawing.Point(141, 19); this.comboBoxRemoteMode.Name = "comboBoxRemoteMode"; this.comboBoxRemoteMode.Size = new System.Drawing.Size(89, 21); - this.comboBoxRemoteMode.TabIndex = 6; + this.comboBoxRemoteMode.TabIndex = 4; this.toolTips.SetToolTip(this.comboBoxRemoteMode, "Choose between MCE and iMon remote types"); // - // labelHardwareMode + // comboBoxPadMode // - this.labelHardwareMode.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - 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; - this.toolTips.SetToolTip(this.labelHardwareMode, "IMPORTANT: Set the hardware mode here"); + this.comboBoxPadMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxPadMode.FormattingEnabled = true; + this.comboBoxPadMode.Location = new System.Drawing.Point(141, 46); + this.comboBoxPadMode.Name = "comboBoxPadMode"; + this.comboBoxPadMode.Size = new System.Drawing.Size(89, 21); + this.comboBoxPadMode.TabIndex = 6; + this.toolTips.SetToolTip(this.comboBoxPadMode, "Choose between MCE and iMon remote types"); // + // labelRemoteMode + // + this.labelRemoteMode.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelRemoteMode.Location = new System.Drawing.Point(6, 18); + this.labelRemoteMode.Name = "labelRemoteMode"; + this.labelRemoteMode.Size = new System.Drawing.Size(129, 21); + this.labelRemoteMode.TabIndex = 3; + this.labelRemoteMode.Text = "Remote:"; + this.labelRemoteMode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.toolTips.SetToolTip(this.labelRemoteMode, "IMPORTANT: Set the hardware mode here"); + // // tabControl // this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -393,37 +375,36 @@ 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.Size = new System.Drawing.Size(256, 259); 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.groupBoxHardwareConfig); + this.tabPageRemote.Controls.Add(this.checkBoxUsePadSwitch); 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.Size = new System.Drawing.Size(248, 233); this.tabPageRemote.TabIndex = 1; this.tabPageRemote.Text = "Remote"; this.tabPageRemote.UseVisualStyleBackColor = true; // - // labelRemoteMode + // labelPadMode // - 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; + this.labelPadMode.Location = new System.Drawing.Point(6, 45); + this.labelPadMode.Name = "labelPadMode"; + this.labelPadMode.Size = new System.Drawing.Size(129, 21); + this.labelPadMode.TabIndex = 5; + this.labelPadMode.Text = "Remote Pad mode:"; + this.labelPadMode.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // tabPageKeyboard // + this.tabPageKeyboard.Controls.Add(this.groupBoxKeyPadSensitivity); this.tabPageKeyboard.Controls.Add(this.checkBoxUseSystemRatesKeyboard); this.tabPageKeyboard.Controls.Add(this.checkBoxHandleKeyboardLocal); this.tabPageKeyboard.Controls.Add(this.checkBoxEnableKeyboard); @@ -431,7 +412,7 @@ 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.Size = new System.Drawing.Size(248, 233); this.tabPageKeyboard.TabIndex = 2; this.tabPageKeyboard.Text = "Keyboard"; this.tabPageKeyboard.UseVisualStyleBackColor = true; @@ -442,16 +423,16 @@ 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.Location = new System.Drawing.Point(6, 154); this.groupBoxKeypressTiming.Name = "groupBoxKeypressTiming"; - this.groupBoxKeypressTiming.Size = new System.Drawing.Size(232, 88); + this.groupBoxKeypressTiming.Size = new System.Drawing.Size(236, 73); 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.Location = new System.Drawing.Point(6, 17); this.labelKeyRepeatDelay.Name = "labelKeyRepeatDelay"; this.labelKeyRepeatDelay.Size = new System.Drawing.Size(128, 20); this.labelKeyRepeatDelay.TabIndex = 1; @@ -460,7 +441,7 @@ // // labelKeyHeldDelay // - this.labelKeyHeldDelay.Location = new System.Drawing.Point(8, 56); + this.labelKeyHeldDelay.Location = new System.Drawing.Point(6, 43); this.labelKeyHeldDelay.Name = "labelKeyHeldDelay"; this.labelKeyHeldDelay.Size = new System.Drawing.Size(128, 20); this.labelKeyHeldDelay.TabIndex = 3; @@ -469,82 +450,175 @@ // // tabPageMouse // - this.tabPageMouse.Controls.Add(this.labelKpsHard); - this.tabPageMouse.Controls.Add(this.labelKpsSoft); - this.tabPageMouse.Controls.Add(this.labelKeyPadSensitivity); - this.tabPageMouse.Controls.Add(this.trackBarKeyPadSensitivity); - this.tabPageMouse.Controls.Add(this.labelMouseSensitivity); - this.tabPageMouse.Controls.Add(this.numericUpDownMouseSensitivity); + this.tabPageMouse.Controls.Add(this.groupBoxMouseSensitivity); 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.Size = new System.Drawing.Size(248, 233); this.tabPageMouse.TabIndex = 3; this.tabPageMouse.Text = "Mouse"; this.tabPageMouse.UseVisualStyleBackColor = true; // - // labelMouseSensitivity + // checkBoxUsePadSwitch // - 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; + this.checkBoxUsePadSwitch.AutoSize = true; + this.checkBoxUsePadSwitch.Location = new System.Drawing.Point(6, 29); + this.checkBoxUsePadSwitch.Name = "checkBoxUsePadSwitch"; + this.checkBoxUsePadSwitch.Size = new System.Drawing.Size(236, 17); + this.checkBoxUsePadSwitch.TabIndex = 8; + this.checkBoxUsePadSwitch.Text = "Enable mouse/keyboard switch (iMON PAD)"; + this.checkBoxUsePadSwitch.UseVisualStyleBackColor = true; // // trackBarKeyPadSensitivity // this.trackBarKeyPadSensitivity.BackColor = System.Drawing.Color.White; this.trackBarKeyPadSensitivity.LargeChange = 4; - this.trackBarKeyPadSensitivity.Location = new System.Drawing.Point(6, 148); - this.trackBarKeyPadSensitivity.Maximum = 15; + this.trackBarKeyPadSensitivity.Location = new System.Drawing.Point(6, 19); + this.trackBarKeyPadSensitivity.Maximum = 14; this.trackBarKeyPadSensitivity.Name = "trackBarKeyPadSensitivity"; - this.trackBarKeyPadSensitivity.Size = new System.Drawing.Size(236, 45); - this.trackBarKeyPadSensitivity.TabIndex = 4; - this.trackBarKeyPadSensitivity.Value = 8; + this.trackBarKeyPadSensitivity.Size = new System.Drawing.Size(224, 45); + this.trackBarKeyPadSensitivity.TabIndex = 5; + this.trackBarKeyPadSensitivity.Value = 7; // - // labelKeyPadSensitivity + // labelKeyPadHarder // - this.labelKeyPadSensitivity.AutoSize = true; - this.labelKeyPadSensitivity.Location = new System.Drawing.Point(6, 132); - this.labelKeyPadSensitivity.Name = "labelKeyPadSensitivity"; - this.labelKeyPadSensitivity.Size = new System.Drawing.Size(229, 13); - this.labelKeyPadSensitivity.TabIndex = 5; - this.labelKeyPadSensitivity.Text = "KeyPad Sensitivity (if Pad works as arrow keys)"; + this.labelKeyPadHarder.AutoSize = true; + this.labelKeyPadHarder.Location = new System.Drawing.Point(193, 51); + this.labelKeyPadHarder.Name = "labelKeyPadHarder"; + this.labelKeyPadHarder.Size = new System.Drawing.Size(37, 13); + this.labelKeyPadHarder.TabIndex = 10; + this.labelKeyPadHarder.Text = "harder"; // - // labelKpsSoft + // labelKeyPadSofter // - this.labelKpsSoft.AutoSize = true; - this.labelKpsSoft.Location = new System.Drawing.Point(6, 180); - this.labelKpsSoft.Name = "labelKpsSoft"; - this.labelKpsSoft.Size = new System.Drawing.Size(33, 13); - this.labelKpsSoft.TabIndex = 6; - this.labelKpsSoft.Text = "softer"; + this.labelKeyPadSofter.AutoSize = true; + this.labelKeyPadSofter.Location = new System.Drawing.Point(6, 51); + this.labelKeyPadSofter.Name = "labelKeyPadSofter"; + this.labelKeyPadSofter.Size = new System.Drawing.Size(33, 13); + this.labelKeyPadSofter.TabIndex = 9; + this.labelKeyPadSofter.Text = "softer"; // - // labelKpsHard + // groupBoxKeyPadSensitivity // - this.labelKpsHard.AutoSize = true; - this.labelKpsHard.Location = new System.Drawing.Point(205, 180); - this.labelKpsHard.Name = "labelKpsHard"; - this.labelKpsHard.Size = new System.Drawing.Size(37, 13); - this.labelKpsHard.TabIndex = 7; - this.labelKpsHard.Text = "harder"; + this.groupBoxKeyPadSensitivity.Controls.Add(this.labelKeyPadHarder); + this.groupBoxKeyPadSensitivity.Controls.Add(this.labelKeyPadSofter); + this.groupBoxKeyPadSensitivity.Controls.Add(this.trackBarKeyPadSensitivity); + this.groupBoxKeyPadSensitivity.Location = new System.Drawing.Point(6, 52); + this.groupBoxKeyPadSensitivity.Name = "groupBoxKeyPadSensitivity"; + this.groupBoxKeyPadSensitivity.Size = new System.Drawing.Size(236, 73); + this.groupBoxKeyPadSensitivity.TabIndex = 11; + this.groupBoxKeyPadSensitivity.TabStop = false; + this.groupBoxKeyPadSensitivity.Text = "KeyPad sensitivity (Pad in keyboard mode)"; // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(193, 51); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(37, 13); + this.label1.TabIndex = 10; + this.label1.Text = "harder"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 51); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(33, 13); + this.label2.TabIndex = 9; + this.label2.Text = "softer"; + // + // trackBar1 + // + this.trackBar1.BackColor = System.Drawing.Color.White; + this.trackBar1.LargeChange = 4; + this.trackBar1.Location = new System.Drawing.Point(6, 19); + this.trackBar1.Maximum = 15; + this.trackBar1.Name = "trackBar1"; + this.trackBar1.Size = new System.Drawing.Size(224, 45); + this.trackBar1.TabIndex = 5; + this.trackBar1.Value = 8; + // + // groupBoxMouseSensitivity + // + this.groupBoxMouseSensitivity.Controls.Add(this.labelMouseFaster); + this.groupBoxMouseSensitivity.Controls.Add(this.labelMouseSlower); + this.groupBoxMouseSensitivity.Controls.Add(this.labelMouseSensitivity); + this.groupBoxMouseSensitivity.Controls.Add(this.trackBarMouseSensitivity); + this.groupBoxMouseSensitivity.Location = new System.Drawing.Point(6, 52); + this.groupBoxMouseSensitivity.Name = "groupBoxMouseSensitivity"; + this.groupBoxMouseSensitivity.Size = new System.Drawing.Size(236, 73); + this.groupBoxMouseSensitivity.TabIndex = 12; + this.groupBoxMouseSensitivity.TabStop = false; + this.groupBoxMouseSensitivity.Text = "Mouse sensitivity"; + // + // labelMouseFaster + // + this.labelMouseFaster.AutoSize = true; + this.labelMouseFaster.Location = new System.Drawing.Point(197, 51); + this.labelMouseFaster.Name = "labelMouseFaster"; + this.labelMouseFaster.Size = new System.Drawing.Size(33, 13); + this.labelMouseFaster.TabIndex = 10; + this.labelMouseFaster.Text = "faster"; + // + // labelMouseSlower + // + this.labelMouseSlower.AutoSize = true; + this.labelMouseSlower.Location = new System.Drawing.Point(6, 51); + this.labelMouseSlower.Name = "labelMouseSlower"; + this.labelMouseSlower.Size = new System.Drawing.Size(37, 13); + this.labelMouseSlower.TabIndex = 9; + this.labelMouseSlower.Text = "slower"; + // + // trackBarMouseSensitivity + // + this.trackBarMouseSensitivity.BackColor = System.Drawing.Color.White; + this.trackBarMouseSensitivity.Cursor = System.Windows.Forms.Cursors.Default; + this.trackBarMouseSensitivity.Location = new System.Drawing.Point(6, 19); + this.trackBarMouseSensitivity.Maximum = 50; + this.trackBarMouseSensitivity.Name = "trackBarMouseSensitivity"; + this.trackBarMouseSensitivity.Size = new System.Drawing.Size(224, 45); + this.trackBarMouseSensitivity.TabIndex = 5; + this.trackBarMouseSensitivity.TickFrequency = 5; + this.trackBarMouseSensitivity.Value = 10; + this.trackBarMouseSensitivity.Scroll += new System.EventHandler(this.trackBarMouseSensitivity_Scroll); + // + // labelMouseSensitivity + // + this.labelMouseSensitivity.Location = new System.Drawing.Point(6, 51); + this.labelMouseSensitivity.Name = "labelMouseSensitivity"; + this.labelMouseSensitivity.Size = new System.Drawing.Size(224, 20); + this.labelMouseSensitivity.TabIndex = 11; + this.labelMouseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBoxHardwareConfig + // + this.groupBoxHardwareConfig.Controls.Add(this.labelRemoteMode); + this.groupBoxHardwareConfig.Controls.Add(this.comboBoxRemoteMode); + this.groupBoxHardwareConfig.Controls.Add(this.comboBoxPadMode); + this.groupBoxHardwareConfig.Controls.Add(this.labelPadMode); + this.groupBoxHardwareConfig.Location = new System.Drawing.Point(6, 52); + this.groupBoxHardwareConfig.Name = "groupBoxHardwareConfig"; + this.groupBoxHardwareConfig.Size = new System.Drawing.Size(236, 73); + this.groupBoxHardwareConfig.TabIndex = 9; + this.groupBoxHardwareConfig.TabStop = false; + this.groupBoxHardwareConfig.Text = "Hardware configuration"; + // // Configuration // 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.ClientSize = new System.Drawing.Size(272, 307); 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.MinimumSize = new System.Drawing.Size(280, 320); this.Name = "Configuration"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -554,7 +628,6 @@ 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(); @@ -564,6 +637,13 @@ this.tabPageMouse.ResumeLayout(false); this.tabPageMouse.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.trackBarKeyPadSensitivity)).EndInit(); + this.groupBoxKeyPadSensitivity.ResumeLayout(false); + this.groupBoxKeyPadSensitivity.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit(); + this.groupBoxMouseSensitivity.ResumeLayout(false); + this.groupBoxMouseSensitivity.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBarMouseSensitivity)).EndInit(); + this.groupBoxHardwareConfig.ResumeLayout(false); this.ResumeLayout(false); } @@ -590,20 +670,28 @@ 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; + private System.Windows.Forms.ComboBox comboBoxPadMode; + private System.Windows.Forms.Label labelPadMode; + private System.Windows.Forms.CheckBox checkBoxUsePadSwitch; private System.Windows.Forms.TrackBar trackBarKeyPadSensitivity; - private System.Windows.Forms.Label labelKpsSoft; - private System.Windows.Forms.Label labelKeyPadSensitivity; - private System.Windows.Forms.Label labelKpsHard; + private System.Windows.Forms.GroupBox groupBoxKeyPadSensitivity; + private System.Windows.Forms.Label labelKeyPadHarder; + private System.Windows.Forms.Label labelKeyPadSofter; + private System.Windows.Forms.GroupBox groupBoxMouseSensitivity; + private System.Windows.Forms.Label labelMouseFaster; + private System.Windows.Forms.Label labelMouseSlower; + private System.Windows.Forms.TrackBar trackBarMouseSensitivity; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TrackBar trackBar1; + private System.Windows.Forms.Label labelMouseSensitivity; + private System.Windows.Forms.GroupBox groupBoxHardwareConfig; } Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs 2009-06-25 21:55:39 UTC (rev 2962) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.cs 2009-06-25 23:21:50 UTC (rev 2963) @@ -25,125 +25,141 @@ namespace InputService.Plugin { - internal partial class Configuration : Form - { - public Configuration() + internal partial class Configuration : Form { - InitializeComponent(); - comboBoxHardwareMode.Items.AddRange(Enum.GetNames(typeof (iMonUSBReceivers.RcMode))); - comboBoxRemoteMode.Items.AddRange(Enum.GetNames(typeof (iMonUSBReceivers.RemoteMode))); - } + public Configuration() + { + InitializeComponent(); + comboBoxRemoteMode.Items.AddRange(Enum.GetNames(typeof(iMonUSBReceivers.RemoteMode))); + comboBoxPadMode.Items.AddRange(Enum.GetNames(typeof(iMonUSBReceivers.PadMode))); + } - 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 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 iMonUSBReceivers.PadMode PadMode + { + get + { + return + (iMonUSBReceivers.PadMode) + Enum.Parse(typeof(iMonUSBReceivers.PadMode), comboBoxPadMode.SelectedItem as string); + } + set { comboBoxPadMode.SelectedItem = Enum.GetName(typeof(iMonUSBReceivers.PadMode), value); } + } - public bool EnableRemote - { - get { return checkBoxEnableRemote.Checked; } - set { checkBoxEnableRemote.Checked = value; } - } + public bool EnableRemote + { + get { return checkBoxEnableRemote.Checked; } + set { checkBoxEnableRemote.Checked = value; } + } - public bool UseSystemRatesForRemote - { - get { return checkBoxUseSystemRatesRemote.Checked; } - set { checkBoxUseSystemRatesRemote.Checked = value; } - } + public bool UsePadSwitch + { + get { return checkBoxUsePadSwitch.Checked; } + set { checkBoxUsePadSwitch.Checked = value; } + } - public int RemoteRepeatDelay - { - get { return Decimal.ToInt32(numericUpDownButtonRepeatDelay.Value); } - set { numericUpDownButtonRepeatDelay.Value = new Decimal(value); } - } + public bool UseSystemRatesForRemote + { + get { return checkBoxUseSystemRatesRemote.Checked; } + set { checkBoxUseSystemRatesRemote.Checked = value; } + } - public int RemoteHeldDelay - { - get { return Decimal.ToInt32(numericUpDownButtonHeldDelay.Value); } - set { numericUpDownButtonHeldDelay.Value = new Decimal(value); } - } + public int RemoteRepeatDelay + { + get { return Decimal.ToInt32(numericUpDownButtonRepeatDelay.Value); } + set { numericUpDownButtonRepeatDelay.Value = new Decimal(value); } + } - public bool EnableKeyboard - { - get { return checkBoxEnableKeyboard.Checked; } - set { checkBoxEnableKeyboard.Checked = value; } - } + public int RemoteHeldDelay + { + get { return Decimal.ToInt32(numericUpDownButtonHeldDelay.Value); } + set { numericUpDownButtonHeldDelay.Value = new Decimal(value); } + } - public bool UseSystemRatesForKeyboard - { - get { return checkBoxUseSystemRatesKeyboard.Checked; } - set { checkBoxUseSystemRatesKeyboard.Checked = value; } - } + public bool EnableKeyboard + { + get { return checkBoxEnableKeyboard.Checked; } + set { checkBoxEnableKeyboard.Checked = value; } + } - public int KeyboardRepeatDelay - { - get { return Decimal.ToInt32(numericUpDownKeyRepeatDelay.Value); } - set { numericUpDownKeyRepeatDelay.Value = new Decimal(value); } - } + public int KeyPadSensitivity + { + get { return trackBarKeyPadSensitivity.Value; } + set { trackBarKeyPadSensitivity.Value = value; } + } - public int KeyboardHeldDelay - { - get { return Decimal.ToInt32(numericUpDownKeyHeldDelay.Value); } - set { numericUpDownKeyHeldDelay.Value = new Decimal(value); } - } + public bool UseSystemRatesForKeyboard + { + get { return checkBoxUseSystemRatesKeyboard.Checked; } + set { checkBoxUseSystemRatesKeyboard.Checked = value; } + } - public bool HandleKeyboardLocal - { - get { return checkBoxHandleKeyboardLocal.Checked; } - set { checkBoxHandleKeyboardLocal.Checked = value; } - } + public int KeyboardRepeatDelay + { + get { return Decimal.ToInt32(numericUpDownKeyRepeatDelay.Value); } + set { numericUpDownKeyRepeatDelay.Value = new Decimal(value); } + } - public bool EnableMouse - { - get { return checkBoxEnableMouse.Checked; } - set { checkBoxEnableMouse.Checked = value; } - } + public int KeyboardHeldDelay + { + get { return Decimal.ToInt32(numericUpDownKeyHeldDelay.Value); } + set { numericUpDownKeyHeldDelay.Value = new Decimal(value); } + } - public double MouseSensitivity - { - get { return Decimal.ToDouble(numericUpDownMouseSensitivity.Value); } - set { numericUpDownMouseSensitivity.Value = new Decimal(value); } - } + public bool HandleKeyboardLocal + { + get { return checkBoxHandleKeyboardLocal.Checked; } + set { checkBoxHandleKeyboardLocal.Checked = value; } + } - public bool HandleMouseLocal - { - get { return checkBoxHandleMouseLocal.Checked; } - set { checkBoxHandleMouseLocal.Checked = value; } - } + public bool EnableMouse + { + get { return checkBoxEnableMouse.Checked; } + set { checkBoxEnableMouse.Checked = value; } + } - public int KeyPadSensitivity - { - get { return trackBarKeyPadSensitivity.Value; } - set { trackBarKeyPadSensitivity.Value = value; } - } + public double MouseSensitivity + { + get { return ((double)trackBarMouseSensitivity.Value / 10); } + set + { + trackBarMouseSensitivity.Value = (int)(value * 10); + trackBarMouseSensitivity_Scroll((object) null, (EventArgs) null); + } + } - private void buttonOK_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - Close(); - } + private void trackBarMouseSensitivity_Scroll(object sender, EventArgs e) + { + labelMouseSensitivity.Text = string.Format("{0:0.0}", (double)trackBarMouseSensitivity.Value / 10); + } - private void buttonCancel_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); + public bool HandleMouseLocal + { + get { return checkBoxHandleMouseLocal.Checked; } + set { checkBoxHandleMouseLocal.Checked = value; } + } + + private void buttonOK_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.OK; + Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + DialogResult = DialogResult.Cancel; + Close(); + } + } - } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx 2009-06-25 21:55:39 UTC (rev 2962) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Configuration.resx 2009-06-25 23:21:50 UTC (rev 2963) @@ -120,7 +120,4 @@ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <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 Suite/IR Server Plugins/Imon USB Receivers/Debug.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Debug.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Debug.cs 2009-06-25 23:21:50 UTC (rev 2963) @@ -0,0 +1,136 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; + +namespace InputService.Plugin +{ + public partial class iMonUSBReceivers + { +#if DEBUG + private static StreamWriter _debugFile; +#endif + + /// <summary> + /// Opens a debug output file. + /// </summary> + /// <param name="fileName">Name of the file.</param> + private static void DebugOpen(string fileName) + { +#if DEBUG + if (_debugFile != null) return; + try + { + string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), + String.Format("IR Server Suite\\Logs\\{0}", fileName)); + _debugFile = new StreamWriter(path, false); + _debugFile.AutoFlush = true; + } + catch + { + _debugFile = null; + } +#endif + } + + /// <summary> + /// Closes the debug output file. + /// </summary> + private static void DebugClose() + { +#if DEBUG + if (_debugFile != null) + { + _debugFile.Close(); + _debugFile.Dispose(); + _debugFile = null; + } +#endif + } + + /// <summary> + /// Writes a line to the debug output file. + /// </summary> + /// <param name="line">The line.</param> + /// <param name="args">Formatting arguments.</param> + private static void DebugWriteLine(string line, params object[] args) + { +#if DEBUG + if (_debugFile != null) + { + _debugFile.Write("{0:yyyy-MM-dd HH:mm:ss.ffffff} - ", DateTime.Now); + _debugFile.WriteLine(line, args); + } +#endif +#if TEST_APPLICATION + Console.Write("{0:yyyy-MM-dd HH:mm:ss.ffffff} - ", DateTime.Now); + Console.WriteLine(line, args); +#endif + } + + /// <summary> + /// Writes a string to the debug output file. + /// </summary> + /// <param name="text">The string to write.</param> + /// <param name="args">Formatting arguments.</param> + private static void DebugWrite(string text, params object[] args) + { +#if DEBUG + if (_debugFile != null) + { + _debugFile.Write(text, args); + } +#endif +#if TEST_APPLICATION + Console.Write(text, args); +#endif + } + + /// <summary> + /// Writes a new line to the debug output file. + /// </summary> + private static void DebugWriteNewLine() + { +#if DEBUG + if (_debugFile != null) + { + _debugFile.WriteLine(); + } +#endif +#if TEST_APPLICATION + Console.WriteLine(); +#endif + } + + /// <summary> + /// Dumps an Array to the debug output file. + /// </summary> + /// <param name="array">The array.</param> + private static void DebugDump(Array array) + { + foreach (object item in array) + { + if (item is byte) + { + DebugWrite("{0:X2}", (byte)item); + } + else if (item is ushort) + { + DebugWrite("{0:X4}", (ushort)item); + } + else if (item is int) + { + DebugWrite("{1}{0}", (int)item, (int)item > 0 ? "+" : String.Empty); + } + else + { + DebugWrite("{0}", item); + } + + DebugWrite(", "); + } + + DebugWriteNewLine(); + } + } +} Added: trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Exclusions.txt =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Exclusions.txt (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Suite/IR Server Plugins/Imon USB Receivers/Exclusions.txt 2009-06-25 23:21:50 UTC (rev 2963) @@ -0,0 +1,100 @@ + [Serializable, StructLayout(LayoutKind.Sequential)] + private struct RECT + { + public readonly int Left; + public readonly int Top; + public readonly int Right; + public readonly int Bottom; + + public RECT(int left_, int top_, int right_, int bottom_) + { + Left = left_; + Top = top_; + Right = right_; + Bottom = bottom_; + } + + public int Height + { + get { return Bottom - Top; } + } + + public int Width + { + get { return Right - Left; } + } + + public Size Size + { + get { return new Size(Width, Height); } + } + + public Point Location + { + get { return new Point(Left, Top); } + } + + // Handy method for converting to a System.Drawing.Rectangle + public Rectangle ToRectangle() + { + return Rectangle.FromLTRB(Left, Top, Right, Bottom); + } + + public static RECT FromRectangle(Rectangle rectangle) + { + return new RECT(rectangle.Left, rectangle.Top, rectangle.Right, rectangle.Bottom); + } + + public override int GetHashCode() + { + return Left ^ ((Top << 13) | (Top >> 0x13)) + ^ ((Width << 0x1a) | (Width >> 6)) + ^ ((Height << 7) | (Height >> 0x19)); + } + + #region Operator overloads + + public static implicit operator Rectangle(RECT rect) + { + return rect.ToRectangle(); + } + + public static implicit operator RECT(Rectangle rect) + { + return FromRectangle(rect); + } + + #endregion + } + + [DllImport("user32.dll")] + private static extern bool SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); + + private static void RedrawNotificationArea() + { + IntPtr hNotificationArea = GetNotificationAreaHandle(); + RECT r; + GetClientRect(hNotificationArea, out r); + for (int x = 0; x < r.Right; x += 5) + for (int y = 0; y < r.Bottom; y += 5) + SendMessage(hNotificationAre... [truncated message content] |