From: <an...@us...> - 2007-12-09 06:00:46
|
Revision: 1136 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1136&view=rev Author: and-81 Date: 2007-12-08 22:00:45 -0800 (Sat, 08 Dec 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VirtualKeyboard.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HCW Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/irremote.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputHandler.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapping/MPControlPlugin.xml trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs trunk/plugins/MCEReplacement/InputMapping/MCE Replacement.xml Added Paths: ----------- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.resx Property Changed: ---------------- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/ Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -418,10 +418,14 @@ IrssLog.Info("Program already running, attempting to give focus."); Win32.SetForegroundWindow(process.MainWindowHandle, true); - return; } } + catch (Win32Exception ex) + { + if (ex.ErrorCode != -2147467259) // Ignore "Unable to enumerate the process modules" errors. + IrssLog.Error(ex.ToString()); + } catch (Exception ex) { IrssLog.Error(ex.ToString()); Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.Designer.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -0,0 +1,444 @@ +namespace IrssUtils.Forms +{ + + partial class SmsKeyboard + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SmsKeyboard)); + this.panelTop = new System.Windows.Forms.Panel(); + this.panelBottom = new System.Windows.Forms.Panel(); + this.panelLeft = new System.Windows.Forms.Panel(); + this.panelRight = new System.Windows.Forms.Panel(); + this.panelTopLeft = new System.Windows.Forms.Panel(); + this.panelTopRight = new System.Windows.Forms.Panel(); + this.panelBottomRight = new System.Windows.Forms.Panel(); + this.panelBottomLeft = new System.Windows.Forms.Panel(); + this.panelMain = new System.Windows.Forms.Panel(); + this.tableLayoutPanelKeys = new System.Windows.Forms.TableLayoutPanel(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.button0 = new System.Windows.Forms.Button(); + this.buttonStar = new System.Windows.Forms.Button(); + this.buttonHash = new System.Windows.Forms.Button(); + this.textBoxKeys = new System.Windows.Forms.TextBox(); + this.panelMain.SuspendLayout(); + this.tableLayoutPanelKeys.SuspendLayout(); + this.SuspendLayout(); + // + // panelTop + // + this.panelTop.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panelTop.BackgroundImage = global::IrssUtils.Properties.Resources.Top; + this.panelTop.Location = new System.Drawing.Point(16, 0); + this.panelTop.Name = "panelTop"; + this.panelTop.Size = new System.Drawing.Size(166, 16); + this.panelTop.TabIndex = 1; + // + // panelBottom + // + this.panelBottom.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panelBottom.BackgroundImage = global::IrssUtils.Properties.Resources.Bottom; + this.panelBottom.Location = new System.Drawing.Point(16, 212); + this.panelBottom.Name = "panelBottom"; + this.panelBottom.Size = new System.Drawing.Size(166, 16); + this.panelBottom.TabIndex = 6; + // + // panelLeft + // + this.panelLeft.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panelLeft.BackgroundImage = global::IrssUtils.Properties.Resources.Left; + this.panelLeft.Location = new System.Drawing.Point(0, 16); + this.panelLeft.Name = "panelLeft"; + this.panelLeft.Size = new System.Drawing.Size(16, 196); + this.panelLeft.TabIndex = 3; + // + // panelRight + // + this.panelRight.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.panelRight.BackgroundImage = global::IrssUtils.Properties.Resources.Right; + this.panelRight.Location = new System.Drawing.Point(182, 16); + this.panelRight.Name = "panelRight"; + this.panelRight.Size = new System.Drawing.Size(16, 196); + this.panelRight.TabIndex = 4; + // + // panelTopLeft + // + this.panelTopLeft.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelTopLeft.BackgroundImage"))); + this.panelTopLeft.Location = new System.Drawing.Point(0, 0); + this.panelTopLeft.Name = "panelTopLeft"; + this.panelTopLeft.Size = new System.Drawing.Size(16, 16); + this.panelTopLeft.TabIndex = 0; + // + // panelTopRight + // + this.panelTopRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panelTopRight.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelTopRight.BackgroundImage"))); + this.panelTopRight.Location = new System.Drawing.Point(182, 0); + this.panelTopRight.Name = "panelTopRight"; + this.panelTopRight.Size = new System.Drawing.Size(16, 16); + this.panelTopRight.TabIndex = 2; + // + // panelBottomRight + // + this.panelBottomRight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.panelBottomRight.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelBottomRight.BackgroundImage"))); + this.panelBottomRight.Location = new System.Drawing.Point(182, 212); + this.panelBottomRight.Name = "panelBottomRight"; + this.panelBottomRight.Size = new System.Drawing.Size(16, 16); + this.panelBottomRight.TabIndex = 7; + // + // panelBottomLeft + // + this.panelBottomLeft.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.panelBottomLeft.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panelBottomLeft.BackgroundImage"))); + this.panelBottomLeft.Location = new System.Drawing.Point(0, 212); + this.panelBottomLeft.Name = "panelBottomLeft"; + this.panelBottomLeft.Size = new System.Drawing.Size(16, 16); + this.panelBottomLeft.TabIndex = 5; + // + // panelMain + // + this.panelMain.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.panelMain.BackgroundImage = global::IrssUtils.Properties.Resources.Background; + this.panelMain.Controls.Add(this.tableLayoutPanelKeys); + this.panelMain.Controls.Add(this.textBoxKeys); + this.panelMain.Location = new System.Drawing.Point(16, 16); + this.panelMain.Name = "panelMain"; + this.panelMain.Size = new System.Drawing.Size(168, 198); + this.panelMain.TabIndex = 8; + // + // tableLayoutPanelKeys + // + this.tableLayoutPanelKeys.BackColor = System.Drawing.Color.Transparent; + this.tableLayoutPanelKeys.ColumnCount = 3; + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.Controls.Add(this.button2, 1, 0); + this.tableLayoutPanelKeys.Controls.Add(this.button1, 0, 0); + this.tableLayoutPanelKeys.Controls.Add(this.button3, 2, 0); + this.tableLayoutPanelKeys.Controls.Add(this.button4, 0, 1); + this.tableLayoutPanelKeys.Controls.Add(this.button5, 1, 1); + this.tableLayoutPanelKeys.Controls.Add(this.button6, 2, 1); + this.tableLayoutPanelKeys.Controls.Add(this.button7, 0, 2); + this.tableLayoutPanelKeys.Controls.Add(this.button8, 1, 2); + this.tableLayoutPanelKeys.Controls.Add(this.button9, 2, 2); + this.tableLayoutPanelKeys.Controls.Add(this.button0, 1, 3); + this.tableLayoutPanelKeys.Controls.Add(this.buttonStar, 0, 3); + this.tableLayoutPanelKeys.Controls.Add(this.buttonHash, 2, 3); + this.tableLayoutPanelKeys.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanelKeys.Location = new System.Drawing.Point(0, 30); + this.tableLayoutPanelKeys.Name = "tableLayoutPanelKeys"; + this.tableLayoutPanelKeys.RowCount = 4; + this.tableLayoutPanelKeys.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanelKeys.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanelKeys.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanelKeys.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanelKeys.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanelKeys.Size = new System.Drawing.Size(168, 168); + this.tableLayoutPanelKeys.TabIndex = 1; + // + // button2 + // + this.button2.Cursor = System.Windows.Forms.Cursors.Hand; + this.button2.Dock = System.Windows.Forms.DockStyle.Fill; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Location = new System.Drawing.Point(59, 3); + this.button2.MinimumSize = new System.Drawing.Size(32, 24); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(50, 36); + this.button2.TabIndex = 1; + this.button2.TabStop = false; + this.button2.Text = "2"; + this.button2.UseMnemonic = false; + this.button2.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Cursor = System.Windows.Forms.Cursors.Hand; + this.button1.Dock = System.Windows.Forms.DockStyle.Fill; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(3, 3); + this.button1.MinimumSize = new System.Drawing.Size(32, 24); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(50, 36); + this.button1.TabIndex = 0; + this.button1.TabStop = false; + this.button1.Text = "1"; + this.button1.UseMnemonic = false; + this.button1.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Cursor = System.Windows.Forms.Cursors.Hand; + this.button3.Dock = System.Windows.Forms.DockStyle.Fill; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.Location = new System.Drawing.Point(115, 3); + this.button3.MinimumSize = new System.Drawing.Size(32, 24); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(50, 36); + this.button3.TabIndex = 2; + this.button3.TabStop = false; + this.button3.Text = "3"; + this.button3.UseMnemonic = false; + this.button3.UseVisualStyleBackColor = true; + // + // button4 + // + this.button4.Cursor = System.Windows.Forms.Cursors.Hand; + this.button4.Dock = System.Windows.Forms.DockStyle.Fill; + this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button4.Location = new System.Drawing.Point(3, 45); + this.button4.MinimumSize = new System.Drawing.Size(32, 24); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(50, 36); + this.button4.TabIndex = 3; + this.button4.TabStop = false; + this.button4.Text = "4"; + this.button4.UseMnemonic = false; + this.button4.UseVisualStyleBackColor = true; + // + // button5 + // + this.button5.Cursor = System.Windows.Forms.Cursors.Hand; + this.button5.Dock = System.Windows.Forms.DockStyle.Fill; + this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button5.Location = new System.Drawing.Point(59, 45); + this.button5.MinimumSize = new System.Drawing.Size(32, 24); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(50, 36); + this.button5.TabIndex = 4; + this.button5.TabStop = false; + this.button5.Text = "5"; + this.button5.UseMnemonic = false; + this.button5.UseVisualStyleBackColor = true; + // + // button6 + // + this.button6.Cursor = System.Windows.Forms.Cursors.Hand; + this.button6.Dock = System.Windows.Forms.DockStyle.Fill; + this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button6.Location = new System.Drawing.Point(115, 45); + this.button6.MinimumSize = new System.Drawing.Size(32, 24); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(50, 36); + this.button6.TabIndex = 5; + this.button6.TabStop = false; + this.button6.Text = "6"; + this.button6.UseMnemonic = false; + this.button6.UseVisualStyleBackColor = true; + // + // button7 + // + this.button7.Cursor = System.Windows.Forms.Cursors.Hand; + this.button7.Dock = System.Windows.Forms.DockStyle.Fill; + this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button7.Location = new System.Drawing.Point(3, 87); + this.button7.MinimumSize = new System.Drawing.Size(32, 24); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(50, 36); + this.button7.TabIndex = 6; + this.button7.TabStop = false; + this.button7.Text = "7"; + this.button7.UseMnemonic = false; + this.button7.UseVisualStyleBackColor = true; + // + // button8 + // + this.button8.Cursor = System.Windows.Forms.Cursors.Hand; + this.button8.Dock = System.Windows.Forms.DockStyle.Fill; + this.button8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button8.Location = new System.Drawing.Point(59, 87); + this.button8.MinimumSize = new System.Drawing.Size(32, 24); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(50, 36); + this.button8.TabIndex = 7; + this.button8.TabStop = false; + this.button8.Text = "8"; + this.button8.UseMnemonic = false; + this.button8.UseVisualStyleBackColor = true; + // + // button9 + // + this.button9.Cursor = System.Windows.Forms.Cursors.Hand; + this.button9.Dock = System.Windows.Forms.DockStyle.Fill; + this.button9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button9.Location = new System.Drawing.Point(115, 87); + this.button9.MinimumSize = new System.Drawing.Size(32, 24); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(50, 36); + this.button9.TabIndex = 8; + this.button9.TabStop = false; + this.button9.Text = "9"; + this.button9.UseMnemonic = false; + this.button9.UseVisualStyleBackColor = true; + // + // button0 + // + this.button0.Cursor = System.Windows.Forms.Cursors.Hand; + this.button0.Dock = System.Windows.Forms.DockStyle.Fill; + this.button0.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button0.Location = new System.Drawing.Point(59, 129); + this.button0.MinimumSize = new System.Drawing.Size(32, 24); + this.button0.Name = "button0"; + this.button0.Size = new System.Drawing.Size(50, 36); + this.button0.TabIndex = 10; + this.button0.TabStop = false; + this.button0.Text = "0"; + this.button0.UseMnemonic = false; + this.button0.UseVisualStyleBackColor = true; + // + // buttonStar + // + this.buttonStar.Cursor = System.Windows.Forms.Cursors.Hand; + this.buttonStar.Dock = System.Windows.Forms.DockStyle.Fill; + this.buttonStar.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonStar.Location = new System.Drawing.Point(3, 129); + this.buttonStar.MinimumSize = new System.Drawing.Size(32, 24); + this.buttonStar.Name = "buttonStar"; + this.buttonStar.Size = new System.Drawing.Size(50, 36); + this.buttonStar.TabIndex = 9; + this.buttonStar.TabStop = false; + this.buttonStar.Text = "*"; + this.buttonStar.UseMnemonic = false; + this.buttonStar.UseVisualStyleBackColor = true; + // + // buttonHash + // + this.buttonHash.Cursor = System.Windows.Forms.Cursors.Hand; + this.buttonHash.Dock = System.Windows.Forms.DockStyle.Fill; + this.buttonHash.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.buttonHash.Location = new System.Drawing.Point(115, 129); + this.buttonHash.MinimumSize = new System.Drawing.Size(32, 24); + this.buttonHash.Name = "buttonHash"; + this.buttonHash.Size = new System.Drawing.Size(50, 36); + this.buttonHash.TabIndex = 11; + this.buttonHash.TabStop = false; + this.buttonHash.Text = "#"; + this.buttonHash.UseMnemonic = false; + this.buttonHash.UseVisualStyleBackColor = true; + // + // textBoxKeys + // + this.textBoxKeys.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.textBoxKeys.Dock = System.Windows.Forms.DockStyle.Top; + this.textBoxKeys.Font = new System.Drawing.Font("Courier New", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.textBoxKeys.Location = new System.Drawing.Point(0, 0); + this.textBoxKeys.Name = "textBoxKeys"; + this.textBoxKeys.Size = new System.Drawing.Size(168, 30); + this.textBoxKeys.TabIndex = 0; + this.textBoxKeys.WordWrap = false; + // + // SmsKeyboard + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Fuchsia; + this.ClientSize = new System.Drawing.Size(198, 228); + this.ControlBox = false; + this.Controls.Add(this.panelMain); + this.Controls.Add(this.panelBottomLeft); + this.Controls.Add(this.panelBottomRight); + this.Controls.Add(this.panelTopRight); + this.Controls.Add(this.panelTopLeft); + this.Controls.Add(this.panelRight); + this.Controls.Add(this.panelLeft); + this.Controls.Add(this.panelBottom); + this.Controls.Add(this.panelTop); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(198, 228); + this.Name = "SmsKeyboard"; + this.Opacity = 0.8; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Virtual Keyboard"; + this.TopMost = true; + this.TransparencyKey = System.Drawing.Color.Fuchsia; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SmsKeyboard_FormClosed); + this.panelMain.ResumeLayout(false); + this.panelMain.PerformLayout(); + this.tableLayoutPanelKeys.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panelTop; + private System.Windows.Forms.Panel panelBottom; + private System.Windows.Forms.Panel panelLeft; + private System.Windows.Forms.Panel panelRight; + private System.Windows.Forms.Panel panelTopLeft; + private System.Windows.Forms.Panel panelTopRight; + private System.Windows.Forms.Panel panelBottomRight; + private System.Windows.Forms.Panel panelBottomLeft; + private System.Windows.Forms.Panel panelMain; + private System.Windows.Forms.TextBox textBoxKeys; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanelKeys; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button0; + private System.Windows.Forms.Button buttonStar; + private System.Windows.Forms.Button buttonHash; + + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace IrssUtils.Forms +{ + + /// <summary> + /// SMS style virtual keyboard. + /// </summary> + public partial class SmsKeyboard : Form + { + + #region Variables + + bool _capsLock; + bool _shift; + + Timer _timer; + + #endregion Variables + + #region Properties + + /// <summary> + /// Gets or sets the text output. + /// </summary> + /// <value>The text output.</value> + public string TextOutput + { + get { return textBoxKeys.Text; } + set { textBoxKeys.Text = value; } + } + + #endregion Properties + + #region Constructor + + /// <summary> + /// Initializes a new instance of the <see cref="VirtualKeyboard"/> class. + /// </summary> + public SmsKeyboard() + { + InitializeComponent(); + + _timer = new Timer(); + _timer.Interval = 2000; + _timer.Tick += new EventHandler(Timeout); + _timer.Enabled = true; + } + + #endregion Constructor + + void Timeout(object sender, EventArgs e) + { + //textBoxKeys.SelectionLength = 0; + //textBoxKeys.SelectionStart++; + + + _timer.Stop(); + } + + void TextAdd(string str) + { + string toAdd = str.Clone() as string; + + if (_shift || _capsLock) + toAdd = toAdd.ToUpper(); + else + toAdd = toAdd.ToLower(); + + textBoxKeys.Paste(toAdd); + + if (_shift) + _shift = false; + + _timer.Start(); + } + void TextBackspace() + { + } + + void ToggleShift() + { + _shift = !_shift; + if (_capsLock) + _capsLock = false; + } + void ToggleCapsLock() + { + _capsLock = !_capsLock; + if (_shift) + _shift = false; + } + + private void buttonDone_Click(object sender, EventArgs e) + { + if (String.IsNullOrEmpty(textBoxKeys.Text)) + this.DialogResult = DialogResult.Cancel; + + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void SmsKeyboard_FormClosed(object sender, FormClosedEventArgs e) + { + _timer.Stop(); + } + + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.resx =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.resx (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SmsKeyboard.resx 2007-12-09 06:00:45 UTC (rev 1136) @@ -0,0 +1,153 @@ +<?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> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="panelTopLeft.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAGGoAAB + hqABJxZkogAAADxJREFUOE9jYBgFIy0EFBQU/qNjosIAm0aYGEED0DU3NDT8R8ZEG4CuEcbHawCy7RQZ + gEszSJwoFwxuAwBKCJWYy6xHKAAAAABJRU5ErkJggg== +</value> + </data> + <data name="panelTopRight.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAGGoAAB + hqABJxZkogAAAD1JREFUOE9jYBgFwyEEFBQU/qNjkvyFzQCYGFEGNTQ0/EfGJLsG3QAYn2hXEDIAZBBe + r+AyACROlCuGvgEAseGVmCLfnHsAAAAASUVORK5CYII= +</value> + </data> + <data name="panelBottomRight.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAGGoAAB + hqABJxZkogAAAE9JREFUOE9jbGho+M+AAyxYsAAs8+DBA0ZcahhABuDCCgoK/0EYp2aQxOA1AOZ8sr1A + lP+xhQGyzQRtBxmAroFop8OiBpsBeKNtVHI4hgAAFoGIYl+udS0AAAAASUVORK5CYII= +</value> + </data> + <data name="panelBottomLeft.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAGGoAAB + hqABJxZkogAAAEpJREFUOE9jZMADFBQU/oOkExIS8CnDLQcyAIQbGhpwYrwmDx4D8HmDYOAQ8gbRBuAy + iKABIAUwzdhoogyAKaLYAJJsG1VMxxAAACPwg+GiZL60AAAAAElFTkSuQmCC +</value> + </data> +</root> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VirtualKeyboard.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VirtualKeyboard.Designer.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VirtualKeyboard.Designer.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -1,5 +1,6 @@ namespace IrssUtils.Forms { + partial class VirtualKeyboard { /// <summary> @@ -1184,4 +1185,5 @@ private System.Windows.Forms.Button buttonCancel; } -} \ No newline at end of file + +} Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-12-09 06:00:45 UTC (rev 1136) @@ -77,6 +77,12 @@ <Compile Include="Forms\BlastCommand.Designer.cs"> <DependentUpon>BlastCommand.cs</DependentUpon> </Compile> + <Compile Include="Forms\SmsKeyboard.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Forms\SmsKeyboard.Designer.cs"> + <DependentUpon>SmsKeyboard.cs</DependentUpon> + </Compile> <Compile Include="Forms\DisplayModeCommand.cs"> <SubType>Form</SubType> </Compile> @@ -182,6 +188,10 @@ <DependentUpon>BlastCommand.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="Forms\SmsKeyboard.resx"> + <DependentUpon>SmsKeyboard.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="Forms\DisplayModeCommand.resx"> <DependentUpon>DisplayModeCommand.cs</DependentUpon> <SubType>Designer</SubType> Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2007-12-09 06:00:45 UTC (rev 1136) @@ -27,6 +27,7 @@ <LI>Added support for the RedEye blaster device.</LI> <LI>Added support for the Nintendo Wii Remote (no classic controller or accelerometer support yet).</LI> <LI>Improved suspend/resume handling ... again ... hopefully this works!</LI> +<LI>Re-synchronized InputHandler with MediaPortal</LI> </UL></P> <BR> Property changes on: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver ___________________________________________________________________ Name: svn:ignore - *.suo *.user thumbs.db + *.suo *.user thumbs.db bin obj Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -9,21 +9,36 @@ namespace HcwTransceiver { + /// <summary> + /// Configure the HCW Transceiver plugin. + /// </summary> public partial class Configure : Form { #region Properties + /// <summary> + /// Gets or sets the repeat delay. + /// </summary> + /// <value>The repeat delay.</value> public int RepeatDelay { get { return Decimal.ToInt32(numericUpDownButtonRepeatDelay.Value); } set { numericUpDownButtonRepeatDelay.Value = new Decimal(value); } } + /// <summary> + /// Gets or sets the blast repeats. + /// </summary> + /// <value>The blast repeats.</value> public int BlastRepeats { get { return Decimal.ToInt32(numericUpDownRepeatCount.Value); } set { numericUpDownRepeatCount.Value = new Decimal(value); } } + /// <summary> + /// Gets or sets the learn timeout. + /// </summary> + /// <value>The learn timeout.</value> public int LearnTimeout { get { return Decimal.ToInt32(numericUpDownLearnTimeout.Value); } @@ -34,6 +49,9 @@ #region Constructor + /// <summary> + /// Initializes a new instance of the <see cref="Configure"/> class. + /// </summary> public Configure() { InitializeComponent(); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HCW Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HCW Transceiver.csproj 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HCW Transceiver.csproj 2007-12-09 06:00:45 UTC (rev 1136) @@ -16,11 +16,12 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG</DefineConstants> + <DefineConstants>TRACE;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <UseVSHostingProcess>true</UseVSHostingProcess> + <UseVSHostingProcess>false</UseVSHostingProcess> + <DocumentationFile>bin\Debug\HCW Transceiver.XML</DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> @@ -91,6 +92,7 @@ </Target> --> <PropertyGroup> - <PostBuildEvent>copy "$(TargetFileName)" "\MediaPortal Development\Plugin Releases\IR Server Suite\IR Server Plugins\"</PostBuildEvent> + <PostBuildEvent> + </PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -13,9 +13,11 @@ namespace HcwTransceiver { + /// <summary> + /// IR Server plugin supporting Hauppauge devices. + /// </summary> [CLSCompliant(false)] - public class HcwTransceiver : - IRServerPlugin, IConfigure, ITransmitIR, ILearnIR, IRemoteReceiver + public class HcwTransceiver : IRServerPluginBase, IRemoteReceiver // IConfigure, ITransmitIR, ILearnIR, { #region Interop @@ -37,8 +39,8 @@ #region Delegates //Sets up callback so that other forms can catch a key press - public delegate void HCWEvent(int keypress); - //public event HCWEvent HCWKeyPressed; + delegate void HCWEvent(int keypress); + //event HCWEvent HCWKeyPressed; #endregion Delegates @@ -46,20 +48,10 @@ static readonly string ConfigurationFile = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + - "\\IR Server Suite\\IR Server\\USB-UIRT Transceiver.xml"; + "\\IR Server Suite\\IR Server\\HCW Transceiver.xml"; - const int UUIRTDRV_IRFMT_UUIRT = 0x0000; - const int UUIRTDRV_IRFMT_PRONTO = 0x0010; - const int UUIRTDRV_IRFMT_LEARN_FORCERAW = 0x0100; - const int UUIRTDRV_IRFMT_LEARN_FORCESTRUC = 0x0200; - const int UUIRTDRV_IRFMT_LEARN_FORCEFREQ = 0x0400; - const int UUIRTDRV_IRFMT_LEARN_FREQDETECT = 0x0800; - - static readonly string[] Ports = new string[] { "Default", "Port 1", "Port 2", "Port 3" }; + static readonly string[] Ports = new string[] { "Default", "Port 1", "Port 2" }; - const int AbortLearn = -1; - const int AllowLearn = 0; - #endregion Constants #region Variables @@ -81,31 +73,65 @@ #region Implementation - public override string Name { get { return "HCW Transceiver"; } } - public override string Version { get { return "1.0.3.4"; } } - public override string Author { get { return "and-81"; } } - public override string Description { get { return "Support for the HCW transceiver"; } } + /// <summary> + /// Name of the IR Server plugin. + /// </summary> + /// <value>The name.</value> + public override string Name { get { return "HCW Receiver"; } } + /// <summary> + /// IR Server plugin version. + /// </summary> + /// <value>The version.</value> + public override string Version { get { return "1.0.3.5"; } } + /// <summary> + /// The IR Server plugin's author. + /// </summary> + /// <value>The author.</value> + public override string Author { get { return "and-81, original MediaPortal code by mPod"; } } + /// <summary> + /// A description of the IR Server plugin. + /// </summary> + /// <value>The description.</value> + public override string Description { get { return "Support for Hauppauge devices"; } } + /// <summary> + /// Start the IR Server plugin. + /// </summary> + /// <returns>true if successful, otherwise false.</returns> public override bool Start() { LoadSettings(); return true; } + /// <summary> + /// Suspend the IR Server plugin when computer enters standby. + /// </summary> public override void Suspend() { Stop(); } + /// <summary> + /// Resume the IR Server plugin when the computer returns from standby. + /// </summary> public override void Resume() { Start(); } + /// <summary> + /// Stop the IR Server plugin. + /// </summary> public override void Stop() { } - public void Configure() + + /// <summary> + /// Configure the IR Server plugin. + /// </summary> + /// <param name="owner">The owner window to use for creating modal dialogs.</param> + public void Configure(IWin32Window owner) { LoadSettings(); @@ -115,7 +141,7 @@ config.BlastRepeats = _blastRepeats; config.LearnTimeout = _learnTimeout; - if (config.ShowDialog() == DialogResult.OK) + if (config.ShowDialog(owner) == DialogResult.OK) { _repeatDelay = config.RepeatDelay; _blastRepeats = config.BlastRepeats; @@ -125,25 +151,23 @@ } } + + /// <summary> + /// Callback for remote button presses. + /// </summary> + /// <value>The remote callback.</value> public RemoteHandler RemoteCallback { get { return _remoteButtonHandler; } set { _remoteButtonHandler = value; } } + /// <summary> + /// Gets the available ports. + /// </summary> + /// <value>The available ports.</value> public string[] AvailablePorts { get { return Ports; } } - public bool Transmit(string port, byte[] data) - { - - return false; - } - public LearnStatus Learn(out byte[] data) - { - data = null; - return LearnStatus.Failure; - } - void LoadSettings() { try @@ -155,10 +179,14 @@ _blastRepeats = int.Parse(doc.DocumentElement.Attributes["BlastRepeats"].Value); _learnTimeout = int.Parse(doc.DocumentElement.Attributes["LearnTimeout"].Value); } +#if TRACE catch (Exception ex) { - Console.WriteLine(ex.ToString()); - + Trace.WriteLine(ex.ToString()); +#else + catch + { +#endif _repeatDelay = 500; _blastRepeats = 4; _learnTimeout = 10000; @@ -183,10 +211,16 @@ writer.WriteEndDocument(); writer.Close(); } +#if TRACE catch (Exception ex) { - Console.WriteLine(ex.ToString()); + Trace.WriteLine(ex.ToString()); } +#else + catch + { + } +#endif } #endregion Implementation Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -29,7 +29,8 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.4")] -[assembly: AssemblyFileVersion("1.0.3.4")] +[assembly: AssemblyVersion("1.0.3.5")] +[assembly: AssemblyFileVersion("1.0.3.5")] [assembly: CLSCompliant(true)] +[assembly: GuidAttribute("560F8887-A826-40c8-BAB2-022FB7011EEF")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/irremote.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/irremote.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/irremote.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -92,13 +92,29 @@ #endregion + /// <summary> + /// Current Version. + /// </summary> public static string CurrentVersion = "2.49.23332"; + /// <summary> + /// Close the device. + /// </summary> + /// <param name="WindowHandle">The window handle.</param> + /// <param name="Msg">The MSG.</param> + /// <returns><c>true</c> if successful; otherwise <c>false</c>.</returns> public static bool IRClose(IntPtr WindowHandle, uint Msg) { return IR_Close((int)WindowHandle, Msg); } + /// <summary> + /// Get system key code. + /// </summary> + /// <param name="RepeatCount">The repeat count.</param> + /// <param name="RemoteCode">The remote code.</param> + /// <param name="KeyCode">The key code.</param> + /// <returns><c>true</c> if successful; otherwise <c>false</c>.</returns> public static bool IRGetSystemKeyCode(out int RepeatCount, out int RemoteCode, out int KeyCode) { RepeatCount = 0; @@ -119,11 +135,24 @@ return result; } + /// <summary> + /// Opens the device. + /// </summary> + /// <param name="WindowHandle">The window handle.</param> + /// <param name="Msg">The MSG.</param> + /// <param name="Verbose">if set to <c>true</c> [verbose].</param> + /// <param name="IRPort">The IR port.</param> + /// <returns><c>true</c> if successful; otherwise <c>false</c>.</returns> public static bool IROpen(IntPtr WindowHandle, uint Msg, bool Verbose, ushort IRPort) { return IR_Open((int)WindowHandle, Msg, Verbose, IRPort); } + /// <summary> + /// Set DLL directory. + /// </summary> + /// <param name="PathName">Name of the path.</param> + /// <returns><c>true</c> if successful; otherwise <c>false</c>.</returns> public static bool IRSetDllDirectory(string PathName) { return SetDllDirectory(PathName); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -194,8 +194,6 @@ OpenDevice(); StartReadThread(); - _deviceAvailable = true; - // Initialize device ... WriteSync(StartPacket); Thread.Sleep(PacketTimeout); @@ -240,8 +238,6 @@ #endif */ - _deviceAvailable = false; - StopReadThread(); CloseDevice(); @@ -265,8 +261,6 @@ WriteSync(StopPacket); Thread.Sleep(PacketTimeout); - _deviceAvailable = false; - StopReadThread(); CloseDevice(); @@ -286,8 +280,6 @@ { OpenDevice(); StartReadThread(); - - _deviceAvailable = true; } catch { @@ -396,6 +388,9 @@ // Send packet WriteSync(DataPacket(code)); + + // Force a delay between blasts (hopefully solves back-to-back blast errors) ... + Thread.Sleep(PacketTimeout); } #endregion Driver overrides @@ -535,7 +530,7 @@ DebugWriteLine("StartReadThread()"); #endif - if (_readThread != null && _readThread.IsAlive) + if (_readThread != null) return; _stopReadThread = new ManualResetEvent(false); @@ -555,7 +550,7 @@ DebugWriteLine("StopReadThread()"); #endif - if (_readThread == null || !_readThread.IsAlive) + if (_readThread == null) return; _readThreadMode = ReadThreadMode.Stop; @@ -601,6 +596,8 @@ _readHandle.Dispose(); throw new Win32Exception(lastError); } + + _deviceAvailable = true; } /// <summary> @@ -612,6 +609,8 @@ DebugWriteLine("CloseDevice()"); #endif + _deviceAvailable = false; + if (_readHandle != null) { CloseHandle(_readHandle); @@ -637,8 +636,6 @@ OpenDevice(); StartReadThread(); - - _deviceAvailable = true; } void OnDeviceRemoval() { @@ -646,8 +643,6 @@ DebugWriteLine("OnDeviceRemoval()"); #endif - _deviceAvailable = false; - StopReadThread(); CloseDevice(); } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs 2007-12-08 18:56:18 UTC (rev 1135) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs 2007-12-09 06:00:45 UTC (rev 1136) @@ -11,8 +11,6 @@ using IRServerPluginInterface; -// TODO: Lock ehome handle on access to driver - namespace MicrosoftMceTransceiver { @@ -329,11 +327,14 @@ void StartReceive(int receivePort, int timeout) { + if (!_deviceAvailable) + throw new ApplicationException("Device not available"); + int bytesReturned; StartReceiveParams structure; - structure.Receiver = new IntPtr(receivePort); - structure.Timeout = new IntPtr(timeout); + structure.Receiver = new IntPtr(receivePort); + structure.Timeout = new IntPtr(timeout); IntPtr structPtr = IntPtr.Zero; @@ -354,12 +355,18 @@ void StopReceive() { + if (!_deviceAvailable) + throw new ApplicationException("Device not available"); + int bytesReturned; IoControl(IoCtrl.StopReceive, IntPtr.Zero, 0, IntPtr.Zero, 0, out bytesReturned); } void GetDeviceCapabilities() { + if (!_deviceAvailable) + throw new ApplicationException("Device not available"); + int bytesReturned; DeviceCapabilities structure = new DeviceCapabilities(); @@ -413,6 +420,9 @@ void GetBlasters() { + if (!_deviceAvailable) + throw new ApplicationException("Device not available"); + if (_numTxPorts <= 0) return; @@ -447,9 +457,12 @@ void TransmitIR(byte[] irData, int carrier, int transmitPortMask) { + if (!_deviceAvailable) + throw new ApplicationException("Device not available"); + int bytesReturned; - TransmitParams transmitParams = new TransmitParams(); + TransmitParams transmitParams = new TransmitParams(); transmitParams.TransmitPortMask = new IntPtr(transmitPortMask); if (carrier == IrCode.CarrierFrequencyUnknown) @@ -463,10 +476,10 @@ transmitParams.Flags = new IntPtr((int)mode); - TransmitChunk transmitChunk = new TransmitChunk(); + TransmitChunk transmitChunk = new TransmitChunk(); transmitChunk.OffsetToNextChunk = new IntPtr(0); - transmitChunk.RepeatCount = new IntPtr(1); - transmitChunk.ByteCount = new IntPtr(irData.Length); + transmitChunk.RepeatCount = new IntPtr(1); + transmitChunk.ByteCount = new IntPtr(irData.Length); int bufferSize = irData.Length + Marshal.SizeOf(typeof(TransmitChunk)) + 8; byte[] buffer = new byte[bufferSize]; @@ -477,12 +490,12 @@ Array.Copy(irData, 0, buffer, rawTransmitChunk.Length, irData.Length); IntPtr structurePtr = IntPtr.Zero; - IntPtr bufferPtr = IntPtr.Zero; + IntPtr bufferPtr = IntPtr.Zero; try { - structurePtr = Marshal.AllocHGlobal(Marshal.SizeOf(transmitParams)); - bufferPtr = Marshal.AllocHGlobal(buffer.Length); + structurePtr = Marshal.AllocHGlobal(Marshal.SizeOf(transmitParams)); + bufferPtr = Marshal.AllocHGlobal(buffer.Length); Marshal.StructureToPtr(transmitParams, structurePtr, true); @@ -494,10 +507,13 @@ { if (structurePtr != IntPtr.Zero) Marshal.FreeHGlobal(structurePtr); - + if (bufferPtr != IntPtr.Zero) Marshal.FreeHGlobal(bufferPtr); } + + // Force a delay between blasts (hopefully solves back-to-back blast errors) ... + Thread.Sleep(PacketTimeout); } void IoControl(IoCtrl ioControlCode, IntPtr inBuffer, int inBufferSize, IntPtr outBuffer, int outBufferSize, out int bytesReturned) @@ -531,7 +547,6 @@ throw new Win32Exception(lastError); } } - } catch { @@ -571,8 +586,6 @@ StartReadThread(); - _deviceAvailable = true; - _notifyWindow.Create(); _notifyWindow.RegisterDeviceArrival(); _notifyWindow.RegisterDeviceRemoval(_eHomeHandle.DangerousGetHandle()); @@ -592,8 +605,6 @@ _notifyWindow.DeviceArrival -= new DeviceEventHandler(OnDeviceArrival); _notifyWindow.DeviceRemoval -= new DeviceEventHandler(OnDeviceRemoval); - _deviceAvailable = false; - StopReadThread(); CloseDevice(); @@ -614,8 +625,6 @@ DebugWriteLine("Suspend()"); #endif - _deviceAvailable = false; - StopReadThread(); CloseDevice(); } @@ -633,8 +642,6 @@ { OpenDevice(); StartReadThread(); - - _deviceAvailable = true; } catch { @@ -786,7 +793,7 @@ DebugWriteLine("StartReadThread()"); #endif - if (_readThread != null && _readThread.IsAlive) + if (_readThread != null) return; _readThread = new Thread(new ThreadStart(ReadThread)); @@ -803,7 +810,7 @@ DebugWriteLine("StopReadThread()"); #endif - if (_readThread == null || !_readThread.IsAlive) + if (_readThread == null) return; _readThreadMode = ReadThreadMode.Stop; @@ -835,6 +842,8 @@ _eHomeHandle = null; throw new Win32Exception(lastError); } + + _deviceAvailable = true; } /// <summary> @@ -846,6 +855,8 @@ DebugWriteLine("CloseDevice()"); #endif + _deviceAvailable = false; + if (_eHomeHandle == null) return; @@ -868,8 +879,6 @@ _readThreadMode = ReadThreadMode.Receiving; StartReadThread(); - - _deviceAvailable = true; } void OnDeviceRemoval() { @@ -877,8 +886,6 @@ DebugWriteLine("OnDeviceRemoval()"); #endif - _deviceAvailable = false; - StopReadThread(); CloseDevice(); } @@ -944,7 +951,6 @@ _readThreadMode = ReadThreadMode.LearningDone; ... [truncated message content] |