From: <an...@us...> - 2008-03-05 06:14:55
|
Revision: 1427 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1427&view=rev Author: and-81 Date: 2008-03-04 22:14:54 -0800 (Tue, 04 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs trunk/plugins/IR Server Suite/Applications/Abstractor/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/Abstractor/Icon.ico Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-05 06:14:54 UTC (rev 1427) @@ -10,6 +10,7 @@ <RootNamespace>Abstractor</RootNamespace> <AssemblyName>Abstractor</AssemblyName> <StartupObject>Abstractor.Program</StartupObject> + <ApplicationIcon>Icon.ico</ApplicationIcon> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -64,6 +65,9 @@ <Name>IrssUtils</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Content Include="Icon.ico" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Added: trunk/plugins/IR Server Suite/Applications/Abstractor/Icon.ico =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/Applications/Abstractor/Icon.ico ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.Designer.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.Designer.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -36,6 +36,7 @@ this.groupBoxStatus = new System.Windows.Forms.GroupBox(); this.listBoxStatus = new System.Windows.Forms.ListBox(); this.groupBoxMapAbstract = new System.Windows.Forms.GroupBox(); + this.checkBoxToggle = new System.Windows.Forms.CheckBox(); this.buttonClear = new System.Windows.Forms.Button(); this.buttonLoad = new System.Windows.Forms.Button(); this.buttonSave = new System.Windows.Forms.Button(); @@ -46,8 +47,6 @@ this.listViewButtonMap = new System.Windows.Forms.ListView(); this.columnHeaderAbstractButton = new System.Windows.Forms.ColumnHeader(); this.columnHeaderKeyCode = new System.Windows.Forms.ColumnHeader(); - this.checkBoxToggle = new System.Windows.Forms.CheckBox(); - this.checkBoxForwardAbstract = new System.Windows.Forms.CheckBox(); this.groupBoxSetup.SuspendLayout(); this.groupBoxStatus.SuspendLayout(); this.groupBoxMapAbstract.SuspendLayout(); @@ -92,7 +91,7 @@ // // buttonConnect // - this.buttonConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonConnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonConnect.Location = new System.Drawing.Point(264, 32); this.buttonConnect.Name = "buttonConnect"; this.buttonConnect.Size = new System.Drawing.Size(80, 24); @@ -103,7 +102,7 @@ // // buttonDisconnect // - this.buttonDisconnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonDisconnect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonDisconnect.Location = new System.Drawing.Point(352, 32); this.buttonDisconnect.Name = "buttonDisconnect"; this.buttonDisconnect.Size = new System.Drawing.Size(80, 24); @@ -117,9 +116,9 @@ this.groupBoxStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.groupBoxStatus.Controls.Add(this.listBoxStatus); - this.groupBoxStatus.Location = new System.Drawing.Point(8, 344); + this.groupBoxStatus.Location = new System.Drawing.Point(8, 424); this.groupBoxStatus.Name = "groupBoxStatus"; - this.groupBoxStatus.Size = new System.Drawing.Size(440, 192); + this.groupBoxStatus.Size = new System.Drawing.Size(440, 136); this.groupBoxStatus.TabIndex = 2; this.groupBoxStatus.TabStop = false; this.groupBoxStatus.Text = "Status"; @@ -135,7 +134,7 @@ this.listBoxStatus.Location = new System.Drawing.Point(8, 16); this.listBoxStatus.Name = "listBoxStatus"; this.listBoxStatus.ScrollAlwaysVisible = true; - this.listBoxStatus.Size = new System.Drawing.Size(424, 168); + this.listBoxStatus.Size = new System.Drawing.Size(424, 112); this.listBoxStatus.TabIndex = 0; // // groupBoxMapAbstract @@ -154,15 +153,26 @@ this.groupBoxMapAbstract.Controls.Add(this.listViewButtonMap); this.groupBoxMapAbstract.Location = new System.Drawing.Point(8, 80); this.groupBoxMapAbstract.Name = "groupBoxMapAbstract"; - this.groupBoxMapAbstract.Size = new System.Drawing.Size(440, 256); + this.groupBoxMapAbstract.Size = new System.Drawing.Size(440, 336); this.groupBoxMapAbstract.TabIndex = 1; this.groupBoxMapAbstract.TabStop = false; this.groupBoxMapAbstract.Text = "Abstract Remote Map"; // + // checkBoxToggle + // + this.checkBoxToggle.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.checkBoxToggle.Location = new System.Drawing.Point(96, 304); + this.checkBoxToggle.Name = "checkBoxToggle"; + this.checkBoxToggle.Size = new System.Drawing.Size(160, 24); + this.checkBoxToggle.TabIndex = 6; + this.checkBoxToggle.Text = "Remote uses Toggle codes"; + this.checkBoxToggle.UseVisualStyleBackColor = true; + this.checkBoxToggle.Visible = false; + // // buttonClear // this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonClear.Location = new System.Drawing.Point(8, 224); + this.buttonClear.Location = new System.Drawing.Point(8, 304); this.buttonClear.Name = "buttonClear"; this.buttonClear.Size = new System.Drawing.Size(80, 24); this.buttonClear.TabIndex = 5; @@ -173,7 +183,7 @@ // buttonLoad // this.buttonLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLoad.Location = new System.Drawing.Point(264, 224); + this.buttonLoad.Location = new System.Drawing.Point(264, 304); this.buttonLoad.Name = "buttonLoad"; this.buttonLoad.Size = new System.Drawing.Size(80, 24); this.buttonLoad.TabIndex = 7; @@ -184,7 +194,7 @@ // buttonSave // this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSave.Location = new System.Drawing.Point(352, 224); + this.buttonSave.Location = new System.Drawing.Point(352, 304); this.buttonSave.Name = "buttonSave"; this.buttonSave.Size = new System.Drawing.Size(80, 24); this.buttonSave.TabIndex = 8; @@ -194,6 +204,7 @@ // // labelDevice // + this.labelDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.labelDevice.Location = new System.Drawing.Point(232, 24); this.labelDevice.Name = "labelDevice"; this.labelDevice.Size = new System.Drawing.Size(72, 20); @@ -210,11 +221,14 @@ // // comboBoxDevice // + this.comboBoxDevice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxDevice.FormattingEnabled = true; this.comboBoxDevice.Location = new System.Drawing.Point(304, 24); this.comboBoxDevice.Name = "comboBoxDevice"; this.comboBoxDevice.Size = new System.Drawing.Size(128, 21); this.comboBoxDevice.TabIndex = 3; + this.comboBoxDevice.SelectedIndexChanged += new System.EventHandler(this.comboBoxDevice_SelectedIndexChanged); // // textBoxRemoteName // @@ -238,7 +252,7 @@ this.listViewButtonMap.Location = new System.Drawing.Point(8, 48); this.listViewButtonMap.MultiSelect = false; this.listViewButtonMap.Name = "listViewButtonMap"; - this.listViewButtonMap.Size = new System.Drawing.Size(424, 168); + this.listViewButtonMap.Size = new System.Drawing.Size(424, 248); this.listViewButtonMap.TabIndex = 4; this.listViewButtonMap.UseCompatibleStateImageBehavior = false; this.listViewButtonMap.View = System.Windows.Forms.View.Details; @@ -254,38 +268,16 @@ this.columnHeaderKeyCode.Text = "KeyCode"; this.columnHeaderKeyCode.Width = 288; // - // checkBoxToggle - // - this.checkBoxToggle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxToggle.Location = new System.Drawing.Point(96, 224); - this.checkBoxToggle.Name = "checkBoxToggle"; - this.checkBoxToggle.Size = new System.Drawing.Size(160, 24); - this.checkBoxToggle.TabIndex = 6; - this.checkBoxToggle.Text = "Remote uses Toggle codes"; - this.checkBoxToggle.UseVisualStyleBackColor = true; - this.checkBoxToggle.Visible = false; - // - // checkBoxForwardAbstract - // - this.checkBoxForwardAbstract.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxForwardAbstract.Location = new System.Drawing.Point(8, 544); - this.checkBoxForwardAbstract.Name = "checkBoxForwardAbstract"; - this.checkBoxForwardAbstract.Size = new System.Drawing.Size(168, 24); - this.checkBoxForwardAbstract.TabIndex = 3; - this.checkBoxForwardAbstract.Text = "Forward abstract buttons"; - this.checkBoxForwardAbstract.UseVisualStyleBackColor = true; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(456, 569); - this.Controls.Add(this.checkBoxForwardAbstract); this.Controls.Add(this.groupBoxMapAbstract); this.Controls.Add(this.groupBoxSetup); this.Controls.Add(this.groupBoxStatus); this.Name = "MainForm"; - this.Text = "Abstractor"; + this.Text = "Abstract Remote Map Creator"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.groupBoxSetup.ResumeLayout(false); this.groupBoxStatus.ResumeLayout(false); @@ -316,7 +308,6 @@ private System.Windows.Forms.ColumnHeader columnHeaderAbstractButton; private System.Windows.Forms.ColumnHeader columnHeaderKeyCode; private System.Windows.Forms.CheckBox checkBoxToggle; - private System.Windows.Forms.CheckBox checkBoxForwardAbstract; } } Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -98,6 +98,10 @@ "Page Down" };*/ + static readonly string AbstractRemoteMapFolder = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps"); + static readonly string AbstractRemoteSchemaFile = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps\\RemoteTable.xsd"); + + public enum AbstractButton { Up, @@ -180,7 +184,7 @@ IRServerInfo _irServerInfo = new IRServerInfo(); - DataSet _abstractRemoteButtons; + string _selectedDevice; #endregion Variables @@ -230,7 +234,6 @@ ClearMap(); /* - DataTable table = new DataTable("RemoteTable"); DataColumn column; @@ -259,26 +262,10 @@ table.Rows.Add(button.ToString(), name); } - //table.WriteXmlSchema("RemoteTable.xsd"); + //table.WriteXmlSchema(AbstractRemoteSchemaFile); - table.WriteXml("Microsoft MCE.xml"); - table.WriteXml("XBCDRC.xml"); - - */ - - //_abstractRemoteButtons = new DataSet("AbstractRemoteButtons"); - //_abstractRemoteButtons.CaseSensitive = true; - - //_abstractRemoteButtons.ReadXmlSchema("RemoteTable.xsd"); - - - //_abstractRemoteButtons.Tables.Add(table); - //_abstractRemoteButtons.Tables.Add(table); - - - //_lookupTable.WriteXmlSchema("Abstract Remote Model 0.1.xsd"); - //_lookupTable.WriteXml("Abstract Remote Button List.xml", XmlWriteMode.WriteSchema); - //_abstractRemoteButtons.WriteXml("Abstract Remote Button List.xml", XmlWriteMode.WriteSchema); + table.WriteXml("Template.xml"); + */ } private void MainForm_FormClosing(object sender, FormClosingEventArgs e) @@ -306,9 +293,6 @@ _registered = true; _irServerInfo = IRServerInfo.FromBytes(received.GetDataAsBytes()); - _abstractRemoteButtons = new DataSet("AbstractRemoteButtons"); - _abstractRemoteButtons.CaseSensitive = true; - _client.Send(new IrssMessage(MessageType.ActiveReceivers, MessageFlags.Request)); _client.Send(new IrssMessage(MessageType.ActiveBlasters, MessageFlags.Request)); } @@ -328,8 +312,6 @@ string[] receivers = received.GetDataAsString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); this.Invoke(_setDevices, new Object[] { receivers }); - - LoadDeviceFiles(receivers); break; case MessageType.RemoteEvent: @@ -363,7 +345,7 @@ this.Invoke(_addStatusLine, text); // If this remote event matches the criteria then set it to an abstract button in the list view ... - if (deviceName.Equals(comboBoxDevice.Text, StringComparison.OrdinalIgnoreCase)) + if (deviceName.Equals(_selectedDevice, StringComparison.OrdinalIgnoreCase)) { if (listViewButtonMap.SelectedItems.Count == 1) { @@ -387,34 +369,6 @@ } } } - - // Determine abstract button details ... - string abstractButton = LookupAbstractButton(deviceName, keyCode); - - bool isAbstract = true; - if (String.IsNullOrEmpty(abstractButton)) - { - isAbstract = false; - abstractButton = String.Format("{0} ({1})", deviceName, keyCode); - } - - string abstractText = String.Format("Button: {0}", abstractButton); - this.Invoke(_addStatusLine, abstractText); - - if (checkBoxForwardAbstract.Checked && isAbstract) - { - byte[] deviceNameBytes = Encoding.ASCII.GetBytes("Abstract"); - byte[] keyCodeBytes = Encoding.ASCII.GetBytes(abstractButton); - - byte[] bytes = new byte[8 + deviceNameBytes.Length + keyCodeBytes.Length]; - - BitConverter.GetBytes(deviceNameBytes.Length).CopyTo(bytes, 0); - deviceNameBytes.CopyTo(bytes, 4); - BitConverter.GetBytes(keyCodeBytes.Length).CopyTo(bytes, 4 + deviceNameBytes.Length); - keyCodeBytes.CopyTo(bytes, 8 + deviceNameBytes.Length); - - _client.Send(new IrssMessage(MessageType.ForwardRemoteEvent, MessageFlags.Request, bytes)); - } } void CommsFailure(object obj) @@ -524,67 +478,6 @@ } } - string LookupAbstractButton(string deviceName, string keyCode) - { - foreach (DataTable table in _abstractRemoteButtons.Tables) - { - string device = table.ExtendedProperties["Device"] as string; - - if (device.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) - { - string expression = String.Format("RawCode = '{0}'", keyCode); - - DataRow[] rows = table.Select(expression); - if (rows.Length == 1) - { - string button = rows[0]["AbstractButton"].ToString() as string; - if (!String.IsNullOrEmpty(button)) - { -#if TRACE - Trace.WriteLine(button + ", remote: " + table.ExtendedProperties["Remote"] as string + ", device: " + deviceName); -#endif - return button; - } - } - } - } - - return null; - //return String.Format("{0} ({1})", deviceName, keyCode); - } - - - void LoadDeviceFiles(string[] devices) - { - foreach (string device in devices) - { - string[] files = Directory.GetFiles(device, "*.xml", SearchOption.TopDirectoryOnly); - foreach (string file in files) - { - string remote = Path.GetFileNameWithoutExtension(file); - this.Invoke(_addStatusLine, String.Format("Loading {0} remote map \"{1}\"", device, remote)); - - string tableName = String.Format("{0}:{1}", device, remote); - - if (_abstractRemoteButtons.Tables.Contains(tableName)) - { - this.Invoke(_addStatusLine, "Table already loaded"); - continue; - } - - DataTable table = _abstractRemoteButtons.Tables.Add("RemoteTable"); - table.ReadXmlSchema("RemoteTable.xsd"); - table.ReadXml(file); - - - table.ExtendedProperties.Add("Device", device); - table.ExtendedProperties.Add("Remote", remote); - - table.TableName = tableName; - } - } - } - private void buttonClear_Click(object sender, EventArgs e) { ClearMap(); @@ -615,19 +508,18 @@ return; } - string device = comboBoxDevice.Text; + string directory = Path.Combine(AbstractRemoteMapFolder, _selectedDevice); - if (!Directory.Exists(device)) - Directory.CreateDirectory(device); + if (!Directory.Exists(directory)) + Directory.CreateDirectory(directory); string fileName = Path.ChangeExtension(textBoxRemoteName.Text, ".xml"); + string path = Path.Combine(directory, fileName); - string path = Path.Combine(device, fileName); - this.Invoke(_addStatusLine, String.Format("Writing to file \"{0}\"", path)); DataTable table = new DataTable("RemoteTable"); - table.ReadXmlSchema("RemoteTable.xsd"); + table.ReadXmlSchema(AbstractRemoteSchemaFile); foreach (ListViewItem item in listViewButtonMap.Items) { @@ -641,27 +533,24 @@ { if (String.IsNullOrEmpty(textBoxRemoteName.Text)) { - MessageBox.Show(this, "You must include a remote name before saving", "Missing remote name", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(this, "You must include a remote name to load", "Missing remote name", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - string device = comboBoxDevice.Text; - string fileName = Path.ChangeExtension(textBoxRemoteName.Text, ".xml"); + string directory = Path.Combine(AbstractRemoteMapFolder, _selectedDevice); + string path = Path.Combine(directory, fileName); - string path = Path.Combine(device, fileName); - if (!File.Exists(path)) { - MessageBox.Show(this, String.Format("Remote file not found ({0}) in device folder ({1})", fileName, device), "Remote file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(this, String.Format("Remote file not found ({0}) in device folder ({1})", fileName, _selectedDevice), "Remote file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - this.Invoke(_addStatusLine, String.Format("Reading from file \"{0}\"", path)); + this.Invoke(_addStatusLine, String.Format("Reading remote from file \"{0}\" (device: {1})", fileName, _selectedDevice)); DataTable table = new DataTable("RemoteTable"); - table.ReadXmlSchema("RemoteTable.xsd"); - + table.ReadXmlSchema(AbstractRemoteSchemaFile); table.ReadXml(path); string[] abstractButtons = Enum.GetNames(typeof(AbstractButton)); @@ -683,7 +572,7 @@ private void listViewButtonMap_KeyDown(object sender, KeyEventArgs e) { - if (e.KeyCode == Keys.Space) + if (e.KeyCode == Keys.Delete) { if (listViewButtonMap.SelectedItems.Count == 1) { @@ -692,7 +581,12 @@ } } + private void comboBoxDevice_SelectedIndexChanged(object sender, EventArgs e) + { + _selectedDevice = comboBoxDevice.Text; + } + } } Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/Properties/AssemblyInfo.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/Properties/AssemblyInfo.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -1,4 +1,5 @@ -using System.Reflection; +using System; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -6,11 +7,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Abstractor")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Abstract Remote Map Creator")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("and-81")] [assembly: AssemblyProduct("Abstractor")] -[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyCopyright("Aaron Dinnage")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,3 +32,5 @@ // [assembly: AssemblyVersion("1.0.4.2")] [assembly: AssemblyFileVersion("1.0.4.2")] + +[assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -35,7 +35,7 @@ internal const string UrlPrefix = "http://"; internal static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "Dbox Tuner\\Dbox Tuner.xml"); - internal static readonly string DataFile = Path.Combine(Common.FolderAppData, "Dbox Tuner\\Data.xml"); + internal static readonly string DataFile = Path.Combine(Common.FolderAppData, "Dbox Tuner\\Data.xml"); #endregion Constants Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Properties/AssemblyInfo.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Properties/AssemblyInfo.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -3,35 +3,33 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. [assembly: AssemblyTitle("Dbox Tuner")] [assembly: AssemblyDescription("Tune channels on a Dreambox - based on Mark Koenig's MediaPortal plugin")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] +[assembly: AssemblyCompany("and-81")] [assembly: AssemblyProduct("Dbox Tuner")] -[assembly: AssemblyCopyright("and-81")] +[assembly: AssemblyCopyright("Aaron Dinnage")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +// The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("C4021B4F-1451-4a84-BF3B-213C254290D8")] -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// Version information for an assembly consists of the following four values: // -// Hauptversion -// Nebenversion -// Buildnummer +// Major Version +// Minor Version +// Build Number // Revision // -// Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern -// übernehmen, indem Sie "*" eingeben: [assembly: AssemblyVersion("1.0.4.2")] [assembly: AssemblyFileVersion("1.0.4.2")] Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -39,6 +39,7 @@ this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.checkBoxAbstractRemoteMode = new System.Windows.Forms.CheckBox(); this.groupBoxMode.SuspendLayout(); this.SuspendLayout(); // @@ -125,7 +126,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(328, 144); + this.buttonCancel.Location = new System.Drawing.Point(328, 136); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 2; @@ -136,7 +137,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(256, 144); + this.buttonOK.Location = new System.Drawing.Point(256, 136); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 1; @@ -144,24 +145,39 @@ this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // + // checkBoxAbstractRemoteMode + // + this.checkBoxAbstractRemoteMode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkBoxAbstractRemoteMode.AutoSize = true; + this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(8, 136); + this.checkBoxAbstractRemoteMode.Name = "checkBoxAbstractRemoteMode"; + this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(159, 17); + this.checkBoxAbstractRemoteMode.TabIndex = 3; + this.checkBoxAbstractRemoteMode.Text = "Use Abstract Remote Model"; + this.toolTips.SetToolTip(this.checkBoxAbstractRemoteMode, "Enable automatic abstract remote model translation"); + this.checkBoxAbstractRemoteMode.UseVisualStyleBackColor = true; + // // Advanced // 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(402, 177); + this.ClientSize = new System.Drawing.Size(398, 167); + this.Controls.Add(this.checkBoxAbstractRemoteMode); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Controls.Add(this.groupBoxMode); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(418, 213); + this.MinimumSize = new System.Drawing.Size(406, 194); this.Name = "Advanced"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "IR Server - Advanced Configuration"; this.groupBoxMode.ResumeLayout(false); this.groupBoxMode.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -176,5 +192,6 @@ private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.ToolTip toolTips; + private System.Windows.Forms.CheckBox checkBoxAbstractRemoteMode; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -17,6 +17,11 @@ #region Properties + public bool AbstractRemoteMode + { + get { return checkBoxAbstractRemoteMode.Checked; } + set { checkBoxAbstractRemoteMode.Checked = value; } + } public IRServerMode Mode { get Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Data; using System.Drawing; +using System.IO; using System.Runtime.InteropServices; using System.Security; using System.Text; @@ -18,10 +19,21 @@ partial class Config : Form { + #region Constants + + const int ColIcon = 0; + const int ColName = 1; + const int ColReceive = 2; + const int ColTransmit = 3; + const int ColConfigure = 4; + + #endregion Constants + #region Variables PluginBase[] _transceivers; + bool _abstractRemoteMode; IRServerMode _mode = IRServerMode.ServerMode; string _hostComputer = String.Empty; @@ -29,6 +41,11 @@ #region Properties + public bool AbstractRemoteMode + { + get { return _abstractRemoteMode; } + set { _abstractRemoteMode = value; } + } public IRServerMode Mode { get { return _mode; } @@ -122,13 +139,9 @@ // Add transceivers to list ... _transceivers = Program.AvailablePlugins(); if (_transceivers == null || _transceivers.Length == 0) - { MessageBox.Show(this, "No IR Server Plugins found!", "IR Server Configuration", MessageBoxButtons.OK, MessageBoxIcon.Error); - } else - { CreateGrid(); - } try { @@ -147,33 +160,28 @@ void CreateGrid() { int row = 0; + gridPlugins.Rows.Clear(); + gridPlugins.Columns.SetCount(5); - gridPlugins.Columns.SetCount(4); - + // Setup Column Headers gridPlugins.Rows.Insert(row); - SourceGrid.Cells.ColumnHeader headerCell; - - headerCell = new SourceGrid.Cells.ColumnHeader("Name"); - gridPlugins[row, 0] = headerCell; - - headerCell = new SourceGrid.Cells.ColumnHeader("Receive"); - gridPlugins[row, 1] = headerCell; - - headerCell = new SourceGrid.Cells.ColumnHeader("Transmit"); - gridPlugins[row, 2] = headerCell; - - headerCell = new SourceGrid.Cells.ColumnHeader("Configure"); - gridPlugins[row, 3] = headerCell; - + gridPlugins[row, ColIcon] = new SourceGrid.Cells.ColumnHeader("*"); + gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); + gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); + gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); + gridPlugins[row, ColConfigure] = new SourceGrid.Cells.ColumnHeader("Configure"); gridPlugins.FixedRows = 1; - row++; - foreach (PluginBase transceiver in _transceivers) { - gridPlugins.Rows.Insert(row); + gridPlugins.Rows.Insert(++row); + gridPlugins.Rows[row].Tag = transceiver; + // TODO: Icon Cell + gridPlugins[row, ColIcon] = new SourceGrid.Cells.Cell(); + + // Name Cell SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name); SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents(); @@ -181,23 +189,21 @@ nameCell.AddController(nameCellController); nameCell.AddController(new SourceGrid.Cells.Controllers.ToolTipText()); - nameCell.ToolTipText = string.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); + nameCell.ToolTipText = String.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); - gridPlugins[row, 0] = nameCell; + gridPlugins[row, ColName] = nameCell; + // Receive Cell if (transceiver is IRemoteReceiver || transceiver is IMouseReceiver || transceiver is IKeyboardReceiver) { - SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); - - //SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents(); - //checkboxcontroller.ValueChanged += new EventHandler(ReceiveChanged); - //checkbox.Controller.AddController(checkboxcontroller); - - gridPlugins[row, 1] = checkbox; + gridPlugins[row, ColReceive] = new SourceGrid.Cells.CheckBox(); } else - gridPlugins[row, 1] = new SourceGrid.Cells.Cell(); + { + gridPlugins[row, ColReceive] = new SourceGrid.Cells.Cell(); + } + // Transmit Cell if (transceiver is ITransmitIR) { SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); @@ -206,11 +212,14 @@ checkboxcontroller.ValueChanged += new EventHandler(TransmitChanged); checkbox.Controller.AddController(checkboxcontroller); - gridPlugins[row, 2] = checkbox; + gridPlugins[row, ColTransmit] = checkbox; } else - gridPlugins[row, 2] = new SourceGrid.Cells.Cell(); + { + gridPlugins[row, ColTransmit] = new SourceGrid.Cells.Cell(); + } + // Configure Cell if (transceiver is IConfigure) { SourceGrid.Cells.Button button = new SourceGrid.Cells.Button("Configure"); @@ -219,19 +228,20 @@ buttonClickEvent.Executed += new EventHandler(buttonClickEvent_Executed); button.Controller.AddController(buttonClickEvent); - gridPlugins[row, 3] = button; + gridPlugins[row, ColConfigure] = button; } else - gridPlugins[row, 3] = new SourceGrid.Cells.Cell(); - - row++; + { + gridPlugins[row, ColConfigure] = new SourceGrid.Cells.Cell(); + } } - gridPlugins.Columns[0].AutoSizeMode = SourceGrid.AutoSizeMode.Default; - gridPlugins.Columns[1].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.Columns[2].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.Columns[3].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.AutoStretchColumnsToFitWidth = true; + gridPlugins.Columns[ColIcon].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColName].AutoSizeMode = SourceGrid.AutoSizeMode.Default; + gridPlugins.Columns[ColReceive].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColTransmit].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColConfigure].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.AutoStretchColumnsToFitWidth = true; gridPlugins.AutoSizeCells(); } @@ -265,31 +275,10 @@ SourceGrid.CellContext context = (SourceGrid.CellContext)sender; SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; - string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; - - foreach (PluginBase transceiver in _transceivers) - if (transceiver.Name.Equals(plugin, StringComparison.OrdinalIgnoreCase)) - (transceiver as IConfigure).Configure(this); + IConfigure plugin = cell.Row.Tag as IConfigure; + if (plugin != null) + plugin.Configure(this); } - /* - private void ReceiveChanged(object sender, EventArgs e) - { - SourceGrid.CellContext context = (SourceGrid.CellContext)sender; - SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell; - - if (!cell.Checked) - return; - - string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; - - for (int row = 1; row < gridPlugins.RowsCount; row++) - { - SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; - if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.OrdinalIgnoreCase)) - checkBox.Checked = false; - } - } - */ private void TransmitChanged(object sender, EventArgs e) { SourceGrid.CellContext context = (SourceGrid.CellContext)sender; @@ -298,12 +287,13 @@ if (!cell.Checked) return; - string plugin = gridPlugins[cell.Row.Index, 0].DisplayText; + PluginBase plugin = cell.Row.Tag as PluginBase; for (int row = 1; row < gridPlugins.RowsCount; row++) { - SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; - if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.OrdinalIgnoreCase)) + SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; + + if (checkBox != null && checkBox.Checked && !gridPlugins[row, ColName].DisplayText.Equals(plugin.Name, StringComparison.OrdinalIgnoreCase)) checkBox.Checked = false; } } @@ -312,11 +302,11 @@ SourceGrid.CellContext context = (SourceGrid.CellContext)sender; SourceGrid.Cells.Cell cell = (SourceGrid.Cells.Cell)context.Cell; - SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, 1] as SourceGrid.Cells.CheckBox; + SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, ColReceive] as SourceGrid.Cells.CheckBox; if (checkBoxReceive != null) checkBoxReceive.Checked = true; - SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, 2] as SourceGrid.Cells.CheckBox; + SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, ColTransmit] as SourceGrid.Cells.CheckBox; if (checkBoxTransmit != null) checkBoxTransmit.Checked = true; } @@ -325,8 +315,8 @@ { try { - string helpFile = System.IO.Path.Combine(SystemRegistry.GetInstallFolder(), "IR Server Suite.chm"); - Help.ShowHelp(this, helpFile, HelpNavigator.Topic, "IR Server\\index.html"); + string file = Path.Combine(SystemRegistry.GetInstallFolder(), "IR Server Suite.chm"); + Help.ShowHelp(this, file, HelpNavigator.Topic, "IR Server\\index.html"); } catch (Exception ex) { @@ -337,14 +327,16 @@ private void buttonAdvanced_Click(object sender, EventArgs e) { Advanced advanced = new Advanced(); - - advanced.Mode = _mode; - advanced.HostComputer = _hostComputer; + advanced.AbstractRemoteMode = _abstractRemoteMode; + advanced.Mode = _mode; + advanced.HostComputer = _hostComputer; + if (advanced.ShowDialog(this) == DialogResult.OK) { - _mode = advanced.Mode; - _hostComputer = advanced.HostComputer; + _abstractRemoteMode = advanced.AbstractRemoteMode; + _mode = advanced.Mode; + _hostComputer = advanced.HostComputer; } } @@ -355,19 +347,17 @@ SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - string name = gridPlugins[row, 0].DisplayText; - - PluginBase plugin = Program.GetPlugin(name); + PluginBase plugin = gridPlugins.Rows[row].Tag as PluginBase; bool detected = plugin.Detect(); // Receive - checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; if (checkBox != null) checkBox.Checked = detected; // Transmit - checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; if (checkBox != null) checkBox.Checked = detected; } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.Designer.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.Designer.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -37,6 +37,7 @@ // labelStatus // this.labelStatus.Dock = System.Windows.Forms.DockStyle.Fill; + this.labelStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelStatus.Location = new System.Drawing.Point(0, 0); this.labelStatus.Name = "labelStatus"; this.labelStatus.Size = new System.Drawing.Size(288, 57); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -3,6 +3,7 @@ using System.Data; using System.Drawing; using System.Text; +using System.Threading; using System.Windows.Forms; using IrssComms; @@ -48,7 +49,8 @@ private void GetKeyCodeForm_Load(object sender, EventArgs e) { - labelStatus.Text = "Press the remote button to map"; + labelStatus.Text = "Press the remote button you want to map"; + labelStatus.ForeColor = Color.Blue; _keyCodeSet = new DelegateKeyCodeSet(KeyCodeSet); @@ -68,13 +70,6 @@ string keyCode = Encoding.ASCII.GetString(data, 8 + deviceNameSize, keyCodeSize); _keyCode = keyCode; - ///* - if (!deviceName.Equals("Abstract", StringComparison.OrdinalIgnoreCase)) - { - _keyCode = String.Format("{0} ({1})", deviceName, keyCode); - // TODO: REMOVE! - return; - }//*/ this.Invoke(_keyCodeSet); } @@ -83,15 +78,27 @@ void KeyCodeSet() { timer.Stop(); - Program.HandleMessage -= new ClientMessageSink(MessageReceiver); + labelStatus.Text = String.Format("Received: {0}", _keyCode); + labelStatus.ForeColor = Color.Green; + labelStatus.Update(); + + Thread.Sleep(1000); this.Close(); } private void timer_Tick(object sender, EventArgs e) { - KeyCodeSet(); + timer.Stop(); + Program.HandleMessage -= new ClientMessageSink(MessageReceiver); + + labelStatus.Text = "Timed out"; + labelStatus.ForeColor = Color.Red; + labelStatus.Update(); + + Thread.Sleep(2000); + this.Close(); } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -531,7 +531,7 @@ if (map.ShowDialog(this) == DialogResult.OK) { - if (existing == null) + if (existing == null) // Create new mapping { listViewButtons.Items.Add( new ListViewItem( @@ -540,7 +540,7 @@ currentMappings.Add(new ButtonMapping(map.KeyCode, map.Description, map.Command)); } - else + else // Replace existing mapping { for (int index = 0; index < listViewButtons.Items.Count; index++) { Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.Designer.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.Designer.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -30,16 +30,14 @@ private void InitializeComponent() { this.buttonDone = new System.Windows.Forms.Button(); - this.labelLearned = new System.Windows.Forms.Label(); this.buttonLearn = new System.Windows.Forms.Button(); this.labelName = new System.Windows.Forms.Label(); this.textBoxName = new System.Windows.Forms.TextBox(); this.buttonTest = new System.Windows.Forms.Button(); - this.groupBoxStatus = new System.Windows.Forms.GroupBox(); this.comboBoxPort = new System.Windows.Forms.ComboBox(); this.labelPort = new System.Windows.Forms.Label(); this.groupBoxTest = new System.Windows.Forms.GroupBox(); - this.groupBoxStatus.SuspendLayout(); + this.labelStatus = new System.Windows.Forms.Label(); this.groupBoxTest.SuspendLayout(); this.SuspendLayout(); // @@ -54,20 +52,6 @@ this.buttonDone.UseVisualStyleBackColor = true; this.buttonDone.Click += new System.EventHandler(this.buttonDone_Click); // - // labelLearned - // - this.labelLearned.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.labelLearned.BackColor = System.Drawing.Color.WhiteSmoke; - this.labelLearned.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.labelLearned.Location = new System.Drawing.Point(8, 16); - this.labelLearned.Name = "labelLearned"; - this.labelLearned.Size = new System.Drawing.Size(248, 24); - this.labelLearned.TabIndex = 0; - this.labelLearned.Text = "Status"; - this.labelLearned.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // buttonLearn // this.buttonLearn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -100,7 +84,7 @@ // buttonTest // this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonTest.Enabled = false; + this.buttonTest.Enabled = true; this.buttonTest.Location = new System.Drawing.Point(200, 16); this.buttonTest.Name = "buttonTest"; this.buttonTest.Size = new System.Drawing.Size(56, 24); @@ -109,19 +93,6 @@ this.buttonTest.UseVisualStyleBackColor = true; this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); // - // groupBoxStatus - // - this.groupBoxStatus.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.groupBoxStatus.Controls.Add(this.labelLearned); - this.groupBoxStatus.Location = new System.Drawing.Point(8, 40); - this.groupBoxStatus.Name = "groupBoxStatus"; - this.groupBoxStatus.Size = new System.Drawing.Size(264, 48); - this.groupBoxStatus.TabIndex = 2; - this.groupBoxStatus.TabStop = false; - this.groupBoxStatus.Text = "Status"; - // // comboBoxPort // this.comboBoxPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -149,22 +120,35 @@ this.groupBoxTest.Controls.Add(this.comboBoxPort); this.groupBoxTest.Controls.Add(this.buttonTest); this.groupBoxTest.Controls.Add(this.labelPort); - this.groupBoxTest.Location = new System.Drawing.Point(8, 96); + this.groupBoxTest.Location = new System.Drawing.Point(8, 40); this.groupBoxTest.Name = "groupBoxTest"; this.groupBoxTest.Size = new System.Drawing.Size(264, 48); this.groupBoxTest.TabIndex = 3; this.groupBoxTest.TabStop = false; this.groupBoxTest.Text = "Test"; // + // labelStatus + // + this.labelStatus.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.labelStatus.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.labelStatus.Location = new System.Drawing.Point(8, 96); + this.labelStatus.Name = "labelStatus"; + this.labelStatus.Size = new System.Drawing.Size(264, 48); + this.labelStatus.TabIndex = 6; + this.labelStatus.Text = "Status"; + this.labelStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // LearnIR // this.AcceptButton = this.buttonDone; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(280, 185); + this.Controls.Add(this.labelStatus); this.Controls.Add(this.groupBoxTest); this.Controls.Add(this.buttonDone); - this.Controls.Add(this.groupBoxStatus); this.Controls.Add(this.buttonLearn); this.Controls.Add(this.labelName); this.Controls.Add(this.textBoxName); @@ -176,7 +160,6 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Learn IR Command"; - this.groupBoxStatus.ResumeLayout(false); this.groupBoxTest.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -186,15 +169,14 @@ #endregion private System.Windows.Forms.Button buttonDone; - private System.Windows.Forms.Label labelLearned; private System.Windows.Forms.Button buttonLearn; private System.Windows.Forms.Label labelName; private System.Windows.Forms.TextBox textBoxName; private System.Windows.Forms.Button buttonTest; - private System.Windows.Forms.GroupBox groupBoxStatus; private System.Windows.Forms.ComboBox comboBoxPort; private System.Windows.Forms.Label labelPort; private System.Windows.Forms.GroupBox groupBoxTest; + private System.Windows.Forms.Label labelStatus; } } Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -20,7 +20,7 @@ LearnIrDelegate _learnIrDelegate; BlastIrDelegate _blastIrDelegate; - bool _resetTextBoxNameEnabled; + bool _isNewCode; #endregion Variables @@ -52,11 +52,11 @@ comboBoxPort.Items.AddRange(ports); comboBoxPort.SelectedIndex = 0; - labelLearned.Text = "Not yet learned"; - buttonTest.Enabled = false; + labelStatus.Text = "Nothing learned yet"; + groupBoxTest.Enabled = false; textBoxName.Text = "New"; textBoxName.Enabled = true; - _resetTextBoxNameEnabled = true; + _isNewCode = true; } /// <summary> @@ -72,11 +72,11 @@ if (String.IsNullOrEmpty(existingCodeName)) throw new ArgumentNullException("existingCodeName"); - labelLearned.Text = "Not yet re-learned"; - buttonTest.Enabled = true; + labelStatus.Text = "IR Command is unchanged"; + groupBoxTest.Enabled = true; textBoxName.Text = existingCodeName; textBoxName.Enabled = false; - _resetTextBoxNameEnabled = false; + _isNewCode = false; } #endregion Constructor @@ -90,20 +90,20 @@ /// <param name="success">Success status.</param> public void LearnStatus(string status, bool success) { - if (labelLearned.InvokeRequired) + if (labelStatus.InvokeRequired) { this.Invoke(new LearnStatusDelegate(LearnStatus), new object[] { status, success }); } else { - labelLearned.Text = status; - labelLearned.ForeColor = success ? Color.Green : Color.Red; - labelLearned.Update(); + labelStatus.Text = status; + labelStatus.ForeColor = success ? Color.Green : Color.Red; + labelStatus.Update(); - textBoxName.Enabled = _resetTextBoxNameEnabled; - buttonLearn.Enabled = true; - buttonTest.Enabled = success; - buttonDone.Enabled = true; + textBoxName.Enabled = _isNewCode; + buttonLearn.Enabled = true; + groupBoxTest.Enabled = success || !_isNewCode; + buttonDone.Enabled = true; } } @@ -127,28 +127,27 @@ return; } - textBoxName.Enabled = false; - buttonLearn.Enabled = false; - buttonTest.Enabled = false; - buttonDone.Enabled = false; + textBoxName.Enabled = false; + buttonLearn.Enabled = false; + groupBoxTest.Enabled = false; + buttonDone.Enabled = false; string fileName = Path.Combine(Common.FolderIRCommands, name + Common.FileExtensionIR); - if (_learnIrDelegate(fileName)) { - labelLearned.Text = "Press button to learn now"; - labelLearned.ForeColor = Color.Blue; - labelLearned.Update(); + labelStatus.Text = "Hold your remote close to the receiver and tap the button to learn"; + labelStatus.ForeColor = Color.Blue; + labelStatus.Update(); } else { - labelLearned.Text = "Failed to learn IR"; - labelLearned.ForeColor = Color.Red; + labelStatus.Text = "Failed to learn IR"; + labelStatus.ForeColor = Color.Red; - textBoxName.Enabled = _resetTextBoxNameEnabled; - buttonLearn.Enabled = true; - buttonTest.Enabled = false; - buttonDone.Enabled = true; + textBoxName.Enabled = _isNewCode; + buttonLearn.Enabled = true; + groupBoxTest.Enabled = !_isNewCode; + buttonDone.Enabled = true; } } Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-04 21:02:55 UTC (rev 1426) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-05 06:14:54 UTC (rev 1427) @@ -59,7 +59,6 @@ static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "Input Service\\Input Service.xml"); static readonly string AbstractRemoteMapFolder = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps"); - static readonly string AbstractRemoteSchemaFile = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps\\RemoteTable.xsd"); #endregion Constants Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs 2008... [truncated message content] |
From: <an...@us...> - 2008-03-05 06:31:40
|
Revision: 1428 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1428&view=rev Author: and-81 Date: 2008-03-04 22:31:38 -0800 (Tue, 04 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Documentation/Common/macro_editor.html trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhc trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhp Added Paths: ----------- trunk/plugins/IR Server Suite/Documentation/abstract_remote_model.html Removed Paths: ------------- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstract Remote Model - v0.1.doc Deleted: trunk/plugins/IR Server Suite/Applications/Abstractor/Abstract Remote Model - v0.1.doc =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Documentation/Common/macro_editor.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/Common/macro_editor.html 2008-03-05 06:14:54 UTC (rev 1427) +++ trunk/plugins/IR Server Suite/Documentation/Common/macro_editor.html 2008-03-05 06:31:38 UTC (rev 1428) @@ -21,6 +21,7 @@ </UL> </P> +<!-- <H3>Using Variables and conditional statements<BR><HR COLOR="RED"></H2> <P> Macro's at present have four commands for controlling their execution, making them more than a simple linear series of events to perform. Using the following commands users can generate complicated scripts to make their macros more powerful. Over time I will introduce new macro commands to improve on the current four.<BR> @@ -87,6 +88,7 @@ I will post back a few example macros when I release the next version, I'm not at home right now so I can't attach my first example (a toggle macro) until later.<BR> <BR> All feedback welcome.</P> +--> </BODY> </HTML> Modified: trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhc =================================================================== --- trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhc 2008-03-05 06:14:54 UTC (rev 1427) +++ trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhc 2008-03-05 06:31:38 UTC (rev 1428) @@ -94,6 +94,10 @@ <param name="Local" value="ehome_driver.html"> </OBJECT> <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Abstract Remote Model"> + <param name="Local" value="abstract_remote_model.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> <param name="Name" value="Troubleshooting"> <param name="Local" value="troubleshooting.html"> </OBJECT> Modified: trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhp =================================================================== --- trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhp 2008-03-05 06:14:54 UTC (rev 1427) +++ trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhp 2008-03-05 06:31:38 UTC (rev 1428) @@ -38,6 +38,7 @@ ehome_driver.html legal.html troubleshooting.html +abstract_remote_model.html [INFOTYPES] Added: trunk/plugins/IR Server Suite/Documentation/abstract_remote_model.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/abstract_remote_model.html (rev 0) +++ trunk/plugins/IR Server Suite/Documentation/abstract_remote_model.html 2008-03-05 06:31:38 UTC (rev 1428) @@ -0,0 +1,100 @@ +<HTML> +<HEAD><TITLE>Abstract Remote Model</TITLE></HEAD> +<BODY> + +<H2>Abstract Remote Model<BR><HR COLOR="RED"></H2> + +<P>The biggest problem with PC remote control applications is the configuration process. They generally fall into one of two categories. The first category is the \x93easy to setup but inflexible\x94 category, and the second is the \x93difficult to setup but highly flexible\x94 category.</P> + +<P><B>Case in point: ByRemote HIP vs Promixis Girder.</B></P> + +<P>HIP is easy to setup without any prior knowledge, but HIP is not as feature rich or flexible as Girder. Don't get me wrong here, it's a fantastic program which I highly recommend, but it's not <I>as</I> feature rich as Girder.</P> + +<P>Girder on the other hand is very difficult to setup <I>compared to HIP</I>, it has a steep learning curve, but is feature rich and flexible.</P> + +<P>This document does not seek to make a value judgement on either application. Both have their advantages and disadvantages.</P> + +<P>One of the goals in software development is to produce software that "just works". Software that is easy to use but also powerful enough to be adapted different situations.</P> + +<P>For PC Remote Control software one solution to the traditional trade-off between usability and flexibility is the subject of this document, the Abstract Remote Model.</P> + +<P>By agreeing on the most common remote buttons and including a collection of mappings to make all the supported remotes fit the common model we can provide a default configuration that will work on all supported remotes with no setup required. Default configurations would be supplied for a large number of common PC applications, as well as general OS navigation and use.</P> + +<P>The drawback with other simplified systems of this nature is that you lose the flexibility to define different buttons and functions outside the simplified model, but with the Abstract Remote Model proposed any remote button that is not mapped onto the abstract model will be passed on in it\x92s raw form, thereby enabling the user to customize beyond the default configuration.</P> + +<P>What follows is the Abstract Remote Model button list as of Version 0.1 of the Abstract Remote Model.</P> + +<TABLE> +<TR><TD>Abstract Button Name</TD><TD>Brief description</TD><TD>Explanation</TD></TR> +<TR><TD>Up</TD><TD>Up Arrow</TD><TD>A feature of almost all PC remote controls, the arrow buttons are generally used to control the on screen cursor or item selection.</TD></TR> +<TR><TD>Down</TD><TD>Down Arrow</TD><TD> +<TR><TD>Left</TD><TD>Left Arrow</TD><TD> +<TR><TD>Right</TD><TD>Right Arrow</TD><TD> +<TR><TD>OK</TD><TD>OK / Select</TD><TD>Used to make a selection.</TD></TR> +<TR><TD>VolumeUp</TD><TD>Increase Volume</TD><TD>Increase the system or application volume.</TD></TR> +<TR><TD>VolumeDown</TD><TD>Decrease Volume</TD><TD>Decrease the system or application volume.</TD></TR> +<TR><TD>ChannelUp</TD><TD>Channel Up</TD><TD>In TV systems this button is used to increment the channel.</TD></TR> +<TR><TD>ChannelDown</TD><TD>Channel Down</TD><TD>In TV systems this button is used to decrement the channel.</TD></TR> +<TR><TD>Start</TD><TD>Start / Home / Go</TD><TD>This button may appear under many labels, in MCE convention it is referred to as the Start button and is used to launch a common application or while in that application it is also used to return to the main menu or home screen.</TD></TR> +<TR><TD>Back</TD><TD>Back</TD><TD>Often mapped as the keyboard Escape key, this buttons most common function is to leave a menu or abort an operation or selection.</TD></TR> +<TR><TD>Info</TD><TD>Info / More</TD><TD> +<TR><TD>Mute</TD><TD>Mute Volume</TD><TD>Mute either the system or application volume.</TD></TR> +<TR><TD>Number0</TD><TD>0</TD><TD>Numbers from 0 through to 9 are used as either simple numerical text input, as channel number entry, or as an \x93sms-style\x94 alpha-numeric text entry system.</TD></TR> +<TR><TD>Number1</TD><TD>1</TD><TD> +<TR><TD>Number2</TD><TD>2</TD><TD> +<TR><TD>Number3</TD><TD>3</TD><TD> +<TR><TD>Number4</TD><TD>4</TD><TD> +<TR><TD>Number5</TD><TD>5</TD><TD> +<TR><TD>Number6</TD><TD>6</TD><TD> +<TR><TD>Number7</TD><TD>7</TD><TD> +<TR><TD>Number8</TD><TD>8</TD><TD> +<TR><TD>Number9</TD><TD>9</TD><TD> +<TR><TD>Play</TD><TD>Play</TD><TD>Used to commence playback.</TD></TR> +<TR><TD>Pause</TD><TD>Pause</TD><TD>Used to pause playback.</TD></TR> +<TR><TD>PlayPause</TD><TD>Play / Pause</TD><TD>Many remotes will combine play and the pause functions into one button that pauses when playback is already running and commences playback when it is not. +<TR><TD>Stop</TD><TD>Stop</TD><TD>Stop playback.</TD></TR> +<TR><TD>FastForward</TD><TD>Fast Forward</TD><TD>Increase the playback rate.</TD></TR> +<TR><TD>Rewind</TD><TD>Rewind</TD><TD>Reverse the playback and increase the rate.</TD></TR> +<TR><TD>Record</TD><TD>Record</TD><TD>Record.</TD></TR> +<TR><TD>NextChapter</TD><TD>Chapter +</TD><TD>Skip to the next chapter or item in a playlist, can also be used as a Page Up or Down.</TD></TR> +<TR><TD>PreviousChapter</TD><TD>Chapter -</TD><TD>Skip back to the previous chapter or item in a playlist, can also be used as a Page Up or Down.</TD></TR> +<TR><TD>Power</TD><TD>Power (Software)</TD><TD>Power button. For this purpose we will assume it refers to the running software.</TD></TR> +<TR><TD>Power2</TD><TD>Power (PC)</TD><TD>Second Power button. For this purpose we will assume it always refers to the PCs power state.</TD></TR> +<TR><TD>Power3</TD><TD>Power (Other)</TD><TD>Third Power button. User definable. Remove?</TD></TR> +<TR><TD>Teletext</TD><TD>Teletext</TD><TD>Turns Teletext (or can be subtitles) on or off.</TD></TR> +<TR><TD>Red</TD><TD>Red Teletext Button</TD><TD>When used in a teletext system these buttons each serve a purpose, however in systems or situations that do not have teletext these buttons can be given user-defined functions.</TD></TR> +<TR><TD>Green</TD><TD>Green Teletext Button</TD><TD> +<TR><TD>Yellow</TD><TD>Yellow Teletext Button</TD><TD> +<TR><TD>Blue</TD><TD>Blue Teletext Button</TD><TD> +<TR><TD>Subtitles</TD><TD>Subtitles</TD><TD>Toggle or Cycle subtitles.</TD></TR> +<TR><TD>Menu</TD><TD>Menu</TD><TD>Go to Menu (often DVD Menu).</TD></TR> +<TR><TD>Clear</TD><TD>Clear / Delete</TD><TD>Clear a text entry or delete a single character (backspace).</TD></TR> +<TR><TD>Enter</TD><TD>Enter</TD><TD>Simulates a keyboard Enter button press, or is used to add a carriage return to a block of text, where as pressing OK/Select would finish the text entry mode.</TD></TR> +<TR><TD>Hash</TD><TD>#</TD><TD>Used for special functions in alpha-numeric text entry modes. Or simply as a special character.</TD></TR> +<TR><TD>Star</TD><TD>*</TD><TD> +<TR><TD>TaskSwap</TD><TD>Task Swap / Alt-Tab</TD><TD>Used to switch between running applications on the PC.</TD></TR> +<TR><TD>Fullscreen</TD><TD>Toggle Fullscreen</TD><TD>Toggle video playback or window size between fullscreen and windowed.</TD></TR> +<TR><TD>AspectRatio</TD><TD>Toggle Aspect Ratio</TD><TD>Cycle the video aspect ratio between available values.</TD></TR> +<TR><TD>Setup</TD><TD>Setup</TD><TD>Setup. General configuration button.</TD></TR> +<TR><TD>Music</TD><TD>Music</TD><TD>Go to the Music section of a program, or used to launch a music application.</TD></TR> +<TR><TD>Pictures</TD><TD>Pictures</TD><TD>Go to the Pictures section of a program, or used to launch a picture viewer application.</TD></TR> +<TR><TD>Videos</TD><TD>Videos</TD><TD>Go to the Videos section of a program, or used to launch a video player application.</TD></TR> +<TR><TD>DVD</TD><TD>DVD</TD><TD>Go to the DVD section of a program, or used to launch a DVD player application.</TD></TR> +<TR><TD>TV</TD><TD>Television</TD><TD>Go to the Television section of a program, or used to launch a television application.</TD></TR> +<TR><TD>Guide</TD><TD>Guide / EPG</TD><TD>Go to the Guide or EPG section of a program.</TD></TR> +<TR><TD>LiveTV</TD><TD>Live TV</TD><TD>Go to the Live TV section of a program, or used to launch a live TV application.</TD></TR> +<TR><TD>Radio</TD><TD>Radio</TD><TD>Go to the Radio section of a program, or used to launch a radio application.</TD></TR> +<TR><TD>Print</TD><TD>Print</TD><TD>Print the current view/document.</TD></TR> +<TR><TD>Snapshot</TD><TD>Create Snapshot</TD><TD>Create an image snapshot of the current view.</TD></TR> +<TR><TD>Open</TD><TD>Open</TD><TD>Open a file/program.</TD></TR> +<TR><TD>Close</TD><TD>Close</TD><TD>Close a file/program.</TD></TR> +<TR><TD>Eject</TD><TD>Eject</TD><TD>Eject a CD/DVD.</TD></TR> +<TR><TD>ScrollUp</TD><TD>Scroll Up</TD><TD>Scroll the view up. Remove?</TD></TR> +<TR><TD>ScrollDown</TD><TD>Scroll Down</TD><TD>Scroll the view down. Remove?</TD></TR> +<TR><TD>PageUp</TD><TD>Page Up</TD><TD>Page Up. Remove?</TD></TR> +<TR><TD>PageDown</TD><TD>Page Down</TD><TD>Page Down. Remove?</TD></TR> + +</TABLE> + +</BODY> +</HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-05 07:18:17
|
Revision: 1429 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1429&view=rev Author: and-81 Date: 2008-03-04 23:18:13 -0800 (Tue, 04 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remotes.xml Added Paths: ----------- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Abstract Remote Model.xml trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE.xml Removed Paths: ------------- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (basic).xml trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (full).xml Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-05 07:18:13 UTC (rev 1429) @@ -184,6 +184,7 @@ IRServerInfo _irServerInfo = new IRServerInfo(); + //string[] _devices; string _selectedDevice; #endregion Variables @@ -204,6 +205,9 @@ DelegateSetDevices _setDevices; void SetDevices(string[] devices) { + // TODO: add code to automatically add devices to the list if they come from forwarded remote button presses. + //_devices = devices; + comboBoxDevice.Items.Clear(); comboBoxDevice.Items.AddRange(devices); comboBoxDevice.SelectedIndex = 0; Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-05 07:18:13 UTC (rev 1429) @@ -150,8 +150,18 @@ _tvBouquets = new DataTable(); _tvBouquets.ReadXml(DataFile); - string expression = String.Format("ChanNo = '{0}'", args[1]); + string expression = String.Format("Channel = '{0}'", args[1]); // Works on EnigmaV1, others unknown. + /* + string expression; + switch (_boxType) + { + case StbBoxType.EnigmaV1: expression = String.Format("Channel = '{0}'", args[1]); break; + case StbBoxType.EnigmaV2: expression = String.Format("Channel = '{0}'", args[1]); break; + default: expression = String.Format("Channel = '{0}'", args[1]); break; + } + */ + DataRow[] rows = _tvBouquets.Select(expression); if (rows.Length == 1) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-05 07:18:13 UTC (rev 1429) @@ -31,6 +31,10 @@ #region Properties + /// <summary> + /// Gets the key code received. + /// </summary> + /// <value>The key code.</value> public string KeyCode { get { return _keyCode; } @@ -69,7 +73,11 @@ int keyCodeSize = BitConverter.ToInt32(data, 4 + deviceNameSize); string keyCode = Encoding.ASCII.GetString(data, 8 + deviceNameSize, keyCodeSize); - _keyCode = keyCode; + // TODO: When Abstract Remote Model becomes on by default + //if (deviceName.Equals("Abstract", StringComparison.OrdinalIgnoreCase) + _keyCode = keyCode; + //else + // _keyCode = String.Format("{0} ({1})", deviceName, keyCode); this.Invoke(_keyCodeSet); } Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-05 07:18:13 UTC (rev 1429) @@ -43,6 +43,8 @@ <LI>General: Receiving device name is now sent along with remote button codes, this is in preparation for a major overhaul of the remote mapping system to facilitate automatic configuration for controlling your whole PC! This feature will not be completed until 1.0.4.3 or 1.0.5.0 but it will be very big if it comes together as planned.</LI> <LI>New Prorgam: Added Keyboard Input Relay, to enable mapping special (App Command) keyboard buttons (like Forward, Back, Play, Stop, Volume, etc...) as well as basic key combinations as if they are remote button presses.</LI> <LI>New Input Plugin: Direct Input. This allows the user to map game controllers (gamepads, joysticks, etc...) as remotes. First version is basic, next version will allow button combos and controlling the mouse with analog sticks.</LI> +<LI>General: Implemented first draft of Abstract Remote Model. This will be expanded on in Version 1.0.4.3 to provide a superior automatic configuration method for all Applications and Plugins.</LI> +<LI>MCE Transceiver: No longer sends those remote buttons that are being automatically handled, if automatic handling is disabled it will send the full set. This will prevent double presses from occuring. Note that this only effects the buttons that are automatically handled, the other buttons will continue to be sent regardless.</LI> </UL></P> <BR> Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs 2008-03-05 07:18:13 UTC (rev 1429) @@ -40,7 +40,10 @@ this.buttonOK = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); this.checkBoxAbstractRemoteMode = new System.Windows.Forms.CheckBox(); + this.buttonExclusions = new System.Windows.Forms.Button(); + this.groupBoxAbstractRemoteModel = new System.Windows.Forms.GroupBox(); this.groupBoxMode.SuspendLayout(); + this.groupBoxAbstractRemoteModel.SuspendLayout(); this.SuspendLayout(); // // groupBoxMode @@ -127,7 +130,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(328, 136); + this.buttonCancel.Location = new System.Drawing.Point(328, 208); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 3; @@ -138,7 +141,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(256, 136); + this.buttonOK.Location = new System.Drawing.Point(256, 208); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 2; @@ -148,24 +151,49 @@ // // checkBoxAbstractRemoteMode // - this.checkBoxAbstractRemoteMode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxAbstractRemoteMode.AutoSize = true; - this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(8, 136); + this.checkBoxAbstractRemoteMode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(16, 24); this.checkBoxAbstractRemoteMode.Name = "checkBoxAbstractRemoteMode"; - this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(159, 17); - this.checkBoxAbstractRemoteMode.TabIndex = 1; - this.checkBoxAbstractRemoteMode.Text = "Use Abstract Remote Model"; + this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(264, 24); + this.checkBoxAbstractRemoteMode.TabIndex = 0; + this.checkBoxAbstractRemoteMode.Text = "Use the Abstract Remote Model"; this.toolTips.SetToolTip(this.checkBoxAbstractRemoteMode, "Enable automatic abstract remote model translation"); this.checkBoxAbstractRemoteMode.UseVisualStyleBackColor = true; // + // buttonExclusions + // + this.buttonExclusions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonExclusions.Enabled = false; + this.buttonExclusions.Location = new System.Drawing.Point(296, 24); + this.buttonExclusions.Name = "buttonExclusions"; + this.buttonExclusions.Size = new System.Drawing.Size(80, 24); + this.buttonExclusions.TabIndex = 1; + this.buttonExclusions.Text = "Exclusions"; + this.toolTips.SetToolTip(this.buttonExclusions, "Configure Abstract Remote Model exclusions"); + this.buttonExclusions.UseVisualStyleBackColor = true; + // + // groupBoxAbstractRemoteModel + // + this.groupBoxAbstractRemoteModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxAbstractRemoteModel.Controls.Add(this.buttonExclusions); + this.groupBoxAbstractRemoteModel.Controls.Add(this.checkBoxAbstractRemoteMode); + this.groupBoxAbstractRemoteModel.Location = new System.Drawing.Point(8, 136); + this.groupBoxAbstractRemoteModel.Name = "groupBoxAbstractRemoteModel"; + this.groupBoxAbstractRemoteModel.Size = new System.Drawing.Size(384, 56); + this.groupBoxAbstractRemoteModel.TabIndex = 1; + this.groupBoxAbstractRemoteModel.TabStop = false; + this.groupBoxAbstractRemoteModel.Text = "Abstract Remote Model"; + // // Advanced // 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(400, 169); - this.Controls.Add(this.checkBoxAbstractRemoteMode); + this.ClientSize = new System.Drawing.Size(400, 241); + this.Controls.Add(this.groupBoxAbstractRemoteModel); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Controls.Add(this.groupBoxMode); @@ -173,14 +201,14 @@ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(406, 194); + this.MinimumSize = new System.Drawing.Size(406, 266); this.Name = "Advanced"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Input Service Configuration - Advanced"; this.groupBoxMode.ResumeLayout(false); this.groupBoxMode.PerformLayout(); + this.groupBoxAbstractRemoteModel.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } @@ -196,5 +224,7 @@ private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.ToolTip toolTips; private System.Windows.Forms.CheckBox checkBoxAbstractRemoteMode; + private System.Windows.Forms.Button buttonExclusions; + private System.Windows.Forms.GroupBox groupBoxAbstractRemoteModel; } } \ No newline at end of file Added: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Abstract Remote Model.xml =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Abstract Remote Model.xml (rev 0) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Abstract Remote Model.xml 2008-03-05 07:18:13 UTC (rev 1429) @@ -0,0 +1,167 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<remotes> + <remote name="Abstract Remote Model"> + <button name="PowerTV"> + <code value="Power" /> + </button> + <button name="Power2"> + <code value="Power2" /> + </button> + <button name="Stop"> + <code value="Stop" /> + </button> + <button name="Record"> + <code value="Record" /> + </button> + <button name="Pause"> + <code value="Pause" /> + </button> + <button name="Play"> + <code value="Play" /> + </button> + <button name="Rewind"> + <code value="Rewind" /> + </button> + <button name="Forward"> + <code value="FastForward" /> + </button> + <button name="Replay"> + <code value="PreviousChapter" /> + </button> + <button name="Skip"> + <code value="NextChapter" /> + </button> + <button name="Back"> + <code value="Back" /> + </button> + <button name="Info"> + <code value="Info" /> + </button> + <button name="Up"> + <code value="Up" /> + </button> + <button name="Left"> + <code value="Left" /> + </button> + <button name="Ok"> + <code value="Ok" /> + </button> + <button name="Right"> + <code value="Right" /> + </button> + <button name="Down"> + <code value="Down" /> + </button> + <button name="VolumeUp"> + <code value="VolumeUp" /> + </button> + <button name="VolumeDown"> + <code value="VolumeDown" /> + </button> + <button name="Start"> + <code value="Start" /> + </button> + <button name="ChannelUp"> + <code value="ChannelUp" /> + </button> + <button name="ChannelDown"> + <code value="ChannelDown" /> + </button> + <button name="Mute"> + <code value="Mute" /> + </button> + <button name="RecordedTV"> + <code value="RecordedTV" /> + </button> + <button name="Guide"> + <code value="Guide" /> + </button> + <button name="LiveTV"> + <code value="LiveTV" /> + </button> + <button name="DVDMenu"> + <code value="DVD" /> + </button> + <button name="NumPad1"> + <code value="Number1" /> + </button> + <button name="NumPad2"> + <code value="Number2" /> + </button> + <button name="NumPad3"> + <code value="Number3" /> + </button> + <button name="NumPad4"> + <code value="Number4" /> + </button> + <button name="NumPad5"> + <code value="Number5" /> + </button> + <button name="NumPad6"> + <code value="Number6" /> + </button> + <button name="NumPad7"> + <code value="Number7" /> + </button> + <button name="NumPad8"> + <code value="Number8" /> + </button> + <button name="NumPad9"> + <code value="Number9" /> + </button> + <button name="NumPad0"> + <code value="Number0" /> + </button> + <button name="Oem8"> + <code value="Star" /> + </button> + <button name="OemGate"> + <code value="Hash" /> + </button> + <button name="Clear"> + <code value="Clear" /> + </button> + <button name="Enter"> + <code value="Enter" /> + </button> + <button name="Teletext"> + <code value="Teletext" /> + </button> + <button name="Red"> + <code value="Red" /> + </button> + <button name="Green"> + <code value="Green" /> + </button> + <button name="Yellow"> + <code value="Yellow" /> + </button> + <button name="Blue"> + <code value="Blue" /> + </button> + <button name="MyMusic"> + <code value="Music" /> + </button> + <button name="MyPictures"> + <code value="Pictures" /> + </button> + <button name="MyRadio"> + <code value="Radio" /> + </button> + <button name="MyTV"> + <code value="TV" /> + </button> + <button name="MyVideos"> + <code value="Video" /> + </button> + <button name="Print"> + <code value="Print" /> + </button> + <button name="AspectRatio"> + <code value="AspectRatio" /> + </button> + <button name="Messenger"> + <code value="Messenger" /> + </button> + </remote> +</remotes> \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (basic).xml =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (basic).xml 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (basic).xml 2008-03-05 07:18:13 UTC (rev 1429) @@ -1,130 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<remotes> - <remote name="Microsoft MCE"> - <button name="PowerTV"> - <code value="31642" /> - </button> - <button name="Power2"> - <code value="31731" /> - </button> - <button name="Stop"> - <code value="31718" /> - </button> - <button name="Record"> - <code value="31720" /> - </button> - <button name="Pause"> - <code value="31719" /> - </button> - <button name="Play"> - <code value="31721" /> - </button> - <button name="Rewind"> - <code value="31722" /> - </button> - <button name="Forward"> - <code value="31723" /> - </button> - <button name="Replay"> - <code value="31716" /> - </button> - <button name="Skip"> - <code value="31717" /> - </button> - <button name="Back"> - <code value="31708" /> - </button> - <button name="Info"> - <code value="31728" /> - </button> - <button name="VolumeUp"> - <code value="31727" /> - </button> - <button name="VolumeDown"> - <code value="31726" /> - </button> - <button name="Start"> - <code value="31730" /> - </button> - <button name="ChannelUp"> - <code value="31725" /> - </button> - <button name="ChannelDown"> - <code value="31724" /> - </button> - <button name="Mute"> - <code value="31729" /> - </button> - <button name="RecordedTV"> - <code value="31671" /> - </button> - <button name="Guide"> - <code value="31705" /> - </button> - <button name="LiveTV"> - <code value="31706" /> - </button> - <button name="DVDMenu"> - <code value="31707" /> - </button> - <button name="Teletext"> - <code value="31653" /> - </button> - <button name="Red"> - <code value="31652" /> - </button> - <button name="Green"> - <code value="31651" /> - </button> - <button name="Yellow"> - <code value="31650" /> - </button> - <button name="Blue"> - <code value="31649" /> - </button> - <button name="MyMusic"> - <code value="31672" /> - </button> - <button name="MyPictures"> - <code value="31670" /> - </button> - <button name="MyRadio"> - <code value="31663" /> - </button> - <button name="MyTV"> - <code value="31673" /> - </button> - <button name="MyVideos"> - <code value="31669" /> - </button> - <button name="Print"> - <code value="31665" /> - </button> - <button name="AspectRatio"> - <code value="31704" /> - </button> - <button name="Messenger"> - <code value="31638" /> - </button> - <button name="Power1" /> - <button name="Up" /> - <button name="Left" /> - <button name="Ok" /> - <button name="Right" /> - <button name="Down" /> - <button name="NumPad1" /> - <button name="NumPad2" /> - <button name="NumPad3" /> - <button name="NumPad4" /> - <button name="NumPad5" /> - <button name="NumPad6" /> - <button name="NumPad7" /> - <button name="NumPad8" /> - <button name="NumPad9" /> - <button name="NumPad0" /> - <button name="Oem8" /> - <button name="OemGate" /> - <button name="Clear" /> - <button name="Enter" /> - </remote> -</remotes> \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (full).xml =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (full).xml 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE (full).xml 2008-03-05 07:18:13 UTC (rev 1429) @@ -1,168 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<remotes> - <remote name="Microsoft MCE (Full)"> - <button name="PowerTV"> - <code value="31642" /> - </button> - <button name="Power2"> - <code value="31731" /> - </button> - <button name="Stop"> - <code value="31718" /> - </button> - <button name="Record"> - <code value="31720" /> - </button> - <button name="Pause"> - <code value="31719" /> - </button> - <button name="Play"> - <code value="31721" /> - </button> - <button name="Rewind"> - <code value="31722" /> - </button> - <button name="Forward"> - <code value="31723" /> - </button> - <button name="Replay"> - <code value="31716" /> - </button> - <button name="Skip"> - <code value="31717" /> - </button> - <button name="Back"> - <code value="31708" /> - </button> - <button name="Info"> - <code value="31728" /> - </button> - <button name="Up"> - <code value="31713" /> - </button> - <button name="Left"> - <code value="31711" /> - </button> - <button name="Ok"> - <code value="31709" /> - </button> - <button name="Right"> - <code value="31710" /> - </button> - <button name="Down"> - <code value="31712" /> - </button> - <button name="VolumeUp"> - <code value="31727" /> - </button> - <button name="VolumeDown"> - <code value="31726" /> - </button> - <button name="Start"> - <code value="31730" /> - </button> - <button name="ChannelUp"> - <code value="31725" /> - </button> - <button name="ChannelDown"> - <code value="31724" /> - </button> - <button name="Mute"> - <code value="31729" /> - </button> - <button name="RecordedTV"> - <code value="31671" /> - </button> - <button name="Guide"> - <code value="31705" /> - </button> - <button name="LiveTV"> - <code value="31706" /> - </button> - <button name="DVDMenu"> - <code value="31707" /> - </button> - <button name="NumPad1"> - <code value="31742" /> - </button> - <button name="NumPad2"> - <code value="31741" /> - </button> - <button name="NumPad3"> - <code value="31740" /> - </button> - <button name="NumPad4"> - <code value="31739" /> - </button> - <button name="NumPad5"> - <code value="31738" /> - </button> - <button name="NumPad6"> - <code value="31737" /> - </button> - <button name="NumPad7"> - <code value="31736" /> - </button> - <button name="NumPad8"> - <code value="31735" /> - </button> - <button name="NumPad9"> - <code value="31734" /> - </button> - <button name="NumPad0"> - <code value="31743" /> - </button> - <button name="Oem8"> - <code value="31714" /> - </button> - <button name="OemGate"> - <code value="31715" /> - </button> - <button name="Clear"> - <code value="31733" /> - </button> - <button name="Enter"> - <code value="31732" /> - </button> - <button name="Teletext"> - <code value="31653" /> - </button> - <button name="Red"> - <code value="31652" /> - </button> - <button name="Green"> - <code value="31651" /> - </button> - <button name="Yellow"> - <code value="31650" /> - </button> - <button name="Blue"> - <code value="31649" /> - </button> - <button name="MyMusic"> - <code value="31672" /> - </button> - <button name="MyPictures"> - <code value="31670" /> - </button> - <button name="MyRadio"> - <code value="31663" /> - </button> - <button name="MyTV"> - <code value="31673" /> - </button> - <button name="MyVideos"> - <code value="31669" /> - </button> - <button name="Print"> - <code value="31665" /> - </button> - <button name="AspectRatio"> - <code value="31704" /> - </button> - <button name="Messenger"> - <code value="31638" /> - </button> - <button name="Power1" /> - </remote> -</remotes> \ No newline at end of file Added: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE.xml =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE.xml (rev 0) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remote Presets/Microsoft MCE.xml 2008-03-05 07:18:13 UTC (rev 1429) @@ -0,0 +1,168 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<remotes> + <remote name="Microsoft MCE"> + <button name="PowerTV"> + <code value="31642" /> + </button> + <button name="Power2"> + <code value="31731" /> + </button> + <button name="Stop"> + <code value="31718" /> + </button> + <button name="Record"> + <code value="31720" /> + </button> + <button name="Pause"> + <code value="31719" /> + </button> + <button name="Play"> + <code value="31721" /> + </button> + <button name="Rewind"> + <code value="31722" /> + </button> + <button name="Forward"> + <code value="31723" /> + </button> + <button name="Replay"> + <code value="31716" /> + </button> + <button name="Skip"> + <code value="31717" /> + </button> + <button name="Back"> + <code value="31708" /> + </button> + <button name="Info"> + <code value="31728" /> + </button> + <button name="Up"> + <code value="31713" /> + </button> + <button name="Left"> + <code value="31711" /> + </button> + <button name="Ok"> + <code value="31709" /> + </button> + <button name="Right"> + <code value="31710" /> + </button> + <button name="Down"> + <code value="31712" /> + </button> + <button name="VolumeUp"> + <code value="31727" /> + </button> + <button name="VolumeDown"> + <code value="31726" /> + </button> + <button name="Start"> + <code value="31730" /> + </button> + <button name="ChannelUp"> + <code value="31725" /> + </button> + <button name="ChannelDown"> + <code value="31724" /> + </button> + <button name="Mute"> + <code value="31729" /> + </button> + <button name="RecordedTV"> + <code value="31671" /> + </button> + <button name="Guide"> + <code value="31705" /> + </button> + <button name="LiveTV"> + <code value="31706" /> + </button> + <button name="DVDMenu"> + <code value="31707" /> + </button> + <button name="NumPad1"> + <code value="31742" /> + </button> + <button name="NumPad2"> + <code value="31741" /> + </button> + <button name="NumPad3"> + <code value="31740" /> + </button> + <button name="NumPad4"> + <code value="31739" /> + </button> + <button name="NumPad5"> + <code value="31738" /> + </button> + <button name="NumPad6"> + <code value="31737" /> + </button> + <button name="NumPad7"> + <code value="31736" /> + </button> + <button name="NumPad8"> + <code value="31735" /> + </button> + <button name="NumPad9"> + <code value="31734" /> + </button> + <button name="NumPad0"> + <code value="31743" /> + </button> + <button name="Oem8"> + <code value="31714" /> + </button> + <button name="OemGate"> + <code value="31715" /> + </button> + <button name="Clear"> + <code value="31733" /> + </button> + <button name="Enter"> + <code value="31732" /> + </button> + <button name="Teletext"> + <code value="31653" /> + </button> + <button name="Red"> + <code value="31652" /> + </button> + <button name="Green"> + <code value="31651" /> + </button> + <button name="Yellow"> + <code value="31650" /> + </button> + <button name="Blue"> + <code value="31649" /> + </button> + <button name="MyMusic"> + <code value="31672" /> + </button> + <button name="MyPictures"> + <code value="31670" /> + </button> + <button name="MyRadio"> + <code value="31663" /> + </button> + <button name="MyTV"> + <code value="31673" /> + </button> + <button name="MyVideos"> + <code value="31669" /> + </button> + <button name="Print"> + <code value="31665" /> + </button> + <button name="AspectRatio"> + <code value="31704" /> + </button> + <button name="Messenger"> + <code value="31638" /> + </button> + <button name="Power1" /> + </remote> +</remotes> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remotes.xml =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remotes.xml 2008-03-05 06:31:38 UTC (rev 1428) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/AppData/Remotes.xml 2008-03-05 07:18:13 UTC (rev 1429) @@ -37,6 +37,21 @@ <button name="Info"> <code value="31728" /> </button> + <button name="Up"> + <code value="31713" /> + </button> + <button name="Left"> + <code value="31711" /> + </button> + <button name="Ok"> + <code value="31709" /> + </button> + <button name="Right"> + <code value="31710" /> + </button> + <button name="Down"> + <code value="31712" /> + </button> <button name="VolumeUp"> <code value="31727" /> </button> @@ -67,6 +82,48 @@ <button name="DVDMenu"> <code value="31707" /> </button> + <button name="NumPad1"> + <code value="31742" /> + </button> + <button name="NumPad2"> + <code value="31741" /> + </button> + <button name="NumPad3"> + <code value="31740" /> + </button> + <button name="NumPad4"> + <code value="31739" /> + </button> + <button name="NumPad5"> + <code value="31738" /> + </button> + <button name="NumPad6"> + <code value="31737" /> + </button> + <button name="NumPad7"> + <code value="31736" /> + </button> + <button name="NumPad8"> + <code value="31735" /> + </button> + <button name="NumPad9"> + <code value="31734" /> + </button> + <button name="NumPad0"> + <code value="31743" /> + </button> + <button name="Oem8"> + <code value="31714" /> + </button> + <button name="OemGate"> + <code value="31715" /> + </button> + <button name="Clear"> + <code value="31733" /> + </button> + <button name="Enter"> + <code value="31732" /> + </button> <button name="Teletext"> <code value="31653" /> </button> @@ -107,24 +164,5 @@ <code value="31638" /> </button> <button name="Power1" /> - <button name="Up" /> - <button name="Left" /> - <button name="Ok" /> - <button name="Right" /> - <button name="Down" /> - <button name="NumPad1" /> - <button name="NumPad2" /> - <button name="NumPad3" /> - <button name="NumPad4" /> - <button name="NumPad5" /> - <button name="NumPad6" /> - <button name="NumPad7" /> - <button name="NumPad8" /> - <button name="NumPad9" /> - <button name="NumPad0" /> - <button name="Oem8" /> - <button name="OemGate" /> - <button name="Clear" /> - <button name="Enter" /> </remote> </remotes> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-08 10:05:07
|
Revision: 1436 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1436&view=rev Author: and-81 Date: 2008-03-08 02:05:03 -0800 (Sat, 08 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.resx trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Meedio.exe.xml trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/PVRX2.exe.xml trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputListener.cs trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.resx trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Graphics/Advanced.png Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/ trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Advanced.png trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Detect.png trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Help.png trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/ttBdaDrvApi_Dll.dll trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/FireFly/ trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/FireFly/FireFly.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Hauppauge/Hauppauge34.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Hauppauge/Hauppauge45.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Medion/ trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Medion/Medion.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Wii Remote/ trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Wii Remote/WiiRemote.xml Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-08 10:05:03 UTC (rev 1436) @@ -184,7 +184,7 @@ IRServerInfo _irServerInfo = new IRServerInfo(); - //string[] _devices; + string[] _devices; string _selectedDevice; #endregion Variables @@ -205,8 +205,7 @@ DelegateSetDevices _setDevices; void SetDevices(string[] devices) { - // TODO: add code to automatically add devices to the list if they come from forwarded remote button presses. - //_devices = devices; + _devices = devices; comboBoxDevice.Items.Clear(); comboBoxDevice.Items.AddRange(devices); @@ -315,7 +314,7 @@ string[] receivers = received.GetDataAsString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); - this.Invoke(_setDevices, new Object[] { receivers }); + this.Invoke(_setDevices, new object[] { receivers }); break; case MessageType.RemoteEvent: @@ -348,6 +347,23 @@ string text = String.Format("Remote Event \"{0}\", \"{1}\"", deviceName, keyCode); this.Invoke(_addStatusLine, text); + bool foundDevice = false; + foreach (string device in _devices) + { + if (device.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + { + foundDevice = true; + break; + } + } + + if (!foundDevice) + { + List<string> newDevices = new List<string>(_devices); + newDevices.Add(deviceName); + this.Invoke(_setDevices, new object[] { newDevices.ToArray() }); + } + // If this remote event matches the criteria then set it to an abstract button in the list view ... if (deviceName.Equals(_selectedDevice, StringComparison.OrdinalIgnoreCase)) { Modified: trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-08 10:05:03 UTC (rev 1436) @@ -40,6 +40,12 @@ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj"> + <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> + <Name>IrssUtils</Name> + </ProjectReference> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs 2008-03-08 10:05:03 UTC (rev 1436) @@ -1,6 +1,8 @@ using System; using System.Runtime.InteropServices; +using IrssUtils; + namespace HcwPvrTuner { @@ -62,6 +64,13 @@ Console.WriteLine("HCW PVR Tuner"); Console.WriteLine(); +#if DEBUG + IrssLog.LogLevel = IrssLog.Level.Debug; +#else + IrssLog.LogLevel = IrssLog.Level.Info; +#endif + IrssLog.Append("Dbox Tuner.log"); + // TODO: Add standard IRSS logging ... if (args.Length != 1) @@ -80,8 +89,7 @@ if (!int.TryParse(args[0], out channelNumber)) throw new ApplicationException(String.Format("Failed to convert command line parameter ({0}) to channel number", args[0])); - Console.WriteLine("Attempting to tune channel {0} ...", channelNumber); - Console.WriteLine(); + Info("Attempting to tune channel {0} ...", channelNumber); int returnValue = UIR_Open(0, 0); if (returnValue == 0) @@ -95,14 +103,12 @@ returnValue = UIR_GetConfig(-1, -1, ref config); if (returnValue == 0) { - Console.WriteLine("Device configuration ..."); - Console.WriteLine(); - Console.WriteLine("Device: {0} Vendor: {1}", config.d, config.e); - Console.WriteLine("Region: {0} Code Set: {1}", config.c, config.f); - Console.WriteLine("Digit Delay: {0} Minimum Digits: {1}", config.j, config.i); - Console.WriteLine("One Digit Delay: {0} Tune Delay: {1}", config.n, config.m); - Console.WriteLine("Need Enter: {0} Enter Delay: {1}", config.k, config.l); - Console.WriteLine(); + Info("Device configuration ..."); + Info("Device: {0} Vendor: {1}", config.d, config.e); + Info("Region: {0} Code Set: {1}", config.c, config.f); + Info("Digit Delay: {0} Minimum Digits: {1}", config.j, config.i); + Info("One Digit Delay: {0} Tune Delay: {1}", config.n, config.m); + Info("Need Enter: {0} Enter Delay: {1}", config.k, config.l); } else { @@ -115,12 +121,12 @@ } catch (ApplicationException ex) { - Console.WriteLine("Error: {0}", ex.Message); + Info("Error: {0}", ex.Message); return ReturnError; } catch (Exception ex) { - Console.WriteLine(ex.ToString()); + Info(ex.ToString()); return ReturnError; } finally @@ -129,10 +135,20 @@ UIR_Close(); } - Console.WriteLine("Done."); + Info("Done."); + + IrssLog.Close(); + return ReturnSuccess; } + static void Info(string format, params object[] args) + { + string message = String.Format(format, args); + IrssLog.Info(message); + Console.WriteLine(message); + } + } } Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-08 10:05:03 UTC (rev 1436) @@ -28,139 +28,147 @@ /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Config)); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.toolTips = new System.Windows.Forms.ToolTip(this.components); - this.checkBoxRunAtBoot = new System.Windows.Forms.CheckBox(); - this.buttonAdvanced = new System.Windows.Forms.Button(); - this.buttonDetect = new System.Windows.Forms.Button(); - this.groupBoxTransceiver = new System.Windows.Forms.GroupBox(); - this.gridPlugins = new SourceGrid.Grid(); - this.buttonHelp = new System.Windows.Forms.Button(); - this.groupBoxTransceiver.SuspendLayout(); - this.SuspendLayout(); - // - // 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(352, 304); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(64, 24); - this.buttonOK.TabIndex = 5; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(424, 304); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(64, 24); - this.buttonCancel.TabIndex = 6; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // checkBoxRunAtBoot - // - this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.checkBoxRunAtBoot.AutoSize = true; - this.checkBoxRunAtBoot.Location = new System.Drawing.Point(8, 272); - this.checkBoxRunAtBoot.Name = "checkBoxRunAtBoot"; - this.checkBoxRunAtBoot.Size = new System.Drawing.Size(165, 17); - this.checkBoxRunAtBoot.TabIndex = 1; - this.checkBoxRunAtBoot.Text = "&Start IR Server with Windows"; - this.toolTips.SetToolTip(this.checkBoxRunAtBoot, "Run IR Server when windows boots up?"); - this.checkBoxRunAtBoot.UseVisualStyleBackColor = true; - // - // buttonAdvanced - // - this.buttonAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonAdvanced.Location = new System.Drawing.Point(80, 304); - this.buttonAdvanced.Name = "buttonAdvanced"; - this.buttonAdvanced.Size = new System.Drawing.Size(64, 24); - this.buttonAdvanced.TabIndex = 3; - this.buttonAdvanced.Text = "Advanced"; - this.toolTips.SetToolTip(this.buttonAdvanced, "Click here for advanced options"); - this.buttonAdvanced.UseVisualStyleBackColor = true; - this.buttonAdvanced.Click += new System.EventHandler(this.buttonAdvanced_Click); - // - // buttonDetect - // - this.buttonDetect.Anchor = System.Windows.Forms.AnchorStyles.Bottom; - this.buttonDetect.Location = new System.Drawing.Point(216, 304); - this.buttonDetect.Name = "buttonDetect"; - this.buttonDetect.Size = new System.Drawing.Size(80, 24); - this.buttonDetect.TabIndex = 4; - this.buttonDetect.Text = "Detect"; - this.toolTips.SetToolTip(this.buttonDetect, "Click here to automatically detect attached devices"); - this.buttonDetect.UseVisualStyleBackColor = true; - this.buttonDetect.Click += new System.EventHandler(this.buttonDetect_Click); - // - // groupBoxTransceiver - // - this.groupBoxTransceiver.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.groupBoxTransceiver.Controls.Add(this.gridPlugins); - this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 8); - this.groupBoxTransceiver.Name = "groupBoxTransceiver"; - this.groupBoxTransceiver.Size = new System.Drawing.Size(480, 256); - this.groupBoxTransceiver.TabIndex = 0; - this.groupBoxTransceiver.TabStop = false; - this.groupBoxTransceiver.Text = "Device plugins"; - // - // gridPlugins - // - this.gridPlugins.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.gridPlugins.BackColor = System.Drawing.SystemColors.Window; - this.gridPlugins.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.gridPlugins.Location = new System.Drawing.Point(16, 24); - this.gridPlugins.Name = "gridPlugins"; - this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; - this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; - this.gridPlugins.Size = new System.Drawing.Size(448, 216); - this.gridPlugins.TabIndex = 0; - this.gridPlugins.TabStop = true; - this.gridPlugins.ToolTipText = ""; - // - // buttonHelp - // - this.buttonHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonHelp.Location = new System.Drawing.Point(8, 304); - this.buttonHelp.Name = "buttonHelp"; - this.buttonHelp.Size = new System.Drawing.Size(64, 24); - this.buttonHelp.TabIndex = 2; - this.buttonHelp.Text = "Help"; - this.buttonHelp.UseVisualStyleBackColor = true; - this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click); - // - // Config - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(496, 343); - this.Controls.Add(this.buttonDetect); - this.Controls.Add(this.buttonAdvanced); - this.Controls.Add(this.buttonHelp); - this.Controls.Add(this.checkBoxRunAtBoot); - this.Controls.Add(this.groupBoxTransceiver); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(504, 370); - this.Name = "Config"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "IR Server - Configuration"; - this.groupBoxTransceiver.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Config)); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.checkBoxRunAtBoot = new System.Windows.Forms.CheckBox(); + this.groupBoxTransceiver = new System.Windows.Forms.GroupBox(); + this.gridPlugins = new SourceGrid.Grid(); + this.toolStrip = new System.Windows.Forms.ToolStrip(); + this.toolStripButtonDetect = new System.Windows.Forms.ToolStripButton(); + this.toolStripButtonAdvancedSettings = new System.Windows.Forms.ToolStripButton(); + this.toolStripButtonHelp = new System.Windows.Forms.ToolStripButton(); + this.groupBoxTransceiver.SuspendLayout(); + this.toolStrip.SuspendLayout(); + this.SuspendLayout(); + // + // 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(352, 304); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(424, 304); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // checkBoxRunAtBoot + // + this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.checkBoxRunAtBoot.AutoSize = true; + this.checkBoxRunAtBoot.Location = new System.Drawing.Point(16, 304); + this.checkBoxRunAtBoot.Name = "checkBoxRunAtBoot"; + this.checkBoxRunAtBoot.Size = new System.Drawing.Size(165, 17); + this.checkBoxRunAtBoot.TabIndex = 1; + this.checkBoxRunAtBoot.Text = "&Start IR Server with Windows"; + this.toolTips.SetToolTip(this.checkBoxRunAtBoot, "Run IR Server when windows boots up?"); + this.checkBoxRunAtBoot.UseVisualStyleBackColor = true; + // + // groupBoxTransceiver + // + this.groupBoxTransceiver.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.groupBoxTransceiver.Controls.Add(this.gridPlugins); + this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 32); + this.groupBoxTransceiver.Name = "groupBoxTransceiver"; + this.groupBoxTransceiver.Size = new System.Drawing.Size(480, 264); + this.groupBoxTransceiver.TabIndex = 0; + this.groupBoxTransceiver.TabStop = false; + this.groupBoxTransceiver.Text = "Device plugins"; + // + // gridPlugins + // + this.gridPlugins.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.gridPlugins.BackColor = System.Drawing.SystemColors.Window; + this.gridPlugins.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.gridPlugins.Location = new System.Drawing.Point(8, 16); + this.gridPlugins.Name = "gridPlugins"; + this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; + this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; + this.gridPlugins.Size = new System.Drawing.Size(464, 240); + this.gridPlugins.TabIndex = 0; + this.gridPlugins.TabStop = true; + this.gridPlugins.ToolTipText = ""; + // + // toolStrip + // + this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripButtonDetect, + this.toolStripButtonAdvancedSettings, + this.toolStripButtonHelp}); + this.toolStrip.Location = new System.Drawing.Point(0, 0); + this.toolStrip.Name = "toolStrip"; + this.toolStrip.Size = new System.Drawing.Size(496, 25); + this.toolStrip.TabIndex = 4; + // + // toolStripButtonDetect + // + this.toolStripButtonDetect.Image = global::IRServer.Properties.Resources.Detect; + this.toolStripButtonDetect.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonDetect.Name = "toolStripButtonDetect"; + this.toolStripButtonDetect.Size = new System.Drawing.Size(59, 22); + this.toolStripButtonDetect.Text = "Detect"; + this.toolStripButtonDetect.ToolTipText = "Detect attached devices"; + this.toolStripButtonDetect.Click += new System.EventHandler(this.toolStripButtonDetect_Click); + // + // toolStripButtonAdvancedSettings + // + this.toolStripButtonAdvancedSettings.Image = global::IRServer.Properties.Resources.Advanced; + this.toolStripButtonAdvancedSettings.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonAdvancedSettings.Name = "toolStripButtonAdvancedSettings"; + this.toolStripButtonAdvancedSettings.Size = new System.Drawing.Size(75, 22); + this.toolStripButtonAdvancedSettings.Text = "Advanced"; + this.toolStripButtonAdvancedSettings.ToolTipText = "Advanced settings"; + this.toolStripButtonAdvancedSettings.Click += new System.EventHandler(this.toolStripButtonAdvancedSettings_Click); + // + // toolStripButtonHelp + // + this.toolStripButtonHelp.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButtonHelp.Image = global::IRServer.Properties.Resources.Help; + this.toolStripButtonHelp.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonHelp.Name = "toolStripButtonHelp"; + this.toolStripButtonHelp.Size = new System.Drawing.Size(48, 22); + this.toolStripButtonHelp.Text = "Help"; + this.toolStripButtonHelp.Click += new System.EventHandler(this.toolStripButtonHelp_Click); + // + // Config + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(496, 343); + this.Controls.Add(this.toolStrip); + this.Controls.Add(this.checkBoxRunAtBoot); + this.Controls.Add(this.groupBoxTransceiver); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MinimumSize = new System.Drawing.Size(504, 370); + this.Name = "Config"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "IR Server - Configuration"; + this.groupBoxTransceiver.ResumeLayout(false); + this.toolStrip.ResumeLayout(false); + this.toolStrip.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -171,9 +179,10 @@ private System.Windows.Forms.ToolTip toolTips; private System.Windows.Forms.GroupBox groupBoxTransceiver; private System.Windows.Forms.CheckBox checkBoxRunAtBoot; - private System.Windows.Forms.Button buttonHelp; private SourceGrid.Grid gridPlugins; - private System.Windows.Forms.Button buttonAdvanced; - private System.Windows.Forms.Button buttonDetect; + private System.Windows.Forms.ToolStrip toolStrip; + private System.Windows.Forms.ToolStripButton toolStripButtonDetect; + private System.Windows.Forms.ToolStripButton toolStripButtonAdvancedSettings; + private System.Windows.Forms.ToolStripButton toolStripButtonHelp; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-08 10:05:03 UTC (rev 1436) @@ -66,9 +66,9 @@ SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; if (checkBox != null && checkBox.Checked) - receivers.Add(gridPlugins[row, 0].DisplayText); + receivers.Add(gridPlugins[row, ColName].DisplayText); } if (receivers.Count == 0) @@ -81,13 +81,13 @@ SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; if (checkBox == null) continue; if (value == null) checkBox.Checked = false; - else if (Array.IndexOf<string>(value, gridPlugins[row, 0].DisplayText) != -1) + else if (Array.IndexOf<string>(value, gridPlugins[row, ColName].DisplayText) != -1) checkBox.Checked = true; else checkBox.Checked = false; @@ -101,23 +101,26 @@ SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; if (checkBox != null && checkBox.Checked) - return gridPlugins[row, 0].DisplayText; + return gridPlugins[row, ColName].DisplayText; } return String.Empty; } set { + if (String.IsNullOrEmpty(value)) + return; + SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox; + checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; if (checkBox == null) continue; - if (gridPlugins[row, 0].DisplayText.Equals(value, StringComparison.OrdinalIgnoreCase)) + if (gridPlugins[row, ColName].DisplayText.Equals(value, StringComparison.OrdinalIgnoreCase)) checkBox.Checked = true; else checkBox.Checked = false; @@ -157,6 +160,87 @@ #endregion Constructor + #region Controls + + private void buttonOK_Click(object sender, EventArgs e) + { + try + { + if (checkBoxRunAtBoot.Checked) + SystemRegistry.SetAutoRun("IR Server", Application.ExecutablePath); + else + SystemRegistry.RemoveAutoRun("IR Server"); + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + + this.DialogResult = DialogResult.OK; + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void buttonClickEvent_Executed(object sender, EventArgs e) + { + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; + + IConfigure plugin = cell.Row.Tag as IConfigure; + if (plugin != null) + plugin.Configure(this); + } + private void TransmitChanged(object sender, EventArgs e) + { + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell; + + if (!cell.Checked) + return; + + PluginBase plugin = cell.Row.Tag as PluginBase; + + for (int row = 1; row < gridPlugins.RowsCount; row++) + { + SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; + + if (checkBox != null && checkBox.Checked && !gridPlugins[row, ColName].DisplayText.Equals(plugin.Name, StringComparison.OrdinalIgnoreCase)) + checkBox.Checked = false; + } + } + private void PluginDoubleClick(object sender, EventArgs e) + { + SourceGrid.CellContext context = (SourceGrid.CellContext)sender; + SourceGrid.Cells.Cell cell = (SourceGrid.Cells.Cell)context.Cell; + + SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, ColReceive] as SourceGrid.Cells.CheckBox; + if (checkBoxReceive != null) + checkBoxReceive.Checked = true; + + SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, ColTransmit] as SourceGrid.Cells.CheckBox; + if (checkBoxTransmit != null) + checkBoxTransmit.Checked = true; + } + + private void toolStripButtonDetect_Click(object sender, EventArgs e) + { + Detect(); + } + private void toolStripButtonAdvancedSettings_Click(object sender, EventArgs e) + { + Advanced(); + } + private void toolStripButtonHelp_Click(object sender, EventArgs e) + { + ShowHelp(); + } + + #endregion Controls + void CreateGrid() { int row = 0; @@ -166,7 +250,7 @@ // Setup Column Headers gridPlugins.Rows.Insert(row); - gridPlugins[row, ColIcon] = new SourceGrid.Cells.ColumnHeader("*"); + gridPlugins[row, ColIcon] = new SourceGrid.Cells.ColumnHeader(" "); gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); @@ -178,9 +262,19 @@ gridPlugins.Rows.Insert(++row); gridPlugins.Rows[row].Tag = transceiver; - // TODO: Icon Cell - gridPlugins[row, ColIcon] = new SourceGrid.Cells.Cell(); + // Icon Cell + if (transceiver.DeviceIcon != null) + { + SourceGrid.Cells.Image iconCell = new SourceGrid.Cells.Image(transceiver.DeviceIcon); + iconCell.Editor.EnableEdit = false; + gridPlugins[row, ColIcon] = iconCell; + } + else + { + gridPlugins[row, ColIcon] = new SourceGrid.Cells.Cell(); + } + // Name Cell SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name); @@ -245,124 +339,54 @@ gridPlugins.AutoSizeCells(); } - #region Controls - - private void buttonOK_Click(object sender, EventArgs e) + void Detect() { - try + SourceGrid.Cells.CheckBox checkBox; + for (int row = 1; row < gridPlugins.RowsCount; row++) { - if (checkBoxRunAtBoot.Checked) - SystemRegistry.SetAutoRun("IR Server", Application.ExecutablePath); - else - SystemRegistry.RemoveAutoRun("IR Server"); + PluginBase plugin = gridPlugins.Rows[row].Tag as PluginBase; + + bool detected = plugin.Detect(); + + // Receive + checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; + if (checkBox != null) + checkBox.Checked = detected; + + // Transmit + checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; + if (checkBox != null) + checkBox.Checked = detected; } - catch (Exception ex) - { - IrssLog.Error(ex); - } - - this.DialogResult = DialogResult.OK; - this.Close(); } - private void buttonCancel_Click(object sender, EventArgs e) + void Advanced() { - this.DialogResult = DialogResult.Cancel; - this.Close(); - } + Advanced advanced = new Advanced(); - private void buttonClickEvent_Executed(object sender, EventArgs e) - { - SourceGrid.CellContext context = (SourceGrid.CellContext)sender; - SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; + advanced.AbstractRemoteMode = _abstractRemoteMode; + advanced.Mode = _mode; + advanced.HostComputer = _hostComputer; - IConfigure plugin = cell.Row.Tag as IConfigure; - if (plugin != null) - plugin.Configure(this); - } - private void TransmitChanged(object sender, EventArgs e) - { - SourceGrid.CellContext context = (SourceGrid.CellContext)sender; - SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell; - - if (!cell.Checked) - return; - - PluginBase plugin = cell.Row.Tag as PluginBase; - - for (int row = 1; row < gridPlugins.RowsCount; row++) + if (advanced.ShowDialog(this) == DialogResult.OK) { - SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; - - if (checkBox != null && checkBox.Checked && !gridPlugins[row, ColName].DisplayText.Equals(plugin.Name, StringComparison.OrdinalIgnoreCase)) - checkBox.Checked = false; + _abstractRemoteMode = advanced.AbstractRemoteMode; + _mode = advanced.Mode; + _hostComputer = advanced.HostComputer; } } - private void PluginDoubleClick(object sender, EventArgs e) + void ShowHelp() { - SourceGrid.CellContext context = (SourceGrid.CellContext)sender; - SourceGrid.Cells.Cell cell = (SourceGrid.Cells.Cell)context.Cell; - - SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, ColReceive] as SourceGrid.Cells.CheckBox; - if (checkBoxReceive != null) - checkBoxReceive.Checked = true; - - SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, ColTransmit] as SourceGrid.Cells.CheckBox; - if (checkBoxTransmit != null) - checkBoxTransmit.Checked = true; - } - - private void buttonHelp_Click(object sender, EventArgs e) - { try { string file = Path.Combine(SystemRegistry.GetInstallFolder(), "IR Server Suite.chm"); - Help.ShowHelp(this, file, HelpNavigator.Topic, "IR Server\\index.html"); + Help.ShowHelp(this, file, HelpNavigator.Topic, "Input Service\\index.html"); } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Failed to load help", MessageBoxButtons.OK, MessageBoxIcon.Error); } } - - private void buttonAdvanced_Click(object sender, EventArgs e) - { - Advanced advanced = new Advanced(); - advanced.AbstractRemoteMode = _abstractRemoteMode; - advanced.Mode = _mode; - advanced.HostComputer = _hostComputer; - - if (advanced.ShowDialog(this) == DialogResult.OK) - { - _abstractRemoteMode = advanced.AbstractRemoteMode; - _mode = advanced.Mode; - _hostComputer = advanced.HostComputer; - } - } - - #endregion Controls - - private void buttonDetect_Click(object sender, EventArgs e) - { - SourceGrid.Cells.CheckBox checkBox; - for (int row = 1; row < gridPlugins.RowsCount; row++) - { - PluginBase plugin = gridPlugins.Rows[row].Tag as PluginBase; - - bool detected = plugin.Detect(); - - // Receive - checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; - if (checkBox != null) - checkBox.Checked = detected; - - // Transmit - checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; - if (checkBox != null) - checkBox.Checked = detected; - } - } - } } Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx 2008-03-08 10:05:03 UTC (rev 1436) @@ -120,6 +120,9 @@ <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="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>200, 17</value> + </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> Added: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Advanced.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Advanced.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Detect.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Detect.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Help.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/IR Server Suite/Applications/IR Server/Graphics/Help.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2008-03-08 10:05:03 UTC (rev 1436) @@ -118,6 +118,9 @@ </Compile> </ItemGroup> <ItemGroup> + <None Include="Graphics\Advanced.png" /> + <None Include="Graphics\Detect.png" /> + <Content Include="Graphics\Help.png" /> <Content Include="Icon.ico" /> <Content Include="Icon16.ico" /> <Content Include="IRServer.exe.manifest"> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.Designer.cs 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.Designer.cs 2008-03-08 10:05:03 UTC (rev 1436) @@ -60,6 +60,27 @@ } } + internal static System.Drawing.Bitmap Advanced { + get { + object obj = ResourceManager.GetObject("Advanced", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Detect { + get { + object obj = ResourceManager.GetObject("Detect", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap Help { + get { + object obj = ResourceManager.GetObject("Help", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Icon Icon16 { get { object obj = ResourceManager.GetObject("Icon16", resourceCulture); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.resx 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/Resources.resx 2008-03-08 10:05:03 UTC (rev 1436) @@ -118,6 +118,15 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="Advanced" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\graphics\advanced.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Detect" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\graphics\detect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\graphics\help.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Icon16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Icon16.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> Modified: trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml 2008-03-08 10:05:03 UTC (rev 1436) @@ -1,44 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <Programs> - <ProgramSettings Name="GBPVR" FileName="C:\Program Files\devnz\gbpvr\GBPVR.exe" Folder="C:\Program Files\devnz\gbpvr" Arguments="" UseShellExecute="false" ForceWindowFocus="false" IgnoreSystemWide="false" WindowState="Normal"> - <ButtonMappings> - <ButtonMapping KeyCode="31743" Description="0" Command="Keys: {NUM0}" /> - <ButtonMapping KeyCode="31742" Description="1" Command="Keys: {NUM1}" /> - <ButtonMapping KeyCode="31741" Description="2" Command="Keys: {NUM2}" /> - <ButtonMapping KeyCode="31740" Description="3" Command="Keys: {NUM3}" /> - <ButtonMapping KeyCode="31739" Description="4" Command="Keys: {NUM4}" /> - <ButtonMapping KeyCode="31738" Description="5" Command="Keys: {NUM5}" /> - <ButtonMapping KeyCode="31737" Description="6" Command="Keys: {NUM6}" /> - <ButtonMapping KeyCode="31736" Description="7" Command="Keys: {NUM7}" /> - <ButtonMapping KeyCode="31735" Description="8" Command="Keys: {NUM8}" /> - <ButtonMapping KeyCode="31734" Description="9" Command="Keys: {NUM9}" /> - <ButtonMapping KeyCode="31713" Description="UP" Command="Keys: {UP}" /> - <ButtonMapping KeyCode="31712" Description="DOWN" Command="Keys: {DOWN}" /> - <ButtonMapping KeyCode="31711" Description="LEFT" Command="Keys: {LEFT}" /> - <ButtonMapping KeyCode="31710" Description="RIGHT" Command="Keys: {RIGHT}" /> - <ButtonMapping KeyCode="31709" Description="OK" Command="Keys: {ENTER}" /> - <ButtonMapping KeyCode="31722" Description="REW" Command="Keys: ^d" /> - <ButtonMapping KeyCode="31723" Description="FF" Command="Keys: ^f" /> - <ButtonMapping KeyCode="31721" Description="PLAY" Command="Keys: ^p" /> - <ButtonMapping KeyCode="31719" Description="PAUSE" Command="Keys: ^q" /> - <ButtonMapping KeyCode="31718" Description="STOP" Command="Keys: ^s" /> - <ButtonMapping KeyCode="31720" Description="RECORD" Command="Keys: ^k" /> - <ButtonMapping KeyCode="31716" Description="Track-" Command="Keys: ^{LEFT}" /> - <ButtonMapping KeyCode="31717" Description="Track+" Command="Keys: ^{RIGHT}" /> - <ButtonMapping KeyCode="31708" Description="Back" Command="Keys: {ESC}" /> - <ButtonMapping KeyCode="31728" Description="Info" Command="Keys: ^b" /> - <ButtonMapping KeyCode="31725" Description="Ch+" Command="Keys: {PGUP}" /> - <ButtonMapping KeyCode="31724" Description="Ch-" Command="Keys: {PGDN}" /> - <ButtonMapping KeyCode="31671" Description="Recorded TV" Command="Keys: {F8}" /> - <ButtonMapping KeyCode="31705" Description="Guide" Command="Keys: {F1}" /> - <ButtonMapping KeyCode="31706" Description="Live TV" Command="Keys: {F2}" /> - <ButtonMapping KeyCode="31730" Description="Last Channel" Command="Keys: ^w" /> - <ButtonMapping KeyCode="31714" Description="Videos" Command="Keys: {F3}" /> - <ButtonMapping KeyCode="31715" Description="Radio" Command="Keys: {F6}" /> - <ButtonMapping KeyCode="31732" Description="Audio" Command="Keys: {F4}" /> - <ButtonMapping KeyCode="31731" Description="Main Menu" Command="Keys: {HOME}" /> - </ButtonMappings> - </ProgramSettings> - </Programs> + <ButtonMappings> + <ButtonMapping KeyCode="31743" Description="0" Command="Keys: {NUM0}" /> + <ButtonMapping KeyCode="31742" Description="1" Command="Keys: {NUM1}" /> + <ButtonMapping KeyCode="31741" Description="2" Command="Keys: {NUM2}" /> + <ButtonMapping KeyCode="31740" Description="3" Command="Keys: {NUM3}" /> + <ButtonMapping KeyCode="31739" Description="4" Command="Keys: {NUM4}" /> + <ButtonMapping KeyCode="31738" Description="5" Command="Keys: {NUM5}" /> + <ButtonMapping KeyCode="31737" Description="6" Command="Keys: {NUM6}" /> + <ButtonMapping KeyCode="31736" Description="7" Command="Keys: {NUM7}" /> + <ButtonMapping KeyCode="31735" Description="8" Command="Keys: {NUM8}" /> + <ButtonMapping KeyCode="31734" Description="9" Command="Keys: {NUM9}" /> + <ButtonMapping KeyCode="31713" Description="UP" Command="Keys: {UP}" /> + <ButtonMapping KeyCode="31712" Description="DOWN" Command="Keys: {DOWN}" /> + <ButtonMapping KeyCode="31711" Description="LEFT" Command="Keys: {LEFT}" /> + <ButtonMapping KeyCode="31710" Description="RIGHT" Command="Keys: {RIGHT}" /> + <ButtonMapping KeyCode="31709" Description="OK" Command="Keys: {ENTER}" /> + <ButtonMapping KeyCode="31722" Description="REW" Command="Keys: ^d" /> + <ButtonMapping KeyCode="31723" Description="FF" Command="Keys: ^f" /> + <ButtonMapping KeyCode="31721" Description="PLAY" Command="Keys: ^p" /> + <ButtonMapping KeyCode="31719" Description="PAUSE" Command="Keys: ^q" /> + <ButtonMapping KeyCode="31718" Description="STOP" Command="Keys: ^s" /> + <ButtonMapping KeyCode="31720" Description="RECORD" Command="Keys: ^k" /> + <ButtonMapping KeyCode="31716" Description="Track-" Command="Keys: ^{LEFT}" /> + <ButtonMapping KeyCode="31717" Description="Track+" Command="Keys: ^{RIGHT}" /> + <ButtonMapping KeyCode="31708" Description="Back" Command="Keys: {ESC}" /> + <ButtonMapping KeyCode="31728" Description="Info" Command="Keys: ^b" /> + <ButtonMapping KeyCode="31725" Description="Ch+" Command="Keys: {PGUP}" /> + <ButtonMapping KeyCode="31724" Description="Ch-" Command="Keys: {PGDN}" /> + <ButtonMapping KeyCode="31671" Description="Recorded TV" Command="Keys: {F8}" /> + <ButtonMapping KeyCode="31705" Description="Guide" Command="Keys: {F1}" /> + <ButtonMapping KeyCode="31706" Description="Live TV" Command="Keys: {F2}" /> + <ButtonMapping KeyCode="31730" Description="Last Channel" Command="Keys: ^w" /> + <ButtonMapping KeyCode="31714" Description="Videos" Command="Keys: {F3}" /> + <ButtonMapping KeyCode="31715" Description="Radio" Command="Keys: {F6}" /> + <ButtonMapping KeyCode="31732" Description="Audio" Command="Keys: {F4}" /> + <ButtonMapping KeyCode="31731" Description="Main Menu" Command="Keys: {HOME}" /> + </ButtonMappings> </Configuration> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Meedio.exe.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Meedio.exe.xml 2008-03-07 15:43:52 UTC (rev 1435) +++ trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Meedio.exe.xml 2008-03-08 10:05:03 UTC (rev 1436) @@ -1,64 +1,57 @@ <?xml version="1.0" encoding="utf-8"?> <Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <ServerHost>localhost</ServerHost> - <SystemWideMappings /> - <Programs> - <ProgramSettings Name="Meedio" FileName="e:\meedio\meedioapp\meedio.exe" Folder="" Arguments="" UseShellExecute="false" ForceWindowFocus="false" IgnoreSystemWide="false" WindowState="Normal"> - <ButtonMappings> - <ButtonMapping KeyCode="Up" Description="UP" Command="Window Message: CLASS|H2-WM-COMMAND|273|1|0" /> - <ButtonMapping KeyCode="Down" Description="DOWN" Command="Window Message: CLASS|H2-WM-COMMAND|273|2|0" /> - <ButtonMapping KeyCode="Left" Description="LEFT" Command="Window Message: CLASS|H2-WM-COMMAND|273|3|0" /> - <ButtonMapping KeyCode="Right" Description="RIGHT" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="OK" Description="SELECT" Command="Window Message: CLASS|H2-WM-COMMAND|273|5|0" /> - <ButtonMapping KeyCode="VolumeUp" Description="VOLUP" Command="Window Message: CLASS|H2-WM-COMMAND|273|30|0" /> - <ButtonMapping KeyCode="VolumeDown" Description="VOLDN" Command="Window Message: CLASS|H2-WM-COMMAND|273|31|0" /> - <ButtonMapping KeyCode="ChannelUp" Description="CHANNELUP" Command="Window Message: CLASS|H2-WM-COMMAND|273|7|0" /> - <ButtonMapping KeyCode="ChannelDown" Description="CHANNELDN" Command="Window Message: CLASS|H2-WM-COMMAND|273|8|0" /> - <ButtonMapping KeyCode="Start" Description="HOME" Command="Window Message: CLASS|H2-WM-COMMAND|273|44|0" /> - <ButtonMapping KeyCode="Back" Description="BACK" Command="Window Message: CLASS|H2-WM-COMMAND|273|6|0" /> - <ButtonMapping KeyCode="Info" Description="INFO" Command="Window Message: CLASS|H2-WM-COMMAND|273|36|0" /> - <ButtonMapping KeyCode="Mute" Description="MUTE" Command="Window Message: CLASS|H2-WM-COMMAND|273|32|0" /> - <ButtonMapping KeyCode="Number0" Description="0" Command="Window Message: CLASS|H2-WM-COMMAND|273|10|0" /> - <ButtonMapping KeyCode="Number1" Description="1" Command="Window Message: CLASS|H2-WM-COMMAND|273|11|0" /> - <ButtonMapping KeyCode="Number2" Description="2" Command="Window Message: CLASS|H2-WM-COMMAND|273|12|0" /> - <ButtonMapping KeyCode="Number3" Description="3" Command="Window Message: CLASS|H2-WM-COMMAND|273|13|0" /> - <ButtonMapping KeyCode="Number4" Description="4" Command="Window Message: CLASS|H2-WM-COMMAND|273|14|0" /> - <ButtonMapping KeyCode="Number5" Description="5" Command="Window Message: CLASS|H2-WM-COMMAND|273|15|0" /> - <ButtonMapping KeyCode="Number6" Description="6" Command="Window Message: CLASS|H2-WM-COMMAND|273|16|0" /> - <ButtonMapping KeyCode="Number7" Description="7" Command="Window Message: CLASS|H2-WM-COMMAND|273|17|0" /> - <ButtonMapping KeyCode="Number8" Description="8" Command="Window Message: CLASS|H2-WM-COMMAND|273|18|0" /> - <ButtonMapping KeyCode="Number9" Description="9" Command="Window Message: CLASS|H2-WM-COMMAND|273|19|0" /> - <ButtonMapping KeyCode="Play" Description="PLAY" Command="Window Message: CLASS|H2-WM-COMMAND|273|21|0" /> - <ButtonMapping KeyCode="Pause" Description="PAUSE" Command="Window Message: CLASS|H2-WM-COMMAND|273|22|0" /> - <ButtonMapping KeyCode="Stop" Description="STOP" Command="Window Message: CLASS|H2-WM-COMMAND|273|27|0" /> - <ButtonMapping KeyCode="FastForward" Description="FFWD" Command="Window Message: CLASS|H2-WM-COMMAND|273|25|0" /> - <ButtonMapping KeyCode="Rewind" Description="REW" Command="Window Message: CLASS|H2-WM-COMMAND|273|26|0" /> - <ButtonMapping KeyCode="Record" Description="RECORD" Command="Window Message: CLASS|H2-WM-COMMAND|273|28|0" /> - <ButtonMapping KeyCode="NextChapter" Description="NEXT" Command="Window Message: CLASS|H2-WM-COMMAND|273|23|0" /> - <ButtonMapping KeyCode="PreviousChapter" Description="PREVIOUS" Command="Window Message: CLASS|H2-WM-COMMAND|273|24|0" /> - <ButtonMapping KeyCode="Power" Description="POWER" Command="Window Message: CLASS|H2-WM-COMMAND|273|38|0" /> - <ButtonMapping KeyCode="Power2" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="Teletext" Description="TELETEXT" Command="Window Message: CLASS|H2-WM-COMMAND|273|52|0" /> - <ButtonMapping KeyCode="Red" Description="RED" Command="Window Message: CLASS|H2-WM-COMMAND|273|53|0" /> - <ButtonMapping KeyCode="Green" Description="GREEN" Command="Window Message: CLASS|H2-WM-COMMAND|273|54|0" /> - <ButtonMapping KeyCode="Yellow" Description="YELLOW" Command="Window Message: CLASS|H2-WM-COMMAND|273|55|0" /> - <ButtonMapping KeyCode="Blue" Description="BLUE" Command="Window Message: CLASS|H2-WM-COMMAND|273|56|0" /> - <ButtonMapping KeyCode="Clear" Description="CLEAR" Command="Window Message: CLASS|H2-WM-COMMAND|273|39|0" /> - <ButtonMapping KeyCode="Enter" Description="ENTER" Command="Window Message: CLASS|H2-WM-COMMAND|273|20|0" /> - <ButtonMapping KeyCode="_Hash" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="_Star" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="Music" Description="GOTO-MUSIC" Command="Window Message: CLASS|H2-WM-COMMAND|273|46|0" /> - <ButtonMapping KeyCode="Pictures" Description="GOTO-PHOTOS" Command="Window Message: CLASS|H2-WM-COMMAND|273|47|0" /> - <ButtonMapping KeyCode="Videos" Description="GOTO-VIDEO" Command="Window Message: CLASS|H2-WM-COMMAND|273|50|0" /> - <ButtonMapping KeyCode="DVD" Description="GOTO-DVD" Command="Window Message: CLASS|H2-WM-COMMAND|273|48|0" /> - <ButtonMapping KeyCode="TV" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="Guide" Description="GUIDE" Command="Window Message: CLASS|H2-WM-COMMAND|273|34|0" /> - <ButtonMapping KeyCode="LiveTV" Description="GOTO-TV" Command="Window Message: CLASS|H2-WM-COMMAND|273|49|0" /> - <ButtonMapping KeyCode="PreviousChannel" Description="PREV-CH" Command="Window Message: CLASS|H2-WM-COMMAND|273|33|0" /> - <ButtonMapping KeyCode="_Radio" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - <ButtonMapping KeyCode="_Print" Description="" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> - </ButtonMappings> - </ProgramSettings> - </Programs> - <Events /> + <ButtonMappings> + <ButtonMapping KeyCode="Up" Description="UP" Command="Window Message: CLASS|H2-WM-COMMAND|273|1|0" /> + <ButtonMapping KeyCode="Down" Description="DOWN" Command="Window Message: CLASS|H2-WM-COMMAND|273|2|0" /> + <ButtonMapping KeyCode="Left" Description="LEFT" Command="Window Message: CLASS|H2-WM-COMMAND|273|3|0" /> + <ButtonMapping KeyCode="Right" Description="RIGHT" Command="Window Message: CLASS|H2-WM-COMMAND|273|4|0" /> + <ButtonMapping KeyCode="OK" Description="SELECT" Command="Window Message: CLASS|H2-WM-COMMAND|273|5|0" /> + <ButtonMapping KeyCode="VolumeUp" Description="VOLUP" Command="Window Message: CLASS|H2-WM-COMMAND|273|30|0" /> + <ButtonMapping KeyCode="VolumeDown" Description="VOLDN" Command="Window Message: CLASS|H2-WM-COMMAND|273|31|0" /> + <ButtonMapping KeyCode="ChannelUp" Description="CHANNELUP" Command="Window Message: CLASS|H2-WM-COMMAND|273|7|0" /> + <ButtonMapping KeyCode="ChannelDown" Description="CHANNELDN" Command="Window Message: CLASS|H2-WM-COMMAND|273|8|0" /> + <ButtonMapping KeyCode="Start" Description="HOME" Command="Window Message: CLASS|H2-WM-COMMAND|273|44|0" /> + <ButtonMapping KeyCode="Back" Description="BACK" Command="Window Message: CLASS|H2-WM-COMMAND|273|6|0" /> + <ButtonMapping KeyCode="Info" Description="INFO" Command="Window Message: CLASS|H2-WM-COMMAND|273|36|0" /> + <ButtonMapping KeyCode="Mute" Description="MUTE" Command="Window Message: CLASS|H2-WM-COMMAND|273|32|0" /> + <ButtonMapping KeyCode="Number0" Description="0" Command="Window Message: CLASS|H2-WM-COMMAND|273|10|0" /> + <ButtonMapping KeyCode="Number1" Description="1" Command="Window Message: CLASS|H2-WM-COMMAND|273|11|0" /> + <ButtonMapping KeyCode="Number2" Description="2" Command="Window Message: CLASS|H2-WM-COMMAND|273|12|0" /> + <ButtonMapping KeyCode="Number3" Description="3" Command="Window Message: CLASS|H2-WM-COMMAND|273|13|0" /> + <ButtonMapping KeyCode="Number4" Description="4" Command="Window Message: CLASS|H2-WM-COMMAND|273|14|0" /> + <ButtonMapping KeyCode="Number5" Description="5" Command="Window Message: CLASS|H2-WM-COMMAND|273|15|0" /> + <ButtonMapping KeyCode="Number6" Description="6" Command="Window Message: CLASS|H2-WM-COMMAND|273|16|0" /> + <ButtonMapping KeyCode="Number7" Description="7" Command="Window Message: CLASS|H2-WM-COMMAND|273|17|0" /> + <ButtonMapping KeyCode="Number8" Description="8" Command="Window Message: CLASS|H2-WM-COMMAND|273|18|0" /> + <ButtonMapping KeyCode="Number9" Description="9" Command="Window Message: CLASS|H2-WM-COMMAND|273|19... [truncated message content] |
From: <an...@us...> - 2008-03-08 14:19:20
|
Revision: 1439 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1439&view=rev Author: and-81 Date: 2008-03-08 06:19:16 -0800 (Sat, 08 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -60,7 +60,7 @@ { get { - return comboBoxPriority.SelectedText; + return comboBoxPriority.SelectedItem as string; } set { @@ -133,7 +133,6 @@ } #endregion Controls - } Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -47,7 +47,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(352, 304); + this.buttonOK.Location = new System.Drawing.Point(360, 272); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 2; @@ -59,7 +59,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(424, 304); + this.buttonCancel.Location = new System.Drawing.Point(432, 272); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 3; @@ -71,7 +71,7 @@ // this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxRunAtBoot.AutoSize = true; - this.checkBoxRunAtBoot.Location = new System.Drawing.Point(16, 304); + this.checkBoxRunAtBoot.Location = new System.Drawing.Point(16, 272); this.checkBoxRunAtBoot.Name = "checkBoxRunAtBoot"; this.checkBoxRunAtBoot.Size = new System.Drawing.Size(165, 17); this.checkBoxRunAtBoot.TabIndex = 1; @@ -87,7 +87,7 @@ this.groupBoxTransceiver.Controls.Add(this.gridPlugins); this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 32); this.groupBoxTransceiver.Name = "groupBoxTransceiver"; - this.groupBoxTransceiver.Size = new System.Drawing.Size(480, 264); + this.groupBoxTransceiver.Size = new System.Drawing.Size(488, 232); this.groupBoxTransceiver.TabIndex = 0; this.groupBoxTransceiver.TabStop = false; this.groupBoxTransceiver.Text = "Device plugins"; @@ -103,7 +103,7 @@ this.gridPlugins.Name = "gridPlugins"; this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; - this.gridPlugins.Size = new System.Drawing.Size(464, 240); + this.gridPlugins.Size = new System.Drawing.Size(472, 208); this.gridPlugins.TabIndex = 0; this.gridPlugins.TabStop = true; this.gridPlugins.ToolTipText = ""; @@ -116,7 +116,7 @@ this.toolStripButtonHelp}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; - this.toolStrip.Size = new System.Drawing.Size(496, 25); + this.toolStrip.Size = new System.Drawing.Size(504, 25); this.toolStrip.TabIndex = 4; // // toolStripButtonDetect @@ -151,16 +151,18 @@ // // Config // + this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(496, 343); + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(504, 304); this.Controls.Add(this.toolStrip); this.Controls.Add(this.checkBoxRunAtBoot); this.Controls.Add(this.groupBoxTransceiver); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(504, 370); + this.MinimumSize = new System.Drawing.Size(480, 298); this.Name = "Config"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "IR Server - Configuration"; Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -32,9 +32,10 @@ PluginBase[] _transceivers; - bool _abstractRemoteMode; - IRServerMode _mode = IRServerMode.ServerMode; - string _hostComputer = String.Empty; + bool _abstractRemoteMode = false; + IRServerMode _mode = IRServerMode.ServerMode; + string _hostComputer = String.Empty; + string _processPriority = String.Empty; #endregion Variables @@ -55,6 +56,11 @@ get { return _hostComputer; } set { _hostComputer = value; } } + public string ProcessPriority + { + get { return _processPriority; } + set { _processPriority = value; } + } public string[] PluginReceive { @@ -253,7 +259,7 @@ SourceGrid.Cells.ColumnHeader header = new SourceGrid.Cells.ColumnHeader(" "); header.AutomaticSortEnabled = false; gridPlugins[row, ColIcon] = header; - + gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); @@ -367,14 +373,16 @@ Advanced advanced = new Advanced(); advanced.AbstractRemoteMode = _abstractRemoteMode; - advanced.Mode = _mode; - advanced.HostComputer = _hostComputer; + advanced.Mode = _mode; + advanced.HostComputer = _hostComputer; + advanced.ProcessPriority = _processPriority; if (advanced.ShowDialog(this) == DialogResult.OK) { _abstractRemoteMode = advanced.AbstractRemoteMode; - _mode = advanced.Mode; - _hostComputer = advanced.HostComputer; + _mode = advanced.Mode; + _hostComputer = advanced.HostComputer; + _processPriority = advanced.ProcessPriority; } } void ShowHelp() Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.resx 2008-03-08 14:19:16 UTC (rev 1439) @@ -121,7 +121,7 @@ <value>17, 17</value> </metadata> <metadata name="toolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>200, 17</value> + <value>107, 17</value> </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Data; +using System.Diagnostics; using System.IO; using System.Net; using System.Net.Sockets; @@ -68,6 +69,7 @@ bool _abstractRemoteMode; IRServerMode _mode; string _hostComputer; + string _processPriority; string[] _pluginNameReceive; List<PluginBase> _pluginReceive; @@ -161,6 +163,25 @@ LoadSettings(); + #region Process Priority Adjustment + + if (!_processPriority.Equals("No Change", StringComparison.OrdinalIgnoreCase)) + { + try + { + ProcessPriorityClass priority = (ProcessPriorityClass)Enum.Parse(typeof(ProcessPriorityClass), _processPriority); + Process.GetCurrentProcess().PriorityClass = priority; + + IrssLog.Info("Process priority set to: {0}", _processPriority); + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + } + + #endregion Process Priority Adjustment + #region Load plugin(s) _pluginReceive = null; @@ -344,7 +365,6 @@ _abstractRemoteButtons = new DataSet("AbstractRemoteButtons"); _abstractRemoteButtons.CaseSensitive = true; - List<string> receivers = new List<string>(_pluginReceive.Count); foreach (PluginBase plugin in _pluginReceive) if (plugin is IRemoteReceiver) LoadAbstractDeviceFiles(plugin.Name); @@ -471,24 +491,30 @@ try { - Config config = new Config(); - config.Mode = _mode; - config.HostComputer = _hostComputer; - config.PluginReceive = _pluginNameReceive; - config.PluginTransmit = _pluginNameTransmit; + Config config = new Config(); + config.AbstractRemoteMode = _abstractRemoteMode; + config.Mode = _mode; + config.HostComputer = _hostComputer; + config.ProcessPriority = _processPriority; + config.PluginReceive = _pluginNameReceive; + config.PluginTransmit = _pluginNameTransmit; if (config.ShowDialog() == DialogResult.OK) { - if ((_mode != config.Mode) || - (_hostComputer != config.HostComputer) || - (_pluginNameReceive != config.PluginReceive) || + if ((_abstractRemoteMode != config.AbstractRemoteMode) || + (_mode != config.Mode) || + (_hostComputer != config.HostComputer) || + (_processPriority != config.ProcessPriority) || + (_pluginNameReceive != config.PluginReceive) || (_pluginNameTransmit != config.PluginTransmit) ) { Stop(); // Shut down communications // Change settings ... + _abstractRemoteMode = config.AbstractRemoteMode; _mode = config.Mode; _hostComputer = config.HostComputer; + _processPriority = config.ProcessPriority; _pluginNameReceive = config.PluginReceive; _pluginNameTransmit = config.PluginTransmit; @@ -653,7 +679,7 @@ StopClient(); - MessageBox.Show("Please report this error.", "IR Server - Communications failure", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("Please report this error", "IR Server - Communications failure", MessageBoxButtons.OK, MessageBoxIcon.Error); } void Connected(object obj) { @@ -1190,29 +1216,33 @@ // If the remote maps are not already loaded for this device then attempt to load them if (!foundDevice) - LoadAbstractDeviceFiles(deviceName); + foundDevice = LoadAbstractDeviceFiles(deviceName); - // Find abstract button mapping - string abstractButton = LookupAbstractButton(deviceName, keyCode); - if (String.IsNullOrEmpty(abstractButton)) + // If the device map is loaded then try to convert the button to abstract + if (foundDevice) { - IrssLog.Info("Abstract Remote Button mapped from forwarded remote event: {0}", abstractButton); + // Find abstract button mapping + string abstractButton = LookupAbstractButton(deviceName, keyCode); + if (String.IsNullOrEmpty(abstractButton)) + { + IrssLog.Info("Abstract Remote Button mapped from forwarded remote event: {0}", abstractButton); - // Encode new message ... - byte[] deviceNameBytes = Encoding.ASCII.GetBytes("Abstract"); - byte[] keyCodeBytes = Encoding.ASCII.GetBytes(abstractButton); + // Encode new message ... + byte[] deviceNameBytes = Encoding.ASCII.GetBytes("Abstract"); + byte[] keyCodeBytes = Encoding.ASCII.GetBytes(abstractButton); - data = new byte[8 + deviceNameBytes.Length + keyCodeBytes.Length]; + data = new byte[8 + deviceNameBytes.Length + keyCodeBytes.Length]; - BitConverter.GetBytes(deviceNameBytes.Length).CopyTo(data, 0); - deviceNameBytes.CopyTo(data, 4); - BitConverter.GetBytes(keyCodeBytes.Length).CopyTo(data, 4 + deviceNameBytes.Length); - keyCodeBytes.CopyTo(data, 8 + deviceNameBytes.Length); + BitConverter.GetBytes(deviceNameBytes.Length).CopyTo(data, 0); + deviceNameBytes.CopyTo(data, 4); + BitConverter.GetBytes(keyCodeBytes.Length).CopyTo(data, 4 + deviceNameBytes.Length); + keyCodeBytes.CopyTo(data, 8 + deviceNameBytes.Length); + } + else + { + IrssLog.Info("Abstract Remote Button not found for forwarded remote event: {0} ({1})", deviceName, keyCode); + } } - else - { - IrssLog.Info("Abstract Remote Button not found for forwarded remote event: {0} ({1})", deviceName, keyCode); - } } IrssMessage forward = new IrssMessage(MessageType.RemoteEvent, MessageFlags.Notify, data); @@ -1624,6 +1654,7 @@ _abstractRemoteMode = false; _mode = IRServerMode.ServerMode; _hostComputer = String.Empty; + _processPriority = "No Change"; _pluginNameReceive = null; _pluginNameTransmit = String.Empty; @@ -1664,6 +1695,9 @@ try { _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value; } catch (Exception ex) { IrssLog.Warn(ex.ToString()); } + try { _processPriority = doc.DocumentElement.Attributes["ProcessPriority"].Value; } + catch (Exception ex) { IrssLog.Warn(ex.ToString()); } + try { _pluginNameTransmit = doc.DocumentElement.Attributes["PluginTransmit"].Value; } catch (Exception ex) { IrssLog.Warn(ex.ToString()); } @@ -1693,6 +1727,7 @@ writer.WriteAttributeString("AbstractRemoteMode", _abstractRemoteMode.ToString()); writer.WriteAttributeString("Mode", Enum.GetName(typeof(IRServerMode), _mode)); writer.WriteAttributeString("HostComputer", _hostComputer); + writer.WriteAttributeString("ProcessPriority", _processPriority); writer.WriteAttributeString("PluginTransmit", _pluginNameTransmit); if (_pluginNameReceive != null) @@ -1763,10 +1798,10 @@ DataRow[] rows = table.Select(expression); if (rows.Length == 1) { - string button = rows[0]["AbstractButton"].ToString() as string; + string button = rows[0]["AbstractButton"] as string; if (!String.IsNullOrEmpty(button)) { - IrssLog.Debug(button + ", remote: " + table.ExtendedProperties["Remote"] as string + ", device: " + deviceName); + IrssLog.Debug("{0}, remote: {1}, device: {2}", button, table.ExtendedProperties["Remote"] as string, deviceName); return button; } } @@ -1779,34 +1814,49 @@ } return null; - //return String.Format("{0} ({1})", deviceName, keyCode); } - void LoadAbstractDeviceFiles(string device) + bool LoadAbstractDeviceFiles(string device) { + if (String.IsNullOrEmpty(device)) + return false; + string path = Path.Combine(AbstractRemoteMapFolder, device); - string[] files = Directory.GetFiles(path, "*.xml", SearchOption.TopDirectoryOnly); - foreach (string file in files) + if (Directory.Exists(path)) + return false; + + try { - string remote = Path.GetFileNameWithoutExtension(file); - string tableName = String.Format("{0}:{1}", device, remote); - if (_abstractRemoteButtons.Tables.Contains(tableName)) + string[] files = Directory.GetFiles(path, "*.xml", SearchOption.TopDirectoryOnly); + foreach (string file in files) { - IrssLog.Warn("Abstract Remote Table already loaded ({0})", tableName); - continue; - } + string remote = Path.GetFileNameWithoutExtension(file); + string tableName = String.Format("{0}:{1}", device, remote); + if (_abstractRemoteButtons.Tables.Contains(tableName)) + { + IrssLog.Warn("Abstract Remote Table already loaded ({0})", tableName); + continue; + } - DataTable table = _abstractRemoteButtons.Tables.Add("RemoteTable"); - table.ReadXmlSchema(AbstractRemoteSchemaFile); - table.ReadXml(file); + DataTable table = _abstractRemoteButtons.Tables.Add("RemoteTable"); + table.ReadXmlSchema(AbstractRemoteSchemaFile); + table.ReadXml(file); - table.ExtendedProperties.Add("Device", device); - table.ExtendedProperties.Add("Remote", remote); + table.ExtendedProperties.Add("Device", device); + table.ExtendedProperties.Add("Remote", remote); - table.TableName = tableName; + table.TableName = tableName; - IrssLog.Info("Abstract Remote Table ({0}) loaded", tableName); + IrssLog.Info("Abstract Remote Table ({0}) loaded", tableName); + } } + catch (Exception ex) + { + IrssLog.Error(ex); + return false; + } + + return true; } #endregion Implementation Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -227,8 +227,10 @@ // // Advanced // + 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(400, 304); this.Controls.Add(this.groupBoxPriority); this.Controls.Add(this.groupBoxAbstractRemoteModel); Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -1,8 +1,8 @@ using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; -using System.ComponentModel; using System.Drawing; using System.Text; using System.Windows.Forms; @@ -60,7 +60,7 @@ { get { - return comboBoxPriority.SelectedText; + return comboBoxPriority.SelectedItem as string; } set { @@ -103,6 +103,7 @@ private void buttonExclusions_Click(object sender, EventArgs e) { + /* Exclusions exclusions = new Exclusions(new string[] { "plugin1", "plugin2", "plugin3" }); exclusions.ExclusionList = new string[] { "plugin1" }; @@ -110,6 +111,7 @@ { } + */ } private void radioButtonServer_CheckedChanged(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-08 14:19:16 UTC (rev 1439) @@ -138,15 +138,17 @@ // // Config // + this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(504, 305); + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(504, 304); this.Controls.Add(this.toolStrip); this.Controls.Add(this.groupBoxTransceiver); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(512, 332); + this.MinimumSize = new System.Drawing.Size(480, 298); this.Name = "Config"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Input Service Configuration"; Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj 2008-03-08 13:49:45 UTC (rev 1438) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj 2008-03-08 14:19:16 UTC (rev 1439) @@ -70,12 +70,6 @@ <Compile Include="Config.Designer.cs"> <DependentUpon>Config.cs</DependentUpon> </Compile> - <Compile Include="Exclusions.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Exclusions.Designer.cs"> - <DependentUpon>Exclusions.cs</DependentUpon> - </Compile> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\Resources.Designer.cs"> @@ -91,10 +85,6 @@ <DependentUpon>Config.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> - <EmbeddedResource Include="Exclusions.resx"> - <SubType>Designer</SubType> - <DependentUpon>Exclusions.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-11 03:30:04
|
Revision: 1444 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1444&view=rev Author: and-81 Date: 2008-03-10 20:29:59 -0700 (Mon, 10 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/PluginBase.cs trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/KeyboardInputRelay.exe.manifest trunk/plugins/IR Server Suite/IR Server Suite.nsi trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Technotrend/ trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Technotrend/Technotrend.xml Removed Paths: ------------- trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi Modified: trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-11 03:29:59 UTC (rev 1444) @@ -37,7 +37,7 @@ </ItemGroup> <ItemGroup> <Content Include="HcwPvrTuner.exe.manifest"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> Modified: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj 2008-03-11 03:29:59 UTC (rev 1444) @@ -70,6 +70,11 @@ <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> + <ItemGroup> + <Content Include="KeyboardInputRelay.exe.manifest"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/KeyboardInputRelay.exe.manifest =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/KeyboardInputRelay.exe.manifest (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/KeyboardInputRelay.exe.manifest 2008-03-11 03:29:59 UTC (rev 1444) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8" ?> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" > + <assemblyIdentity version="1.0.4.2" processorArchitecture="X86" name="KeyboardInputRelay" type="win32" /> + <description>Relays keyboard input to the input service to use like remote button presses</description> + <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> + <security> + <requestedPrivileges> + <requestedExecutionLevel level="requireAdministrator" /> + </requestedPrivileges> + </security> + </trustInfo> +</assembly> Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -105,6 +105,9 @@ #region Constructor + /// <summary> + /// Initializes a new instance of the <see cref="MainForm"/> class. + /// </summary> public MainForm() { InitializeComponent(); @@ -361,27 +364,28 @@ { if (MessageBox.Show(this, String.Format("Do you want to use the default settings for {0} ({1})?", progSettings.Name, programFile), "Default settings available", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { - List<ButtonMapping> mappings = LoadDefaultSettings(settingsFile); + AppProfile appProfile = LoadDefaultSettings(settingsFile); - if (mappings != null) + if (appProfile != null) { - progSettings.ButtonMappings.AddRange(mappings); + progSettings.ButtonMappings.AddRange(appProfile.ButtonMappings); RefreshButtonList(); } } } */ + } } - List<ButtonMapping> LoadDefaultSettings(string settingsFile) + AppProfile LoadDefaultSettings(string settingsFile) { try { - XmlSerializer reader = new XmlSerializer(typeof(List<ButtonMapping>)); + XmlSerializer reader = new XmlSerializer(typeof(AppProfile)); using (StreamReader file = new StreamReader(settingsFile)) - return (List<ButtonMapping>)reader.Deserialize(file); + return (AppProfile)reader.Deserialize(file); } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -336,10 +336,10 @@ item.Tag = Menus.Power; listViewMenu.Items.Add(item); - //item = new ListViewItem(UITextAudio, 2); - //item.ToolTipText = DescAudio; - //item.Tag = Menus.Audio; - //listViewMenu.Items.Add(item); + item = new ListViewItem(UITextAudio, 2); + item.ToolTipText = DescAudio; + item.Tag = Menus.Audio; + listViewMenu.Items.Add(item); item = new ListViewItem(UITextEject, 3); item.ToolTipText = DescEject; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -47,6 +47,7 @@ static ClientMessageSink _handleMessage; static bool _inConfiguration; + static bool _menuFormVisible; static IRServerInfo _irServerInfo = new IRServerInfo(); @@ -79,7 +80,6 @@ static NotifyIcon _notifyIcon; static MainForm _mainForm; - static MenuForm _menuForm; static Client _client; static Configuration _config; static CopyDataWM _copyDataWM; @@ -133,7 +133,8 @@ IrssLog.Warn(String.Format("Failed to load configuration file ({0}), creating new configuration", ConfigFile)); _config = new Configuration(); } - + + /* foreach (ProgramSettings progSettings in _config.Programs) { AppProfile profile = new AppProfile(); @@ -145,21 +146,19 @@ AppProfile.Save(profile, "C:\\" + profile.Name + ".xml"); } + */ + // Setup the main form ... + _mainForm = new MainForm(); + // Setup notify icon ... _notifyIcon = new NotifyIcon(); - _notifyIcon.ContextMenuStrip = new ContextMenuStrip(); + _notifyIcon.ContextMenuStrip = new ContextMenuStrip(_mainForm.Container); _notifyIcon.Icon = Properties.Resources.Icon16Connecting; _notifyIcon.Text = "Translator - Connecting ..."; _notifyIcon.DoubleClick += new EventHandler(ClickSetup); _notifyIcon.Visible = false; - // Setup the Translator Menu ... - _menuForm = new MenuForm(); - - // Setup the main form ... - _mainForm = new MainForm(); - // Start server communications ... bool clientStarted = false; @@ -321,7 +320,7 @@ { IrssLog.Info("Show OSD"); - if (_menuForm.Visible) + if (_menuFormVisible) { IrssLog.Info("OSD already visible"); } @@ -337,7 +336,12 @@ { try { - _menuForm.ShowDialog(); + _menuFormVisible = true; + + using (MenuForm menuForm = new MenuForm()) + menuForm.ShowDialog(); + + _menuFormVisible = false; } catch (Exception ex) { @@ -521,26 +525,26 @@ case "Volume Up": // TODO: Replace with Volume Commands Win32.SendWindowsMessage( - Win32.ForegroundWindow(), + Win32.GetDesktopWindowHandle(), (int)Win32.WindowsMessage.WM_APPCOMMAND, - (int)Win32.AppCommand.APPCOMMAND_VOLUME_UP, - 0); + 0, + 65536 * (int)Win32.AppCommand.APPCOMMAND_VOLUME_UP); break; case "Volume Down": Win32.SendWindowsMessage( - Win32.ForegroundWindow(), + Win32.GetDesktopWindowHandle(), (int)Win32.WindowsMessage.WM_APPCOMMAND, - (int)Win32.AppCommand.APPCOMMAND_VOLUME_DOWN, - 0); + 0, + 65536 * (int)Win32.AppCommand.APPCOMMAND_VOLUME_DOWN); break; case "Volume Mute": Win32.SendWindowsMessage( - Win32.ForegroundWindow(), + Win32.GetDesktopWindowHandle(), (int)Win32.WindowsMessage.WM_APPCOMMAND, - (int)Win32.AppCommand.APPCOMMAND_VOLUME_MUTE, - 0); + 0, + 65536 * (int)Win32.AppCommand.APPCOMMAND_VOLUME_MUTE); break; default: Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -158,10 +158,16 @@ /// </returns> public override bool Detect() { - InitDeviceList(); + try + { + InitDeviceList(); - if (_deviceList.Count != 0) - return true; + if (_deviceList.Count != 0) + return true; + } + catch + { + } return false; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/PluginBase.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/PluginBase.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/PluginBase.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -60,6 +60,7 @@ /// <summary> /// Detect the presence of this device. Devices that cannot be detected will always return false. + /// This method should not throw exceptions. /// </summary> /// <returns><c>true</c> if the device is present, otherwise <c>false</c>.</returns> public virtual bool Detect() { return false; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -243,17 +243,21 @@ /// </returns> public override bool Detect() { - LoadSettings(); + try + { + LoadSettings(); - if (Connect(_irTransServerAddress, _irTransServerPort)) - { - _socket.Close(); - return true; + if (Connect(_irTransServerAddress, _irTransServerPort)) + { + _socket.Close(); + return true; + } } - else + catch { - return false; } + + return false; } /// <summary> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs 2008-03-11 03:29:59 UTC (rev 1444) @@ -7,10 +7,7 @@ using System.Drawing; using System.IO; using System.Runtime.InteropServices; -using System.Windows.Forms; -using Microsoft.Win32.SafeHandles; - namespace InputService.Plugin { @@ -22,11 +19,6 @@ #region Debug - static void xRemote(string deviceName, string code) - { - Console.WriteLine("Remote: {0}", code); - } - [STAThread] static void Main() { @@ -36,11 +28,12 @@ //c.Configure(null); - c.RemoteCallback += new RemoteHandler(xRemote); + //c.RemoteCallback += new RemoteHandler(xRemote); c.Start(); - Application.Run(); + Console.ReadKey(); + //System.Windows.Forms.Application.Run(); c.Stop(); c = null; @@ -82,7 +75,11 @@ /// <summary> /// USB 2.0 Pinnacle. /// </summary> - USB_2_PINNACLE + USB_2_PINNACLE, + /// <summary> + /// USB 2.0 DSS. + /// </summary> + USB_2_DSS, } /// <summary> @@ -153,43 +150,48 @@ /// <summary> /// f operation finished with ilegal pointer. /// </summary> - RET_ERROR_POINTER + RET_ERROR_POINTER, } #endregion Enumerations #region Delegates - delegate void PIRCBFCN(IntPtr Context, ref int Buf); + /// <summary> + /// Called by the Technotrend api dll to signal a remote button has been received. + /// </summary> + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + unsafe delegate void CallbackDef(int context, uint* buffer); #endregion Delegates #region Interop [DllImport("ttBdaDrvApi_Dll.dll", EntryPoint = "bdaapiEnumerate")] - static extern UInt32 bdaapiEnumerate(DEVICE_CAT DevType); + static extern UInt32 bdaapiEnumerate(DEVICE_CAT deviceType); [DllImport("ttBdaDrvApi_Dll.dll", EntryPoint = "bdaapiOpen")] - static extern IntPtr bdaapiOpen(DEVICE_CAT DevType, uint uiDevID); + static extern IntPtr bdaapiOpen(DEVICE_CAT deviceType, uint deviceId); [DllImport("ttBdaDrvApi_Dll.dll", EntryPoint = "bdaapiClose")] - static extern void bdaapiClose(IntPtr hOpen); + static extern void bdaapiClose(IntPtr handle); [DllImport("ttBdaDrvApi_Dll.dll", EntryPoint = "bdaapiOpenIR")] - static extern TYPE_RET_VAL bdaapiOpenIR(IntPtr hOpen, PIRCBFCN CallbackFcn, IntPtr Context); + static extern TYPE_RET_VAL bdaapiOpenIR(IntPtr handle, IntPtr callback, int context); [DllImport("ttBdaDrvApi_Dll.dll", EntryPoint = "bdaapiCloseIR")] - static extern TYPE_RET_VAL bdaapiCloseIR(IntPtr hOpen); + static extern TYPE_RET_VAL bdaapiCloseIR(IntPtr handle); #endregion Interop #region Variables - RemoteHandler _remoteButtonHandler; - List<IntPtr> _handles; - PIRCBFCN _callback; + CallbackDef _callback; + IntPtr _callbackPtr; + RemoteHandler _remoteButtonHandler; + int _lastTrigger = -1; int _lastCode = -1; DateTime _lastCodeTime = DateTime.Now; @@ -203,8 +205,13 @@ /// </summary> public TechnotrendReceiver() { - _handles = new List<IntPtr>(); - _callback = new PIRCBFCN(OnIRCode); + _handles = new List<IntPtr>(); + + unsafe + { + _callback = new CallbackDef(OnIRCode); + _callbackPtr = Marshal.GetFunctionPointerForDelegate(_callback); + } } #endregion Constructor @@ -246,29 +253,35 @@ IntPtr handle; TYPE_RET_VAL error; - for (DEVICE_CAT cat = DEVICE_CAT.UNKNOWN; cat <= DEVICE_CAT.USB_2_PINNACLE; cat++) + try { - if (bdaapiEnumerate(cat) > 0) + for (DEVICE_CAT cat = DEVICE_CAT.UNKNOWN; cat <= DEVICE_CAT.USB_2_DSS; cat++) { - handle = bdaapiOpen(cat, 0); - try + if (bdaapiEnumerate(cat) > 0) { - if ((handle != IntPtr.Zero) && (handle.ToInt32() != -1)) + handle = bdaapiOpen(cat, 0); + try { - error = bdaapiOpenIR(handle, _callback, IntPtr.Zero); + if ((handle != IntPtr.Zero) && (handle.ToInt32() != -1)) + { + error = bdaapiOpenIR(handle, _callbackPtr, 0); - bdaapiClose(handle); + bdaapiClose(handle); - if (error == TYPE_RET_VAL.RET_SUCCESS) - return true; + if (error == TYPE_RET_VAL.RET_SUCCESS) + return true; + } } + catch + { + bdaapiClose(handle); + } } - catch - { - bdaapiClose(handle); - } } } + catch + { + } return false; } @@ -281,14 +294,14 @@ IntPtr handle; TYPE_RET_VAL error; - for (DEVICE_CAT cat = DEVICE_CAT.UNKNOWN; cat <= DEVICE_CAT.USB_2_PINNACLE; cat++) + for (DEVICE_CAT cat = DEVICE_CAT.UNKNOWN; cat <= DEVICE_CAT.USB_2_DSS; cat++) { if (bdaapiEnumerate(cat) > 0) { handle = bdaapiOpen(cat, 0); if ((handle != IntPtr.Zero) && (handle.ToInt32() != -1)) { - error = bdaapiOpenIR(handle, _callback, IntPtr.Zero); + error = bdaapiOpenIR(handle, _callbackPtr, 0); if (error == TYPE_RET_VAL.RET_SUCCESS) { _handles.Add(handle); @@ -331,7 +344,7 @@ bdaapiCloseIR(handle); bdaapiClose(handle); } - + _handles.Clear(); } @@ -346,63 +359,37 @@ } /// <summary> - /// Called when an IR Command is received. + /// Called when an IR code is received. /// </summary> - /// <param name="Context">The context.</param> - /// <param name="Buf">The buffer.</param> - void OnIRCode(IntPtr Context, ref int Buf) + /// <param name="context">The context.</param> + /// <param name="buffer">The code.</param> + unsafe void OnIRCode(int context, uint *buffer) { - //if (Buf == IntPtr.Zero) - //return; - try { - int code = Buf; - /* - try - { - code = Marshal.ReadInt32(Buf); - } - catch (Exception ex) - { - Console.WriteLine("Marshal.ReadInt32(Buf) failed, trying ToInt32 method ..."); - Console.WriteLine(ex.ToString()); - } + int code = ((int)buffer[0]) & 0x00FF; + int trigger = ((int)buffer[0]) & 0x0800; - try - { - code = Buf.ToInt32(); - } - catch (Exception ex) - { - Console.WriteLine("Buf.ToInt32() method failed."); - Console.WriteLine(ex.ToString()); - } - */ - int trigger = code & 0x800; - code = code & 0x3F; - DateTime now = DateTime.Now; TimeSpan timeSpan = now - _lastCodeTime; if (code != _lastCode || trigger != _lastTrigger || timeSpan.Milliseconds >= 250) { if (_remoteButtonHandler != null) - _remoteButtonHandler(this.Name, code.ToString()); + _remoteButtonHandler("Technotrend", code.ToString()); _lastCodeTime = now; } _lastCode = code; _lastTrigger = trigger; - } - catch (Exception ex) + catch { - Console.WriteLine(ex.ToString()); + //MessageBox.Show(ex.ToString()); } } - + #endregion Implementation } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj 2008-03-11 03:29:59 UTC (rev 1444) @@ -25,6 +25,7 @@ <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <UseVSHostingProcess>false</UseVSHostingProcess> <DocumentationFile>bin\Debug\Technotrend Receiver.XML</DocumentationFile> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> @@ -36,6 +37,7 @@ <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <UseVSHostingProcess>false</UseVSHostingProcess> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> @@ -60,7 +62,6 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="System.Drawing" /> - <Reference Include="System.Windows.Forms" /> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> Deleted: trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-03-11 03:29:59 UTC (rev 1444) @@ -1,839 +0,0 @@ -;====================================== -; IR Server Suite - Debug.nsi -; -; (C) Copyright Aaron Dinnage, 2008 -;====================================== - -!include "x64.nsh" -!include "MUI.nsh" - -!define PRODUCT_NAME "IR Server Suite" -!define PRODUCT_VERSION "1.0.4.2" -!define PRODUCT_PUBLISHER "and-81" -!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/mce_replacement_plugin-f165.html" - -Name "${PRODUCT_NAME}" -OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" -InstallDir "" -ShowInstDetails show -ShowUninstDetails show -BrandingText "${PRODUCT_NAME} by Aaron Dinnage" -SetCompressor /SOLID /FINAL lzma -CRCCheck On - -; Variables -var DIR_INSTALL -var DIR_MEDIAPORTAL -var DIR_TVSERVER - -!define MUI_ABORTWARNING -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" - -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" -!insertmacro MUI_PAGE_COMPONENTS - -; Main app install path -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp -!insertmacro MUI_PAGE_DIRECTORY - -; MediaPortal install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP -!insertmacro MUI_PAGE_DIRECTORY - -; TV Server install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV -!insertmacro MUI_PAGE_DIRECTORY - -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH - -!insertmacro MUI_UNPAGE_INSTFILES - -!insertmacro MUI_LANGUAGE "English" - -;====================================== -;====================================== - -!macro initRegKeys - ${If} ${RunningX64} - - SetRegView 64 - - ${DisableX64FSRedirection} - - ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" - ${If} $DIR_INSTALL == "" - StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' - ${Endif} - - ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" - ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' - ${Endif} - - ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" - ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' - ${Endif} - - ${EnableX64FSRedirection} - - ${Else} - - SetRegView 32 - - ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" - ${If} $DIR_INSTALL == "" - StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' - ${Endif} - - ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" - ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' - ${Endif} - - ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" - ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' - ${Endif} - - ${Endif} -!macroend - -;====================================== -;====================================== - -Function .onInit - -!insertmacro initRegKeys - -FunctionEnd - -;====================================== - -Function .onInstSuccess - - IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService - -StartInputService: - Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' - -SkipStartInputService: - -FunctionEnd - -;====================================== - -Function DirectoryPreMP - SectionGetFlags 3 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - SectionGetFlags 4 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - SectionGetFlags 5 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - Abort - -EndDirectoryPreMP: -FunctionEnd - -;====================================== - -Function DirectoryPreTV - SectionGetFlags 6 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreTV - - Abort - -EndDirectoryPreTV: -FunctionEnd - -;====================================== - -Function DirectoryShowApp - !insertmacro MUI_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" "Choose the folder in which to install ${PRODUCT_NAME}." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." -FunctionEnd - -;====================================== - -Function DirectoryShowMP - !insertmacro MUI_HEADER_TEXT "Choose MediaPortal Location" "Choose the folder in which to install MediaPortal plugins." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." -FunctionEnd - -;====================================== - -Function DirectoryShowTV - !insertmacro MUI_HEADER_TEXT "Choose TV Server Location" "Choose the folder in which to install TV Server plugins." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "TV Server Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_TVSERVER" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." -FunctionEnd - -;====================================== - -Function DirectoryLeaveApp - StrCpy $DIR_INSTALL $INSTDIR -FunctionEnd - -;====================================== - -Function DirectoryLeaveMP - StrCpy $DIR_MEDIAPORTAL $INSTDIR -FunctionEnd - -;====================================== - -Function DirectoryLeaveTV - StrCpy $DIR_TVSERVER $INSTDIR -FunctionEnd - -;====================================== -;====================================== - -Section "-Prepare" - - DetailPrint "Preparing to install ..." - - ; Use the all users context - SetShellVarContext all - - ; Kill running Programs - DetailPrint "Terminating processes ..." - ExecWait '"taskkill" /F /IM Translator.exe' - ExecWait '"taskkill" /F /IM TrayLauncher.exe' - ExecWait '"taskkill" /F /IM WebRemote.exe' - ExecWait '"taskkill" /F /IM VirtualRemote.exe' - ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' - ExecWait '"taskkill" /F /IM IRFileTool.exe' - ExecWait '"taskkill" /F /IM DebugClient.exe' - ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' - - IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StopInputService SkipStopInputService - -StopInputService: - ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /stop' - -SkipStopInputService: - Sleep 100 - -SectionEnd - -;====================================== - -Section "-Core" - - DetailPrint "Setting up paths and installing core files ..." - - ; Use the all users context - SetShellVarContext all - - CreateDirectory "$APPDATA\${PRODUCT_NAME}" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Logs" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR Commands" - - ; Copy known set top boxes - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" - SetOutPath "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" - SetOverwrite ifnewer - File /r /x .svn "Set Top Boxes\*.*" - - ; Create a start menu shortcut folder - CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" - -SectionEnd - -;====================================== - -Section "Input Service" SectionInputService - - DetailPrint "Installing Input Service ..." - - ; Use the all users context - SetShellVarContext all - - ; Uninstall current Input Service ... - IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService - -UninstallInputService: - ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' - -SkipUninstallInputService: - Sleep 100 - - ; Installing Input Service - CreateDirectory "$DIR_INSTALL\Input Service" - SetOutPath "$DIR_INSTALL\Input Service" - SetOverwrite ifnewer - File "Input Service\Input Service\bin\Debug\*.*" - - ; Installing Input Service Configuration - CreateDirectory "$DIR_INSTALL\Input Service Configuration" - SetOutPath "$DIR_INSTALL\Input Service Configuration" - SetOverwrite ifnewer - File "Input Service\Input Service Configuration\bin\Debug\*.*" - - ; Install IR Server Plugins ... - DetailPrint "Installing IR Server Plugins ..." - CreateDirectory "$DIR_INSTALL\IR Server Plugins" - SetOutPath "$DIR_INSTALL\IR Server Plugins" - SetOverwrite ifnewer - - File "IR Server Plugins\Ads Tech PTV-335 Receiver\bin\Debug\Ads Tech PTV-335 Receiver.*" - File "IR Server Plugins\CoolCommand Receiver\bin\Debug\CoolCommand Receiver.*" - File "IR Server Plugins\Custom HID Receiver\bin\Debug\Custom HID Receiver.*" - File "IR Server Plugins\Direct Input Receiver\bin\Debug\Direct Input Receiver.*" - File "IR Server Plugins\FusionRemote Receiver\bin\Debug\FusionRemote Receiver.*" - File "IR Server Plugins\Girder Plugin\bin\Debug\Girder Plugin.*" - File "IR Server Plugins\HCW Receiver\bin\Debug\HCW Receiver.*" - File "IR Server Plugins\IgorPlug Receiver\bin\Debug\IgorPlug Receiver.*" - ;File "IR Server Plugins\IR501 Receiver\bin\Debug\IR501 Receiver.*" - File "IR Server Plugins\IR507 Receiver\bin\Debug\IR507 Receiver.*" - ;File "IR Server Plugins\Ira Transceiver\bin\Debug\Ira Transceiver.*" - File "IR Server Plugins\IRMan Receiver\bin\Debug\IRMan Receiver.*" - File "IR Server Plugins\IRTrans Transceiver\bin\Debug\IRTrans Transceiver.*" - ;File "IR Server Plugins\Keyboard Input\bin\Debug\Keyboard Input.*" - File "IR Server Plugins\LiveDrive Receiver\bin\Debug\LiveDrive Receiver.*" - File "IR Server Plugins\MacMini Receiver\bin\Debug\MacMini Receiver.*" - File "IR Server Plugins\Microsoft MCE Transceiver\bin\Debug\Microsoft MCE Transceiver.*" - ;File "IR Server Plugins\RC102 Receiver\bin\Debug\RC102 Receiver.*" - File "IR Server Plugins\RedEye Blaster\bin\Debug\RedEye Blaster.*" - File "IR Server Plugins\Serial IR Blaster\bin\Debug\Serial IR Blaster.*" - ;File "IR Server Plugins\Speech Receiver\bin\Debug\Speech Receiver.*" - File "IR Server Plugins\Technotrend Receiver\bin\Debug\Technotrend Receiver.*" - ;File "IR Server Plugins\Tira Transceiver\bin\Debug\Tira Transceiver.*" - File "IR Server Plugins\USB-UIRT Transceiver\bin\Debug\USB-UIRT Transceiver.*" - File "IR Server Plugins\Wii Remote Receiver\bin\Debug\Wii Remote Receiver.*" - File "IR Server Plugins\WiimoteLib\bin\Debug\WiimoteLib.*" - File "IR Server Plugins\Windows Message Receiver\bin\Debug\Windows Message Receiver.*" - File "IR Server Plugins\WinLirc Transceiver\bin\Debug\WinLirc Transceiver.*" - File "IR Server Plugins\X10 Transceiver\bin\Debug\X10 Transceiver.*" - File "IR Server Plugins\X10 Transceiver\bin\Debug\Interop.X10.dll" - File "IR Server Plugins\XBCDRC Receiver\bin\Debug\XBCDRC Receiver.*" - - ; Create App Data Folder for IR Server configuration files. - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" - SetOutPath "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" - SetOverwrite ifnewer - File /r /x .svn "Input Service\Input Service\Abstract Remote Maps\*.*" - File "Input Service\Input Service\RemoteTable.xsd" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Input Service Configuration.lnk" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" "" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" 0 - - ; Launch Input Service - DetailPrint "Starting Input Service ..." - ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /install' - -SectionEnd - -;====================================== - -Section "MP Control Plugin" SectionMPControlPlugin - - DetailPrint "Installing MP Control Plugin ..." - - ; Use the all users context - SetShellVarContext all - - ; Write plugin dll - SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" - SetOverwrite ifnewer - File "MediaPortal Plugins\MP Control Plugin\bin\Debug\MPUtils.dll" - File "MediaPortal Plugins\MP Control Plugin\bin\Debug\IrssComms.dll" - File "MediaPortal Plugins\MP Control Plugin\bin\Debug\IrssUtils.dll" - File "MediaPortal Plugins\MP Control Plugin\bin\Debug\MPControlPlugin.dll" - - ; Write input mapping - SetOutPath "$DIR_MEDIAPORTAL\InputDeviceMappings\defaults" - SetOverwrite ifnewer - File "MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" - - ; Write app data - CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" - SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" - SetOverwrite ifnewer - File /r /x .svn "MediaPortal Plugins\MP Control Plugin\AppData\*.*" - - ; Create Macro folder - CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin\Macro" - -SectionEnd - -;====================================== - -Section "MP Blast Zone Plugin" SectionMPBlastZonePlugin - - DetailPrint "Installing MP Blast Zone Plugin ..." - - ; Use the all users context - SetShellVarContext all - - ; Write plugin dll - SetOutPath "$DIR_MEDIAPORTAL\Plugins\Windows" - SetOverwrite ifnewer - File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\MPUtils.dll" - File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\IrssComms.dll" - File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\IrssUtils.dll" - File "MediaPortal Plugins\MP Blast Zone Plugin\bin\Debug\MPBlastZonePlugin.dll" - - ; Write app data - CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" - SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" - SetOverwrite off - File "MediaPortal Plugins\MP Blast Zone Plugin\AppData\Menu.xml" - - ; Write skin files - SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo" - SetOverwrite on - File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" - - SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo wide" - SetOverwrite on - File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" - - ; Create Macro folder - CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin\Macro" - -SectionEnd - -;====================================== - -Section "TV2 Blaster Plugin" SectionTV2BlasterPlugin - - DetailPrint "Installing TV2 Blaster Plugin ..." - - ; Use the all users context - SetShellVarContext all - - ; Write plugin dll - SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" - SetOverwrite ifnewer - File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\MPUtils.dll" - File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\IrssComms.dll" - File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\IrssUtils.dll" - File "MediaPortal Plugins\TV2 Blaster Plugin\bin\Debug\TV2BlasterPlugin.dll" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin\Macro" - -SectionEnd - -;====================================== - -Section /o "TV3 Blaster Plugin" SectionTV3BlasterPlugin - - DetailPrint "Installing TV3 Blaster Plugin ..." - - ; Use the all users context - SetShellVarContext all - - ; Write plugin dll - SetOutPath "$DIR_TVSERVER\Plugins" - SetOverwrite ifnewer - File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\MPUtils.dll" - File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\IrssComms.dll" - File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\IrssUtils.dll" - File "MediaPortal Plugins\TV3 Blaster Plugin\bin\Debug\TV3BlasterPlugin.dll" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin\Macro" - -SectionEnd - -;====================================== - -Section "Translator" SectionTranslator - - DetailPrint "Installing Translator ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing Translator - CreateDirectory "$DIR_INSTALL\Translator" - SetOutPath "$DIR_INSTALL\Translator" - SetOverwrite ifnewer - File "Applications\Translator\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Macro" - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" - - ; Copy in default settings files - SetOutPath "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" - SetOverwrite ifnewer - File "Applications\Translator\Default Settings\*.xml" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Translator.lnk" "$DIR_INSTALL\Translator\Translator.exe" "" "$DIR_INSTALL\Translator\Translator.exe" 0 - -SectionEnd - -;====================================== - -Section "Tray Launcher" SectionTrayLauncher - - DetailPrint "Installing Tray Launcher ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing Translator - CreateDirectory "$DIR_INSTALL\Tray Launcher" - SetOutPath "$DIR_INSTALL\Tray Launcher" - SetOverwrite ifnewer - File "Applications\Tray Launcher\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Tray Launcher" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Tray Launcher.lnk" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" "" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" 0 - -SectionEnd - -;====================================== - -Section "Virtual Remote" SectionVirtualRemote - - DetailPrint "Installing Virtual Remote, Skin Editor, Smart Device versions, and Web Remote..." - - ; Use the all users context - SetShellVarContext all - - ; Installing Virtual Remote and Web Remote - CreateDirectory "$DIR_INSTALL\Virtual Remote" - SetOutPath "$DIR_INSTALL\Virtual Remote" - SetOverwrite ifnewer - File "Applications\Virtual Remote\bin\Debug\*.*" - File "Applications\Web Remote\bin\Debug\WebRemote.*" - File "Applications\Virtual Remote Skin Editor\bin\Debug\VirtualRemoteSkinEditor.*" - - ; Installing skins - CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" - SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" - SetOverwrite ifnewer - File "Applications\Virtual Remote\Skins\*.*" - - ; Installing Virtual Remote for Smart Devices - CreateDirectory "$DIR_INSTALL\Virtual Remote\Smart Devices" - SetOutPath "$DIR_INSTALL\Virtual Remote\Smart Devices" - SetOverwrite ifnewer - File "Applications\Virtual Remote (PocketPC2003) Installer\Debug\*.cab" - File "Applications\Virtual Remote (Smartphone2003) Installer\Debug\*.cab" - File "Applications\Virtual Remote (WinCE5) Installer\Debug\*.cab" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote Skin Editor.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" 0 - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote for Smart Devices.lnk" "$DIR_INSTALL\Virtual Remote\Smart Devices" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 - -SectionEnd - -;====================================== - -Section "IR Blast" SectionIRBlast - - DetailPrint "Installing IR Blast ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing IR Server - CreateDirectory "$DIR_INSTALL\IR Blast" - SetOutPath "$DIR_INSTALL\IR Blast" - SetOverwrite ifnewer - File "Applications\IR Blast (No Window)\bin\Debug\*.*" - File "Applications\IR Blast\bin\Debug\IRBlast.exe" - -SectionEnd - -;====================================== - -Section "IR File Tool" SectionIRFileTool - - DetailPrint "Installing IR File Tool ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing IR Server - CreateDirectory "$DIR_INSTALL\IR File Tool" - SetOutPath "$DIR_INSTALL\IR File Tool" - SetOverwrite ifnewer - File "Applications\IR File Tool\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR File Tool" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\IR File Tool.lnk" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" "" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" 0 - -SectionEnd - -;====================================== - -Section "Keyboard Input Relay" SectionKeyboardInputRelay - - DetailPrint "Installing Keyboard Input Relay ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing IR Server - CreateDirectory "$DIR_INSTALL\Keyboard Input Relay" - SetOutPath "$DIR_INSTALL\Keyboard Input Relay" - SetOverwrite ifnewer - File "Applications\Keyboard Input Relay\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Keyboard Input Relay" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Keyboard Input Relay.lnk" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" "" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" 0 - -SectionEnd - -;====================================== - -Section "Dbox Tuner" SectionDboxTuner - - DetailPrint "Installing Dbox Tuner ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing IR Server - CreateDirectory "$DIR_INSTALL\Dbox Tuner" - SetOutPath "$DIR_INSTALL\Dbox Tuner" - SetOverwrite ifnewer - File "Applications\Dbox Tuner\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Dbox Tuner" - -SectionEnd - -;====================================== - -Section "HCW PVR Tuner" SectionHcwPvrTuner - - DetailPrint "Installing HCW PVR Tuner ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing IR Server - CreateDirectory "$DIR_INSTALL\HCW PVR Tuner" - SetOutPath "$DIR_INSTALL\HCW PVR Tuner" - SetOverwrite ifnewer - File "Applications\HCW PVR Tuner\bin\Debug\*.*" - -SectionEnd - -;====================================== - -Section "Debug Client" SectionDebugClient - - DetailPrint "Installing Debug Client ..." - - ; Use the all users context - SetShellVarContext all - - ; Installing Debug Client - CreateDirectory "$DIR_INSTALL\Debug Client" - SetOutPath "$DIR_INSTALL\Debug Client" - SetOverwrite ifnewer - File "Applications\Debug Client\bin\Debug\*.*" - - ; Create folders - CreateDirectory "$APPDATA\${PRODUCT_NAME}\Debug Client" - - ; Create start menu shortcut - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Debug Client.lnk" "$DIR_INSTALL\Debug Client\DebugClient.exe" "" "$DIR_INSTALL\Debug Client\DebugClient.exe" 0 - -SectionEnd - -;====================================== - -Section "-Complete" - - DetailPrint "Completing install ..." - - ; Use the all users context - SetShellVarContext all - - ; Write documentation - SetOutPath "$DIR_INSTALL" - SetOverwrite ifnewer - File "Documentation\${PRODUCT_NAME}.chm" - - ; Create website link file - WriteIniStr "$DIR_INSTALL\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" - - ; Write the uninstaller - WriteUninstaller "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" - - ; Create start menu shortcuts - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.chm" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.url" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Log Files.lnk" "$APPDATA\${PRODUCT_NAME}\Logs" - CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" "" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" - - ; Write the installation paths into the registry - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "Install_Dir" "$DIR_INSTALL" - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" "$DIR_MEDIAPORTAL" - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${PRODUCT_VERSION}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "${PRODUCT_PUBLISHER}" - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1 - - SetAutoClose false - -SectionEnd - -;====================================== -;====================================== - -; Section descriptions -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SectionInputService} "A windows service that provides access to your IR devices." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPControlPlugin} "Connects to the Input Service to control MediaPortal." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPBlastZonePlugin} "Lets you control your IR devices from within the MediaPortal GUI." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV2BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the default MediaPortal TV engine." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV3BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionTranslator} "Control your whole PC." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionTrayLauncher} "Simple tray application to launch an application of your choosing when a particular button is pressed." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote). Also includes a Skin Editor and Smart Device versions of Virtual Remote." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "Command line tools for blasting IR codes." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRFileTool} "Tool for learning, modifying, testing, correcting and converting IR command files." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionKeyboardInputRelay} "Relays keyboard input to the Input Service to act on keypresses like remote buttons." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDboxTuner} "Command line tuner for Dreambox devices." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionHcwPvrTuner} "Command line tuner for Hauppauge PVR devices." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionDebugClient} "Very simple testing tool for troubleshooting input and communications problems." -!insertmacro MUI_FUNCTION_DESCRIPTION_END - -;====================================== -;====================================== - -Function un.onInit - - !insertmacro initRegKeys - - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 - Abort -FunctionEnd - -;====================================== -;====================================== - -Section "Uninstall" - - ; Use the all users context - SetShellVarContext all - - ; Kill running Programs - DetailPrint "Terminating processes ..." - ExecWait '"taskkill" /F /IM Translator.exe' - ExecWait '"taskkill" /F /IM TrayLauncher.exe' - ExecWait '"taskkill" /F /IM WebRemote.exe' - ExecWait '"taskkill" /F /IM VirtualRemote.exe' - ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' - ExecWait '"taskkill" /F /IM IRFileTool.exe' - ExecWait '"taskkill" /F /IM DebugClient.exe' - ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' - Sleep 100 - - ; Uninstall current Input Service ... - IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService - -UninstallInputService: - ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' - -SkipUninstallInputService: - Sleep 100 - - ; Remove files and uninstaller - DetailPrint "Attempting to remove MediaPortal Blast Zone Plugin ..." - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPUtils.dll" - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssComms.dll" - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssUtils.dll" - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPBlastZonePlugin.dll" - - DetailPrint "Attempting to remove MediaPortal Process Plugin Common Files ..." - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPUtils.dll" - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\IrssComms.dll" - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\IrssUtils.dll" - - DetailPrint "Attempting to remove MediaPortal Control Plugin ..." - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPControlPlugin.dll" - - DetailPrint "Attempting to remove MediaPortal TV2 Plugin ..." - Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\TV2BlasterPlugin.dll" - - DetailPrint "Attempting to remove MediaPortal TV3 Plugin ..." - Delete /REBOOTOK "$DIR_TVSERVER\Plugins\MPUtils.dll" - Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssComms.dll" - Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssUtils.dll" - Delete /REBOOTOK "$DIR_TVSERVER\Plugins\TV3BlasterPlugin.dll" - - DetailPrint "Removing Set Top Box presets ..." - RMDir /R "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" - - DetailPrint "Removing program files ..." - RMDir /R /REBOOTOK "$DIR_INSTALL" - - DetailPrint "Removing start menu shortcuts ..." - RMDir /R "$SMPROGRAMS\${PRODUCT_NAME}" - - ; Remove registry keys - DetailPrint "Removing registry keys ..." - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" - DeleteRegKey HKLM "Software\${PRODUCT_NAME}" - - ; Remove auto-runs - DetailPrint "Removing application auto-runs ..." - DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Tray Launcher" - DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Translator" - DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Keyboard Input Relay" - - SetAutoClose false - -SectionEnd - -;====================================== -;====================================== \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-03-10 21:48:13 UTC (rev 1443) +++ trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-03-11 03:29:59 UTC (rev 1444) @@ -1,846 +0,0 @@ -;====================================== -; IR Server Suite - Release.nsi -; -; (C) Copyright Aaron Dinnage, 2008 -;====================================== - -!include "x64.nsh" -!include "MUI.nsh" - -!define PRODUCT_NAME "IR Server Suite" -!define PRODUCT_VERSION "1.0.4.2" -!define PRODUCT_PUBLISHER "and-81" -!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/mce_replacement_plugin-f165.html" - -Name "${PRODUCT_NAME}" -OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" -InstallDir "" -ShowInstDetails hide -ShowUninstDetails hide -BrandingText "${PRODUCT_NAME} by Aaron Dinnage" -SetCompressor /SOLID /FINAL lzma -CRCCheck On - -; Variables -var DIR_INSTALL -var DIR_MEDIAPORTAL -var DIR_TVSERVER - -!define MUI_ABORTWARNING -!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" -!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" - -!insertmacro MUI_PAGE_WELCOME -!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" -!insertmacro MUI_PAGE_COMPONENTS - -; Main app install path -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp -!insertmacro MUI_PAGE_DIRECTORY - -; MediaPortal install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP -!insertmacro MUI_PAGE_DIRECTORY - -; TV Server install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV -!insertmacro MUI_PAGE_DIRECTORY - -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH - -!insertmacro MUI_UNPAGE_INSTFILES - -!insertmacro MUI_LANGUAGE "English" - -;====================================== -;====================================== - -!macro initRegKeys - ${If} ${RunningX64} - - SetRegView 64 - - ${DisableX64FSRedirection} - - ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" - ${If} $DIR_INSTALL == "" - StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' - ${Endif} - - ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" - ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' - ${Endif} - - ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" - ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' - ${Endif} - - ${EnableX64FSRedirection} - - ${Else} - - SetRegView 32 - - ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" - ${If} $DIR_INSTALL == "" - StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' - ${Endif} - - ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" - ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' - ${Endif} - - ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" - ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' - ${Endif} - - ${Endif} -!macroend - -;====================================== -;====================================== - -Function .onInit - -!insertmacro initRegKeys - -FunctionEnd - -;====================================== - -Function .onInstSuccess - - IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService - -StartInputService: - Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' - -SkipStartInputService: - -FunctionEnd - -;====================================== - -Function DirectoryPreMP - SectionGetFlags 3 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - SectionGetFlags 4 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - SectionGetFlags 5 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP - - Abort - -EndDirectoryPreMP: -FunctionEnd - -;====================================== - -Function DirectoryPreTV - SectionGetFlags 6 $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} EndDirectoryPreTV - - Abort - -EndDirectoryPreTV: -FunctionEnd - -;====================================== - -Function DirectoryShowApp - !insertmacro MUI_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" "Choose the folder in which to install ${PRODUCT_NAME}." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." -FunctionEnd - -;====================================== - -Function DirectoryShowMP - !insertmacro MUI_HEADER_TEXT "Choose MediaPortal Location" "Choose the folder in which to install MediaPortal plugins." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." -FunctionEnd - -;====================================== - -Function DirectoryShowTV - !insertmacro MUI_HEADER_TEXT "Choose TV Server Location" "Choose the folder in which ... [truncated message content] |
From: <an...@us...> - 2008-03-12 05:34:11
|
Revision: 1449 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1449&view=rev Author: and-81 Date: 2008-03-11 22:34:07 -0700 (Tue, 11 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.resx trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -47,7 +47,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(360, 272); + this.buttonOK.Location = new System.Drawing.Point(360, 400); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 2; @@ -59,7 +59,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(432, 272); + this.buttonCancel.Location = new System.Drawing.Point(432, 400); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 3; @@ -71,7 +71,7 @@ // this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkBoxRunAtBoot.AutoSize = true; - this.checkBoxRunAtBoot.Location = new System.Drawing.Point(16, 272); + this.checkBoxRunAtBoot.Location = new System.Drawing.Point(16, 400); this.checkBoxRunAtBoot.Name = "checkBoxRunAtBoot"; this.checkBoxRunAtBoot.Size = new System.Drawing.Size(165, 17); this.checkBoxRunAtBoot.TabIndex = 1; @@ -87,7 +87,7 @@ this.groupBoxTransceiver.Controls.Add(this.gridPlugins); this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 32); this.groupBoxTransceiver.Name = "groupBoxTransceiver"; - this.groupBoxTransceiver.Size = new System.Drawing.Size(488, 232); + this.groupBoxTransceiver.Size = new System.Drawing.Size(488, 360); this.groupBoxTransceiver.TabIndex = 0; this.groupBoxTransceiver.TabStop = false; this.groupBoxTransceiver.Text = "Device plugins"; @@ -103,7 +103,7 @@ this.gridPlugins.Name = "gridPlugins"; this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; - this.gridPlugins.Size = new System.Drawing.Size(472, 208); + this.gridPlugins.Size = new System.Drawing.Size(472, 336); this.gridPlugins.TabIndex = 0; this.gridPlugins.TabStop = true; this.gridPlugins.ToolTipText = ""; @@ -155,7 +155,7 @@ 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(504, 304); + this.ClientSize = new System.Drawing.Size(504, 432); this.Controls.Add(this.toolStrip); this.Controls.Add(this.checkBoxRunAtBoot); this.Controls.Add(this.groupBoxTransceiver); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -365,9 +365,10 @@ _abstractRemoteButtons = new DataSet("AbstractRemoteButtons"); _abstractRemoteButtons.CaseSensitive = true; - foreach (PluginBase plugin in _pluginReceive) - if (plugin is IRemoteReceiver) - LoadAbstractDeviceFiles(plugin.Name); + if (_pluginReceive != null) + foreach (PluginBase plugin in _pluginReceive) + if (plugin is IRemoteReceiver) + LoadAbstractDeviceFiles(plugin.Name); } #endregion Setup Abstract Remote Model processing Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.Designer.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.Designer.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -100,7 +100,7 @@ // // folderBrowserDialog // - this.folderBrowserDialog.RootFolder = System.Environment.SpecialFolder.ProgramFiles; + this.folderBrowserDialog.Description = "Locate the Girder plugin folder"; this.folderBrowserDialog.ShowNewFolderButton = false; // // groupBoxPlugins @@ -123,10 +123,13 @@ | System.Windows.Forms.AnchorStyles.Right))); this.listViewPlugins.CheckBoxes = true; this.listViewPlugins.FullRowSelect = true; + this.listViewPlugins.GridLines = true; this.listViewPlugins.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; this.listViewPlugins.HideSelection = false; this.listViewPlugins.Location = new System.Drawing.Point(8, 16); + this.listViewPlugins.MultiSelect = false; this.listViewPlugins.Name = "listViewPlugins"; + this.listViewPlugins.ShowGroups = false; this.listViewPlugins.Size = new System.Drawing.Size(328, 136); this.listViewPlugins.TabIndex = 0; this.listViewPlugins.UseCompatibleStateImageBehavior = false; Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Drawing; +using System.IO; using System.Text; using System.Windows.Forms; @@ -14,22 +15,56 @@ public partial class Config : Form { - //List<string> _selectedPlugins; - string _pluginFolder; + #region Properties - /// <summary> /// Gets or sets the path of the Girder plugin folder. /// </summary> /// <value>The path of the Girder plugin folder.</value> public string PluginFolder { - get { return _pluginFolder; } - set { _pluginFolder = value; } + get + { + return textBoxPluginFolder.Text; + } + set + { + textBoxPluginFolder.Text = value; + + UpdatePluginList(); + } } + /// <summary> + /// Gets or sets the selected plugin. + /// </summary> + /// <value>The plugin file.</value> + public string PluginFile + { + get + { + if (listViewPlugins.SelectedItems.Count == 0) + return null; + else + return listViewPlugins.SelectedItems[0].Text; + } + set + { + foreach (ListViewItem item in listViewPlugins.Items) + { + if (item.Text.Equals(value, StringComparison.OrdinalIgnoreCase)) + { + item.Selected = true; + return; + } + } + } + } + #endregion Properties + #region Constructor + /// <summary> /// Initializes a new instance of the <see cref="Config"/> class. /// </summary> @@ -38,6 +73,8 @@ InitializeComponent(); } + #endregion Constructor + private void buttonConfigureGirderPlugin_Click(object sender, EventArgs e) { if (listViewPlugins.SelectedIndices.Count != 1) @@ -76,9 +113,9 @@ { if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK) { - _pluginFolder = folderBrowserDialog.SelectedPath; + textBoxPluginFolder.Text = folderBrowserDialog.SelectedPath; - UpdatePluginList(); + UpdatePluginList(); } } @@ -90,7 +127,12 @@ void UpdatePluginList() { + listViewPlugins.Clear(); + string[] files = Directory.GetFiles(textBoxPluginFolder.Text, "*.dll", SearchOption.TopDirectoryOnly); + if (files.Length > 0) + foreach (string file in files) + listViewPlugins.Items.Add(Path.GetFileName(file)); } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.resx =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.resx 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.resx 2008-03-12 05:34:07 UTC (rev 1449) @@ -123,97 +123,78 @@ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAAAA + AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AABUUa3/UE2s/1FOrf9RTq3/UU6t/1FOrf9RTq3/UU6t/1FOrf9RTq3/UU6t/1FOrf9RTq3/UU6t/1BN + rP+cmsz/ionE/09MrP9RTq3/UU6t/1FOrf9RTq3/UU6t/1FOrf9RTq3/UU6t/1FOrf9RTq3/UU6t/1FO + rf9QTaz/W1ix/yMfmP8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/4F/wf9sabj/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8tKp3/JSGa/x4al/8gHJf/JyOa/yklm/8pJZv/KSWb/yklm/8pJZv/KSWb/yom + nP8qJpz/Ix+Y/x4al/8eGpf/goDB/21ruP8eGpf/HhqX/yUhmf8qJpz/Kiac/yklm/8pJZv/KSWb/ykl + m/8pJZv/KSWb/yYimf8fG5f/HhqX/y8snv8lIZr/HhqX/zw5o/+dm8z/rq3U/66t1P+urdT/rq3U/66t + 1P+qqdL/qKfR/6qp0v9jYLT/HhqX/x4al/+CgMH/bWu4/x4al/8iHpj/dnO8/6qp0v+nptH/rKvT/66t + 1P+urdT/rq3U/66t1P+urdT/kpDH/zEun/8eGpf/Lyye/yUhmv8eGpf/S0iq/9fX5f/w8PD/8PDw//Dw + 8P/w8PD/8PDw/+Pi6v9TT63/OTai/ysnnP8eGpf/HhqX/4KAwf9ta7j/HhqX/x4al/8uK53/ODSi/15a + sv/o6Oz/8PDw//Dw8P/w8PD/8PDw//Dw8P/Ix9//PDmj/x4al/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw + 8P/w8PD/8PDw//Dw8P/w8PD/8PDw/6Ggzv8tKZ3/HhqX/x4al/8eGpf/goDB/21ruP8eGpf/HhqX/x4a + l/8zL6D/ra3U//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/8fH3v87OKP/HhqX/y8snv8lIZr/HhqX/0tH + qv/X1uX/8PDw//Dw8P/w8PD/8PDw//Dw8P/w8PD/6+vu/5SSyf8fG5f/HhqX/x4al/+CgMH/bWu4/x4a + l/8eGpf/Ih6Y/6Ohz//u7u//8PDw//Dw8P/w8PD/8PDw//Dw8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUh + mv8eGpf/S0eq/9fW5f/w8PD/8PDw//Dw8P/w8PD/8PDw//Dw8P/w8PD/5eXr/1hVr/8eGpf/HhqX/4KA + wf9ta7j/HhqX/x4al/9nZLX/6unt//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw//Dw8P/Hx97/Ozij/x4a + l/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/9zc6P+bmcz/v77b/09M + q/8eGpf/goDB/21ruP8eGpf/XFqx/7W01/+Qjcf/2Njm//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/8fH + 3v87OKP/HhqX/y8snv8lIZr/HhqX/0tHqv/X1uX/8PDw//Dw8P/w8PD/8PDw//Dw8P/j4+r/ZmO1/yYi + mv93db3/sK/V/yMfmP+CgMH/bWu4/yomnP+1tdf/XVux/yQhmf9aV7D/3t7o//Dw8P/w8PD/8PDw//Dw + 8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUhmv8eGpf/S0eq/9fW5f/w8PD/8PDw//Dw8P/w8PD/3t7o/2dk + tf8eGpf/HhqX/yQgmf+Mi8X/lJHI/4iGxP92dLv/oJ7O/29suf8fG5f/HhqX/x4al/9ZV7D/2djm//Dw + 8P/w8PD/8PDw//Dw8P/Hx97/Ozij/x4al/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw8P/w8PD/8PDw//Dw + 8P+ZmMv/JiKa/x4al/8eGpf/HhqX/y0qnf+1tNf/yMff/8HA2/+fns3/Ix+Y/x4al/8eGpf/HhqX/yQg + mf+Nisb/8PDw//Dw8P/w8PD/8PDw/8fH3v87OKP/HhqX/y8snv8lIZr/HhqX/0tHqv/X1uX/8PDw//Dw + 8P/w8PD/5eXr/zYzoP8eGpf/HhqX/x4al/8eGpf/HhqX/0RBpv/Ly+D/t7bY/zYzof8eGpf/HhqX/x4a + l/8eGpf/HhqX/yomnP/b2uf/8PDw//Dw8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUhmv8eGpf/S0iq/9fX + 5f/w8PD/8PDw//Dw8P+1tNf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/IB2Y/2Ffs/9PS6v/HhqX/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/6Si0P/w8PD/8PDw//Dw8P/Ix9//PDij/x4al/8vLJ7/JSGa/x4a + l/87N6P/lZLJ/6Wj0P+lo9D/pKPQ/2Ritf8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/WVaw/6Ohz/+lo9D/paPQ/4qIxP8wLZ7/HhqX/y8s + nv8lIZr/HhqX/x4al/8gHJj/IR2Y/yEdmP8hHZj/HxuX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8fG5f/IR2Y/yEdmP8hHZj/IByX/x4a + l/8eGpf/Lyye/yUhmv8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8vLJ7/JSGa/x4al/8sKJ3/Wlew/2Fes/9hXrP/YV+z/0JApv8eGpf/HhqX/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/PTqj/2Fe + s/9hXrP/YV6z/1VSrf8nI5r/HhqX/y8snv8lIZr/HhqX/0xIqv/Y1+b/8PDw//Dw8P/w8PD/sbDV/x4a + l/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/9EQaf/Qj+m/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/+gns7/8PDw//Dw8P/w8PD/yMff/zw5o/8eGpf/Lyye/yUhmv8eGpf/S0eq/9fW5f/w8PD/8PDw//Dw + 8P/i4er/MC2e/x4al/8eGpf/HhqX/x4al/8eGpf/NDCg/7Gw1f+vr9T/My+f/x4al/8eGpf/HhqX/x4a + l/8eGpf/KSab/9jY5v/w8PD/8PDw//Dw8P/Hx97/Ozij/x4al/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw + 8P/w8PD/8PDw//Dw8P+Rj8f/JSGZ/x4al/8eGpf/HhqX/yMfmf+amcz/z8/i/8zL4f+Zl8r/IR2Y/x4a + l/8eGpf/HhqX/yMfmf+EgsH/8PDw//Dw8P/w8PD/8PDw/8fH3v87OKP/HhqX/y8snv8lIZr/HhqX/0tH + qv/X1uX/8PDw//Dw8P/w8PD/8PDw/9va5v9dW7H/HhqX/x4al/8eGpf/aWe3/56dzf+LisX/eni+/6in + 0f9iX7P/HhqX/x4al/8eGpf/Uk+t/9PT4//w8PD/8PDw//Dw8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUh + mv8eGpf/S0eq/9fW5f/w8PD/8PDw//Dw8P/w8PD/8PDw/+Dg6f9ZVrD/JCCZ/1xZsf+ysdb/KSWc/4KA + wf9ta7j/Mi+f/7q52P9WU67/Ih6Y/1FNrP/a2ub/8PDw//Dw8P/w8PD/8PDw//Dw8P/Hx97/Ozij/x4a + l/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/9bW5f+Jh8T/srHV/1pY + sP8eGpf/goDB/21ruP8eGpf/Z2S1/7Kx1f+Bf8D/0M/i//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/8fH + 3v87OKP/HhqX/y8snv8lIZr/HhqX/0tHqv/X1uX/8PDw//Dw8P/w8PD/8PDw//Dw8P/w8PD/8PDw/+np + 7f9mY7T/HhqX/x4al/+CgMH/bWu4/x4al/8gHJj/dHK8/+zs7v/w8PD/8PDw//Dw8P/w8PD/8PDw//Dw + 8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUhmv8eGpf/S0eq/9fW5f/w8PD/8PDw//Dw8P/w8PD/8PDw//Dw + 8P/t7e7/oJ7O/yIemP8eGpf/HhqX/4KAwf9ta7j/HhqX/x4al/8mIpr/sbDW//Dw8P/w8PD/8PDw//Dw + 8P/w8PD/8PDw//Dw8P/Hx97/Ozij/x4al/8vLJ7/JSGa/x4al/9LR6r/19bl//Dw8P/w8PD/8PDw//Dw + 8P/w8PD/8PDw/66s0/8zL5//HhqX/x4al/8eGpf/goDB/21ruP8eGpf/HhqX/x4al/85NqP/ubnZ//Dw + 8P/w8PD/8PDw//Dw8P/w8PD/8PDw/8fH3v87OKP/HhqX/y8snv8lIZr/HhqX/0tHqv/X1uX/8PDw//Dw + 8P/w8PD/8PDw//Dw8P/h4en/SUap/yQgmf8hHZj/HhqX/x4al/+CgMH/bWu4/x4al/8eGpf/IR2Y/yUh + mv9VUq7/6Ojt//Dw8P/w8PD/8PDw//Dw8P/w8PD/x8fe/zs4o/8eGpf/Lyye/yUhmv8eGpf/QT6m/66t + 1P/Av9z/wL/c/8C/3P/Av9z/wL/c/7y72v+vrdT/srHW/2dktv8eGpf/HhqX/4KAwf9ta7j/HhqX/yIf + mf96eb7/sbDW/66t1P/Avtz/wL/c/8C/3P/Av9z/wL/c/8C/3P+ioM//NTKh/x4al/8vLJ7/JSGa/x4a + l/8iHpn/Mi6f/zQxoP80MaD/NDGg/zQxoP80MaD/NDGg/zYyof82MqH/KSWb/x4al/8eGpf/goDB/21r + uP8eGpf/HhqX/y0pnf82MqH/NjKh/zQxoP80MaD/NDGg/zQxoP80MaD/NDGg/zAtnv8hHZj/HhqX/y8s + nv8kIJn/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/+Cf8H/bWq4/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4al/8eGpf/HhqX/x4a + l/8eGpf/Liqd/z06o/84NKL/OTWi/zk1ov85NaL/OTWi/zk1ov85NaL/OTWi/zk1ov85NaL/OTWi/zk1 + ov85NaL/ODSi/5COx/98er7/ODSh/zk1ov85NaL/OTWi/zk1ov85NaL/OTWi/zk1ov85NaL/OTWi/zk1 + ov85NaL/OTWi/zg0ov9GQqj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAMj/AADI/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAyP8AAMj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAADI/wAAyP8AAMj/AADI/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMj/AADI/wAAyP8AAMj/AAAAAAAAAAAAAMj/AADI/wAA - yP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAA - yP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAA - yP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAA - yP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAA - yP8AAMj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMj/AADI/wAA - yP8AAMj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - yP8AAMj/AADI/wAAyP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAADI/wAAyP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AAAAAAAAAAAAAAAAAAAAAMj/AADI/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAA - AP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///8/////P////w////8MAAAAAAAAAAP// - /8P/wD/D/gAPz/wAA8/4H4H/8H/g/+H/8P/h//D/w//w/8P/8P/D+AD/x/gA/8f4AP/H////w////8P/ - ///D//P/4f/h/+H/4f/w/8P/+D8D//wAB//+AA///4B/////////////KAAAABAAAAAgAAAAAQAgAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAMj/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAADI/wAAyP8AAAAAAADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAA - yP8AAMj/AADI/wAAyP8AAMj/AADI/wAAyP8AAMj/AADI/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMj/AADI/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAADI/wAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAA - AP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AP8AAAD/AAAAAAAAAAAAAAAAAAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAD/AAAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP8AAAD/AAAA/wAAAP8AAAD/AAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/+5xB//mcQQAAnEH/+ZxB8DucQcePnEHPz5xBn8+cQZwP - nEGf/5xBn/+cQZ+fnEHPn5xBxx+cQfB/nEH//5xB + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= </value> </data> </root> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -20,18 +20,21 @@ #region Constants - static readonly string ConfigurationFile = Path.Combine(ConfigurationPath, "Girder Plugin.xml"); + static readonly string ConfigurationFile = Path.Combine(ConfigurationPath, "Girder Plugin.xml"); + static readonly string DefaultPluginFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "girder\\plugins"); + static readonly string[] Ports = new string[] { "Plugin" }; - const int GIRINFO_POWERBROADCAST = 2; - const int PBT_APMSUSPEND = 4; - const int PBT_APMRESUMEAUTOMATIC = 18; + const int GIRINFO_POWERBROADCAST = 2; + const int PBT_APMSUSPEND = 4; + const int PBT_APMRESUMEAUTOMATIC = 18; #endregion Constants #region Variables + string _pluginFolder; string _pluginFile; RemoteHandler _remoteButtonHandler; @@ -61,7 +64,7 @@ /// A description of the IR Server plugin. /// </summary> /// <value>The description.</value> - public override string Description { get { return "Supports using Girder 3.x plugins with IR Server"; } } + public override string Description { get { return "Supports using Girder 3.x plugins"; } } /// <summary> /// Gets a display icon for the plugin. /// </summary> @@ -75,8 +78,10 @@ { LoadSettings(); - _pluginWrapper = new GirderPluginWrapper(_pluginFile); + string file = Path.Combine(_pluginFolder, _pluginFile); + _pluginWrapper = new GirderPluginWrapper(file); + _pluginWrapper.EventCallback += new PluginEventCallback(PluginCallback); if (!_pluginWrapper.GirOpen()) @@ -188,11 +193,13 @@ LoadSettings(); Config config = new Config(); - config.PluginFolder = _pluginFile; + config.PluginFolder = _pluginFolder; + config.PluginFile = _pluginFile; if (config.ShowDialog(owner) == DialogResult.OK) { - _pluginFile = config.PluginFolder; + _pluginFolder = config.PluginFolder; + _pluginFile = config.PluginFile; SaveSettings(); } @@ -215,6 +222,9 @@ try { doc.Load(ConfigurationFile); } catch { return; } + try { _pluginFolder = doc.DocumentElement.Attributes["PluginFolder"].Value; } + catch { _pluginFolder = DefaultPluginFolder; } + try { _pluginFile = doc.DocumentElement.Attributes["PluginFile"].Value; } catch { } } @@ -230,6 +240,7 @@ writer.WriteStartDocument(true); writer.WriteStartElement("settings"); // <settings> + writer.WriteAttributeString("PluginFolder", _pluginFolder); writer.WriteAttributeString("PluginFile", _pluginFile); writer.WriteEndElement(); // </settings> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -104,7 +104,7 @@ { InitializeComponent(); - checkBoxDisableAutomaticButtons.Checked = !MicrosoftMceTransceiver.CheckAutomaticButtons();; + checkBoxDisableAutomaticButtons.Checked = !MicrosoftMceTransceiver.CheckAutomaticButtons(); } #endregion Constructor @@ -113,24 +113,31 @@ private void buttonOK_Click(object sender, EventArgs e) { - bool changeMade = false; + try + { + bool changeMade = false; - bool keysExist = MicrosoftMceTransceiver.CheckAutomaticButtons(); + bool keysExist = MicrosoftMceTransceiver.CheckAutomaticButtons(); - if (checkBoxDisableAutomaticButtons.Checked && keysExist) - { - MicrosoftMceTransceiver.DisableAutomaticButtons(); - changeMade = true; + if (checkBoxDisableAutomaticButtons.Checked && keysExist) + { + MicrosoftMceTransceiver.DisableAutomaticButtons(); + changeMade = true; + } + else if (!checkBoxDisableAutomaticButtons.Checked && !keysExist) + { + MicrosoftMceTransceiver.EnableAutomaticButtons(); + changeMade = true; + } + + if (changeMade) + MessageBox.Show(this, "You must restart the computer for changes to automatic button handling to take effect", "Restart required", MessageBoxButtons.OK, MessageBoxIcon.Information); } - else if (!checkBoxDisableAutomaticButtons.Checked && !keysExist) + catch (Exception ex) { - MicrosoftMceTransceiver.EnableAutomaticButtons(); - changeMade = true; + MessageBox.Show(this, ex.ToString(), "Error modifiying the system registry", MessageBoxButtons.OK); } - if (changeMade) - MessageBox.Show(this, "You must restart for changes to automatic button handling to take effect", "Restart required", MessageBoxButtons.OK, MessageBoxIcon.Information); - this.DialogResult = DialogResult.OK; this.Close(); } Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -359,9 +359,10 @@ _abstractRemoteButtons = new DataSet("AbstractRemoteButtons"); _abstractRemoteButtons.CaseSensitive = true; - foreach (PluginBase plugin in _pluginReceive) - if (plugin is IRemoteReceiver) - LoadAbstractDeviceFiles(plugin.Name); + if (_pluginReceive != null) + foreach (PluginBase plugin in _pluginReceive) + if (plugin is IRemoteReceiver) + LoadAbstractDeviceFiles(plugin.Name); } #endregion Setup Abstract Remote Model processing Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-12 03:18:59 UTC (rev 1448) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-12 05:34:07 UTC (rev 1449) @@ -46,7 +46,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(360, 272); + this.buttonOK.Location = new System.Drawing.Point(360, 400); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 1; @@ -58,7 +58,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(432, 272); + this.buttonCancel.Location = new System.Drawing.Point(432, 400); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 2; @@ -74,7 +74,7 @@ this.groupBoxTransceiver.Controls.Add(this.gridPlugins); this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 32); this.groupBoxTransceiver.Name = "groupBoxTransceiver"; - this.groupBoxTransceiver.Size = new System.Drawing.Size(488, 232); + this.groupBoxTransceiver.Size = new System.Drawing.Size(488, 360); this.groupBoxTransceiver.TabIndex = 0; this.groupBoxTransceiver.TabStop = false; this.groupBoxTransceiver.Text = "Device plugins"; @@ -90,7 +90,7 @@ this.gridPlugins.Name = "gridPlugins"; this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows; this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row; - this.gridPlugins.Size = new System.Drawing.Size(472, 208); + this.gridPlugins.Size = new System.Drawing.Size(472, 336); this.gridPlugins.TabIndex = 0; this.gridPlugins.TabStop = true; this.gridPlugins.ToolTipText = ""; @@ -142,7 +142,7 @@ 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(504, 304); + this.ClientSize = new System.Drawing.Size(504, 432); this.Controls.Add(this.toolStrip); this.Controls.Add(this.groupBoxTransceiver); this.Controls.Add(this.buttonCancel); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-13 04:44:45
|
Revision: 1456 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1456&view=rev Author: and-81 Date: 2008-03-12 21:44:42 -0700 (Wed, 12 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs trunk/plugins/IR Server Suite/Documentation/Common/debug_client.png trunk/plugins/IR Server Suite/Documentation/Input Service/advanced.png trunk/plugins/IR Server Suite/Documentation/Input Service/configuration.png trunk/plugins/IR Server Suite/Documentation/Input Service/index.html trunk/plugins/IR Server Suite/Documentation/Virtual Remote/Skin Editor/skin_editor.png trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs trunk/plugins/IR Server Suite/IR Server Suite.nsi trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -1528,7 +1528,7 @@ IrssMessage response = new IrssMessage(MessageType.DetectedBlasters, MessageFlags.Response); string[] detectedBlasters = Program.DetectBlasters(); - if (detectedBlasters != null) + if (detectedBlasters != null && detectedBlasters.Length > 0) { StringBuilder blasters = new StringBuilder(); for (int index = 0; index < detectedBlasters.Length; index++) @@ -1557,7 +1557,7 @@ IrssMessage response = new IrssMessage(MessageType.DetectedReceivers, MessageFlags.Response); string[] detectedReceivers = Program.DetectReceivers(); - if (detectedReceivers != null) + if (detectedReceivers != null && detectedReceivers.Length > 0) { StringBuilder receivers = new StringBuilder(); for (int index = 0; index < detectedReceivers.Length; index++) @@ -1762,13 +1762,13 @@ try { string[] blasters = Program.DetectBlasters(); - if (blasters == null) + if (blasters == null || blasters.Length == 0) _pluginNameTransmit = String.Empty; else _pluginNameTransmit = blasters[0]; string[] receivers = Program.DetectReceivers(); - if (receivers == null) + if (receivers == null || receivers.Length == 0) _pluginNameReceive = null; else _pluginNameReceive = receivers; Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -156,6 +156,8 @@ internal static string[] DetectReceivers() { PluginBase[] plugins = AvailablePlugins(); + if (plugins == null || plugins.Length == 0) + return null; List<string> receivers = new List<string>(); @@ -176,6 +178,8 @@ internal static string[] DetectBlasters() { PluginBase[] plugins = Program.AvailablePlugins(); + if (plugins == null || plugins.Length == 0) + return null; List<string> blasters = new List<string>(); Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -436,6 +436,9 @@ void OpenFile() { + openFileDialog.Title = "Open a Virtual Remote Skin ..."; + openFileDialog.Filter = "Xml Files|*.xml"; + if (openFileDialog.ShowDialog(this) == DialogResult.OK) { _fileName = openFileDialog.FileName; Modified: trunk/plugins/IR Server Suite/Documentation/Common/debug_client.png =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Documentation/Input Service/advanced.png =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Documentation/Input Service/configuration.png =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Documentation/Input Service/index.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/Input Service/index.html 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Documentation/Input Service/index.html 2008-03-13 04:44:42 UTC (rev 1456) @@ -28,5 +28,13 @@ </UL> </P> +<P><B>Use the Abstract Remote Model</B><BR> +This option enables Abstract Remote Model parsing. This feature converts button presses from a variety of recognised remotes into one common set of buttons. So for example, instead of two different remotes sending "57823" and "abab8238" as the remote button id for the Play button they would both be converted to simply "Play". This simplifies the configuration process but also keeps the initial flexibility of IR Server Suite because any button press that does not map to the Abstract Remote Model will continue to be handled in the old way.<BR> +<BR> +This feature is disabled by default in Version 1.0.4.2 but will become enabled by default in later versions.</P> + +<P><B>Set Priority:</B><BR> +This option lets you fine tune the process priority of the Input Service. If you find that your PC is running too slowly and remote input is delayed or performance is poor you might find that you will get a response rate increase by increasing the Process Priority of the Input Service.</P> + </BODY> </HTML> Modified: trunk/plugins/IR Server Suite/Documentation/Virtual Remote/Skin Editor/skin_editor.png =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-13 04:44:42 UTC (rev 1456) @@ -52,6 +52,8 @@ <LI>Dbox Tuner: Added a Command Line Dbox Tuner application to the installer.</LI> <LI>Hcw Pvr Tuner: Added a Command Line HCW PVR Tuner application to the installer.</LI> <LI>Girder Plugin: Fixed the girder plugin to work as an IR receiver. Still haven't completed the blaster/command functions yet.</LI> +<LI>Installer: Fixed a registry setting so that Input Service should autoconfigure correctly from now on.</LI> +<LI>Direct Input Plugin: Fixed a detection and configuration bug.</LI> </UL></P> <BR> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -190,7 +190,9 @@ #if TRACE Trace.WriteLine("No direct input device selected in plugin configuration, using first found"); #endif - DeviceInstance di = (DeviceInstance)_deviceList.Current; + _deviceList.Reset(); // Move to the position before the first in the device list. + _deviceList.MoveNext(); // Move to the first position in the device list. + DeviceInstance di = (DeviceInstance)_deviceList.Current; // Retreive the first position in the device list. _selectedDeviceGUID = di.InstanceGuid.ToString(); } @@ -327,6 +329,7 @@ if (_deviceList == null) return false; + _deviceList.Reset(); foreach (DeviceInstance di in _deviceList) if (_selectedDeviceGUID.Equals(di.InstanceGuid.ToString(), StringComparison.OrdinalIgnoreCase)) return _diListener.InitDevice(di.InstanceGuid); Modified: trunk/plugins/IR Server Suite/IR Server Suite.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-13 04:44:42 UTC (rev 1456) @@ -307,6 +307,11 @@ ; Create install directory CreateDirectory "$DIR_INSTALL" + ; Write the installation paths into the registry + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "Install_Dir" "$DIR_INSTALL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" "$DIR_MEDIAPORTAL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" + ; Write documentation !ifdef DEBUG DetailPrint "Warning: Documentation is not included in debug builds" @@ -805,11 +810,6 @@ CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Log Files.lnk" "$APPDATA\${PRODUCT_NAME}\Logs" CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" "" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" - ; Write the installation paths into the registry - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "Install_Dir" "$DIR_INSTALL" - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" "$DIR_MEDIAPORTAL" - WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" - ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -1487,7 +1487,7 @@ IrssMessage response = new IrssMessage(MessageType.DetectedBlasters, MessageFlags.Response); string[] detectedBlasters = Program.DetectBlasters(); - if (detectedBlasters != null) + if (detectedBlasters != null && detectedBlasters.Length > 0) { StringBuilder blasters = new StringBuilder(); for (int index = 0; index < detectedBlasters.Length; index++) @@ -1516,7 +1516,7 @@ IrssMessage response = new IrssMessage(MessageType.DetectedReceivers, MessageFlags.Response); string[] detectedReceivers = Program.DetectReceivers(); - if (detectedReceivers != null) + if (detectedReceivers != null && detectedReceivers.Length > 0) { StringBuilder receivers = new StringBuilder(); for (int index = 0; index < detectedReceivers.Length; index++) @@ -1701,13 +1701,13 @@ try { string[] blasters = Program.DetectBlasters(); - if (blasters == null) + if (blasters == null || blasters.Length == 0) _pluginNameTransmit = String.Empty; else _pluginNameTransmit = blasters[0]; string[] receivers = Program.DetectReceivers(); - if (receivers == null) + if (receivers == null || receivers.Length == 0) _pluginNameReceive = null; else _pluginNameReceive = receivers; Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs 2008-03-12 22:22:58 UTC (rev 1455) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs 2008-03-13 04:44:42 UTC (rev 1456) @@ -168,6 +168,8 @@ internal static string[] DetectReceivers() { PluginBase[] plugins = AvailablePlugins(); + if (plugins == null || plugins.Length == 0) + return null; List<string> receivers = new List<string>(); @@ -188,6 +190,8 @@ internal static string[] DetectBlasters() { PluginBase[] plugins = Program.AvailablePlugins(); + if (plugins == null || plugins.Length == 0) + return null; List<string> blasters = new List<string>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-13 06:59:55
|
Revision: 1457 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1457&view=rev Author: and-81 Date: 2008-03-12 23:59:52 -0700 (Wed, 12 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Suite.nsi trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -1206,12 +1206,15 @@ // Check that the device maps are loaded for the forwarded device bool foundDevice = false; - foreach (PluginBase plugin in _pluginReceive) + if (_pluginReceive != null) { - if (plugin is IRemoteReceiver && plugin.Name.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + foreach (PluginBase plugin in _pluginReceive) { - foundDevice = true; - break; + if (plugin is IRemoteReceiver && plugin.Name.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + { + foundDevice = true; + break; + } } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -22,6 +22,7 @@ { #region Debug +#if DEBUG static void Remote(string deviceName, string code) { @@ -59,8 +60,10 @@ c = null; } +#endif #endregion Debug + #region Constants static readonly string ConfigurationFile = Path.Combine(ConfigurationPath, "Custom HID Receiver.xml"); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -20,15 +20,12 @@ { #region Debug +#if DEBUG static void Remote(string deviceName, string code) { Console.WriteLine("Remote: {0}", code); } - static void Keyboard(string deviceName, int button, bool up) - { - Console.WriteLine("Keyboard: {0}, {1}", button, up); - } static void Mouse(string deviceName, int x, int y, int buttons) { Console.WriteLine("Mouse: ({0}, {1}) - {2}", x, y, buttons); @@ -42,7 +39,6 @@ c.Configure(null); c.RemoteCallback += new RemoteHandler(Remote); - //c.KeyboardCallback += new KeyboardHandler(Keyboard); c.MouseCallback += new MouseHandler(Mouse); c.Start(); @@ -53,6 +49,7 @@ c = null; } +#endif #endregion Debug Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507Receiver.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507Receiver.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -19,6 +19,7 @@ { #region Debug +#if DEBUG [STAThread] static void Main() @@ -45,6 +46,7 @@ Console.WriteLine("Remote: {0}", code); } +#endif #endregion Debug Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -21,6 +21,7 @@ { #region Debug +#if DEBUG static void Remote(string deviceName, string code) { @@ -41,10 +42,10 @@ c = null; } +#endif #endregion Debug - #region Interop [DllImport("user32.dll")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -376,8 +376,8 @@ #endregion Static Methods - #region Debug + #region Debug #if DEBUG protected static StreamWriter _debugFile; @@ -496,7 +496,6 @@ } #endif - #endregion Debug } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -54,6 +54,7 @@ { #region Debug +#if DEBUG static void xRemote(string deviceName, string code) { @@ -175,10 +176,10 @@ c = null; } +#endif #endregion Debug - #region Constants static readonly string ConfigurationFile = Path.Combine(ConfigurationPath, "Microsoft MCE Transceiver.xml"); Modified: trunk/plugins/IR Server Suite/IR Server Suite.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-13 06:59:52 UTC (rev 1457) @@ -405,8 +405,10 @@ File "IR Server Plugins\X10 Transceiver\bin\${BuildType}\Interop.X10.dll" File "IR Server Plugins\XBCDRC Receiver\bin\${BuildType}\XBCDRC Receiver.*" - ; Create App Data Folder for IR Server configuration files. + ; Create App Data Folder for IR Server configuration files CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" + + ; Copy Abstract Remote maps CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" SetOutPath "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" SetOverwrite ifnewer Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -1166,12 +1166,15 @@ // Check that the device maps are loaded for the forwarded device bool foundDevice = false; - foreach (PluginBase plugin in _pluginReceive) + if (_pluginReceive != null) { - if (plugin is IRemoteReceiver && plugin.Name.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + foreach (PluginBase plugin in _pluginReceive) { - foundDevice = true; - break; + if (plugin is IRemoteReceiver && plugin.Name.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + { + foundDevice = true; + break; + } } } Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs 2008-03-13 04:44:42 UTC (rev 1456) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs 2008-03-13 06:59:52 UTC (rev 1457) @@ -49,6 +49,10 @@ /// </summary> void InputServiceInstaller_AfterInstall(object sender, InstallEventArgs e) { + + // TODO: Set the restart options. + + // Start the service ... using (ServiceController serviceController = new ServiceController(Program.ServiceName)) serviceController.Start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-13 11:34:39
|
Revision: 1458 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1458&view=rev Author: and-81 Date: 2008-03-13 04:34:33 -0700 (Thu, 13 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Documentation/new.html Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-13 06:59:52 UTC (rev 1457) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-13 11:34:33 UTC (rev 1458) @@ -148,17 +148,17 @@ } */ - // Setup the main form ... - _mainForm = new MainForm(); - // Setup notify icon ... _notifyIcon = new NotifyIcon(); - _notifyIcon.ContextMenuStrip = new ContextMenuStrip(_mainForm.Container); + _notifyIcon.ContextMenuStrip = new ContextMenuStrip(); _notifyIcon.Icon = Properties.Resources.Icon16Connecting; _notifyIcon.Text = "Translator - Connecting ..."; _notifyIcon.DoubleClick += new EventHandler(ClickSetup); _notifyIcon.Visible = false; + // Setup the main form ... + _mainForm = new MainForm(); + // Start server communications ... bool clientStarted = false; Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-13 06:59:52 UTC (rev 1457) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-13 11:34:33 UTC (rev 1458) @@ -54,6 +54,7 @@ <LI>Girder Plugin: Fixed the girder plugin to work as an IR receiver. Still haven't completed the blaster/command functions yet.</LI> <LI>Installer: Fixed a registry setting so that Input Service should autoconfigure correctly from now on.</LI> <LI>Direct Input Plugin: Fixed a detection and configuration bug.</LI> +<LI>Translator: Fixed a critical bug.</LI> </UL></P> <BR> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-13 15:48:44
|
Revision: 1459 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1459&view=rev Author: and-81 Date: 2008-03-13 08:48:42 -0700 (Thu, 13 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -12,6 +12,9 @@ namespace IRServer { + /// <summary> + /// Advanced Configuration Form. + /// </summary> partial class Advanced : Form { @@ -66,7 +69,6 @@ { comboBoxPriority.SelectedItem = value; } - } #endregion Properties Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -20,6 +20,7 @@ #region Variables string _serverHost; + string _processPriority; List<ButtonMapping> _systemWideMappings; List<ProgramSettings> _programSettings; @@ -32,6 +33,7 @@ /// <summary> /// IR Server host. /// </summary> + /// <value>The server host.</value> [XmlElement] public string ServerHost { @@ -40,8 +42,20 @@ } /// <summary> + /// Gets or sets the process priority. + /// </summary> + /// <value>The process priority.</value> + [XmlElement] + public string ProcessPriority + { + get { return _processPriority; } + set { _processPriority = value; } + } + + /// <summary> /// System wide button mappings. /// </summary> + /// <value>The system wide mappings.</value> [XmlArray] public List<ButtonMapping> SystemWideMappings { @@ -51,6 +65,7 @@ /// <summary> /// Program settings. /// </summary> + /// <value>The programs.</value> [XmlArray] public List<ProgramSettings> Programs { @@ -60,6 +75,7 @@ /// <summary> /// Mapped events. /// </summary> + /// <value>The events.</value> [XmlArray] public List<MappedEvent> Events { @@ -75,11 +91,12 @@ /// </summary> public Configuration() { - _serverHost = "localhost"; + _serverHost = "localhost"; + _processPriority = "No Change"; _systemWideMappings = new List<ButtonMapping>(); - _programSettings = new List<ProgramSettings>(); - _mappedEvents = new List<MappedEvent>(); + _programSettings = new List<ProgramSettings>(); + _mappedEvents = new List<MappedEvent>(); } #endregion Constructors Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -105,6 +105,7 @@ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStripButtonMapping.SuspendLayout(); this.tabControl.SuspendLayout(); this.tabPagePrograms.SuspendLayout(); @@ -771,6 +772,7 @@ this.exportToolStripMenuItem, this.toolStripSeparator1, this.serverToolStripMenuItem, + this.advancedToolStripMenuItem, this.toolStripSeparator2, this.quitToolStripMenuItem}); this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem"; @@ -780,52 +782,52 @@ // newToolStripMenuItem // this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.newToolStripMenuItem.Text = "&New"; this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); // // openToolStripMenuItem // this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.openToolStripMenuItem.Text = "&Open ..."; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // // importToolStripMenuItem // this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.importToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.importToolStripMenuItem.Text = "&Import ..."; this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click); // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; - this.exportToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.exportToolStripMenuItem.Text = "&Export ..."; this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(129, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); // // serverToolStripMenuItem // this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; - this.serverToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.serverToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.serverToolStripMenuItem.Text = "&Server ..."; this.serverToolStripMenuItem.Click += new System.EventHandler(this.serverToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(129, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6); // // quitToolStripMenuItem // this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; - this.quitToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.quitToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.quitToolStripMenuItem.Text = "&Quit"; this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); // @@ -841,14 +843,14 @@ // translatorHelpToolStripMenuItem // this.translatorHelpToolStripMenuItem.Name = "translatorHelpToolStripMenuItem"; - this.translatorHelpToolStripMenuItem.Size = new System.Drawing.Size(129, 22); + this.translatorHelpToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.translatorHelpToolStripMenuItem.Text = "&Contents"; this.translatorHelpToolStripMenuItem.Click += new System.EventHandler(this.translatorHelpToolStripMenuItem_Click); // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // @@ -861,6 +863,13 @@ this.saveFileDialog.Filter = "XML Files|*.xml"; this.saveFileDialog.Title = "Export settings ..."; // + // advancedToolStripMenuItem + // + this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; + this.advancedToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.advancedToolStripMenuItem.Text = "&Advanced ..."; + this.advancedToolStripMenuItem.Click += new System.EventHandler(this.advancedToolStripMenuItem_Click); + // // MainForm // this.AcceptButton = this.buttonOK; @@ -980,6 +989,7 @@ private System.Windows.Forms.Label labelProgramsEdit; private System.Windows.Forms.Label labelProgramsAdd; private System.Windows.Forms.ToolStripMenuItem remapButtonToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem advancedToolStripMenuItem; } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -1167,6 +1167,21 @@ Program.StartClient(endPoint); } } + private void advancedToolStripMenuItem_Click(object sender, EventArgs e) + { + Advanced advanced = new Advanced(); + advanced.ProcessPriority = Program.Config.ProcessPriority; + + if (advanced.ShowDialog(this) == DialogResult.OK) + { + if (!advanced.ProcessPriority.Equals(Program.Config.ProcessPriority, StringComparison.OrdinalIgnoreCase)) + { + Program.Config.ProcessPriority = advanced.ProcessPriority; + + Program.AdjustPriority(Program.Config.ProcessPriority); + } + } + } private void quitToolStripMenuItem_Click(object sender, EventArgs e) { Application.Exit(); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -127,13 +127,17 @@ // Initialize Variable List. _variables = new VariableList(); + // Load configuration ... _config = Configuration.Load(ConfigFile); if (_config == null) { IrssLog.Warn(String.Format("Failed to load configuration file ({0}), creating new configuration", ConfigFile)); _config = new Configuration(); } - + + // Adjust process priority ... + AdjustPriority(_config.ProcessPriority); + /* foreach (ProgramSettings progSettings in _config.Programs) { @@ -1243,6 +1247,28 @@ } } + /// <summary> + /// Adjusts the process priority. + /// </summary> + /// <param name="newPriority">The new priority.</param> + internal static void AdjustPriority(string newPriority) + { + if (!newPriority.Equals("No Change", StringComparison.OrdinalIgnoreCase)) + { + try + { + ProcessPriorityClass priority = (ProcessPriorityClass)Enum.Parse(typeof(ProcessPriorityClass), newPriority); + Process.GetCurrentProcess().PriorityClass = priority; + + IrssLog.Info("Process priority set to: {0}", newPriority); + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + } + } + #endregion Implementation } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-13 15:48:42 UTC (rev 1459) @@ -69,6 +69,12 @@ <Compile Include="ButtonMapping.cs" /> <Compile Include="Configuration.cs" /> <Compile Include="AppProfile.cs" /> + <Compile Include="Forms\Advanced.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Forms\Advanced.Designer.cs"> + <DependentUpon>Advanced.cs</DependentUpon> + </Compile> <Compile Include="Forms\ButtonMappingForm.cs"> <SubType>Form</SubType> </Compile> @@ -110,6 +116,10 @@ <Compile Include="Program.cs" /> <Compile Include="ProgramSettings.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Forms\Advanced.resx"> + <DependentUpon>Advanced.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="Forms\ButtonMappingForm.resx"> <SubType>Designer</SubType> <DependentUpon>ButtonMappingForm.cs</DependentUpon> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-03-13 15:48:42 UTC (rev 1459) @@ -91,6 +91,12 @@ <Compile Include="Forms\CloseProgramCommand.Designer.cs"> <DependentUpon>CloseProgramCommand.cs</DependentUpon> </Compile> + <Compile Include="Forms\WindowCommand.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Forms\WindowCommand.Designer.cs"> + <DependentUpon>WindowCommand.cs</DependentUpon> + </Compile> <Compile Include="Forms\DisplayPowerCommand.cs"> <SubType>Form</SubType> </Compile> @@ -253,6 +259,10 @@ <DependentUpon>CloseProgramCommand.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="Forms\WindowCommand.resx"> + <DependentUpon>WindowCommand.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="Forms\DisplayPowerCommand.resx"> <DependentUpon>DisplayPowerCommand.cs</DependentUpon> <SubType>Designer</SubType> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -1720,13 +1720,13 @@ public string szTypeName; }; - private struct POINTAPI + struct POINTAPI { public int x; public int y; } - private struct RECT + struct RECT { public int left; public int top; @@ -1734,7 +1734,7 @@ public int bottom; } - private struct WINDOWPLACEMENT + struct WINDOWPLACEMENT { public int length; public int flags; @@ -2158,7 +2158,7 @@ int curThreadID = GetCurrentThreadId(); - // if we don't attach successfully to the windows thread then we're out of options + // If we don't attach successfully to the windows thread then we're out of options if (!AttachThreadInput(curThreadID, fgWindowPID, true)) return false; @@ -2166,9 +2166,10 @@ BringWindowToTop(hWnd); SetFocus(hWnd); + // Detach AttachThreadInput(curThreadID, fgWindowPID, false); - // we've done all that we can so base our return value on whether we have succeeded or not + // We've done all that we can so base our return value on whether we have succeeded or not return (GetForegroundWindow() == hWnd); } Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-13 15:48:42 UTC (rev 1459) @@ -55,6 +55,7 @@ <LI>Installer: Fixed a registry setting so that Input Service should autoconfigure correctly from now on.</LI> <LI>Direct Input Plugin: Fixed a detection and configuration bug.</LI> <LI>Translator: Fixed a critical bug.</LI> +<LI>Translator: Added process priority adjustment (under the new Advanced configuration menu item).</LI> </UL></P> <BR> Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs 2008-03-13 11:34:33 UTC (rev 1458) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs 2008-03-13 15:48:42 UTC (rev 1459) @@ -12,6 +12,9 @@ namespace InputService.Configuration { + /// <summary> + /// Advanced Configuration Form. + /// </summary> partial class Advanced : Form { @@ -66,7 +69,6 @@ { comboBoxPriority.SelectedItem = value; } - } #endregion Properties This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-14 09:56:21
|
Revision: 1460 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1460&view=rev Author: and-81 Date: 2008-03-14 02:55:40 -0700 (Fri, 14 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs trunk/plugins/IR Server Suite/IR Server Suite.nsi trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj 2008-03-13 15:48:42 UTC (rev 1459) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj 2008-03-14 09:55:40 UTC (rev 1460) @@ -39,10 +39,12 @@ <Reference Include="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <SpecificVersion>False</SpecificVersion> <HintPath>C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll</HintPath> + <Private>True</Private> </Reference> <Reference Include="Microsoft.DirectX.DirectInput, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> <SpecificVersion>False</SpecificVersion> <HintPath>C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.DirectInput.dll</HintPath> + <Private>True</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Drawing" /> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-13 15:48:42 UTC (rev 1459) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-03-14 09:55:40 UTC (rev 1460) @@ -159,14 +159,12 @@ { InitDeviceList(); - if (_deviceList.Count != 0) - return true; + return (_deviceList.Count != 0); } catch { + return false; } - - return false; } /// <summary> Modified: trunk/plugins/IR Server Suite/IR Server Suite.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-13 15:48:42 UTC (rev 1459) +++ trunk/plugins/IR Server Suite/IR Server Suite.nsi 2008-03-14 09:55:40 UTC (rev 1460) @@ -80,19 +80,34 @@ ${DisableX64FSRedirection} + ; Get IR Server Suite installation directory ... ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" ${If} $DIR_INSTALL == "" StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' ${Endif} + ; Get MediaPortal installation directory ... ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + ${Endif} + ; Get MediaPortal TV Server installation directory ... ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + ${Endif} ${EnableX64FSRedirection} @@ -101,19 +116,34 @@ SetRegView 32 + ; Get IR Server Suite installation directory ... ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" ${If} $DIR_INSTALL == "" StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' ${Endif} + ; Get MediaPortal installation directory ... ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" ${If} $DIR_MEDIAPORTAL == "" - StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + ${Endif} + ; Get MediaPortal TV Server installation directory ... ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" ${If} $DIR_TVSERVER == "" - StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + ${Endif} ${Endif} @@ -377,6 +407,8 @@ File "IR Server Plugins\CoolCommand Receiver\bin\${BuildType}\CoolCommand Receiver.*" File "IR Server Plugins\Custom HID Receiver\bin\${BuildType}\Custom HID Receiver.*" File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Direct Input Receiver.*" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.DirectInput.dll" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.dll" File "IR Server Plugins\FusionRemote Receiver\bin\${BuildType}\FusionRemote Receiver.*" File "IR Server Plugins\Girder Plugin\bin\${BuildType}\Girder Plugin.*" File "IR Server Plugins\HCW Receiver\bin\${BuildType}\HCW Receiver.*" Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs 2008-03-13 15:48:42 UTC (rev 1459) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputServiceInstaller.cs 2008-03-14 09:55:40 UTC (rev 1460) @@ -54,8 +54,8 @@ // Start the service ... - using (ServiceController serviceController = new ServiceController(Program.ServiceName)) - serviceController.Start(); + //using (ServiceController serviceController = new ServiceController(Program.ServiceName)) + //serviceController.Start(); } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-14 15:27:25
|
Revision: 1461 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1461&view=rev Author: and-81 Date: 2008-03-14 08:27:23 -0700 (Fri, 14 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.Designer.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.resx Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-14 15:27:23 UTC (rev 1461) @@ -56,6 +56,7 @@ <LI>Direct Input Plugin: Fixed a detection and configuration bug.</LI> <LI>Translator: Fixed a critical bug.</LI> <LI>Translator: Added process priority adjustment (under the new Advanced configuration menu item).</LI> +<LI>WinLirc Plugin: Changed suspend/resume behaviour to fix a bug with repeated buttons after resume from standby.</LI> </UL></P> <BR> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2008-03-14 15:27:23 UTC (rev 1461) @@ -104,7 +104,15 @@ { InitializeComponent(); - checkBoxDisableAutomaticButtons.Checked = !MicrosoftMceTransceiver.CheckAutomaticButtons(); + // Put this in a try...catch so that if the registry keys don't exist we don't throw an ugly exception. + try + { + checkBoxDisableAutomaticButtons.Checked = !MicrosoftMceTransceiver.CheckAutomaticButtons(); + } + catch + { + checkBoxDisableAutomaticButtons.Enabled = false; + } } #endregion Constructor @@ -113,30 +121,33 @@ private void buttonOK_Click(object sender, EventArgs e) { - try + if (checkBoxDisableAutomaticButtons.Enabled) { - bool changeMade = false; + try + { + bool changeMade = false; - bool keysExist = MicrosoftMceTransceiver.CheckAutomaticButtons(); + bool keysExist = MicrosoftMceTransceiver.CheckAutomaticButtons(); - if (checkBoxDisableAutomaticButtons.Checked && keysExist) - { - MicrosoftMceTransceiver.DisableAutomaticButtons(); - changeMade = true; + if (checkBoxDisableAutomaticButtons.Checked && keysExist) + { + MicrosoftMceTransceiver.DisableAutomaticButtons(); + changeMade = true; + } + else if (!checkBoxDisableAutomaticButtons.Checked && !keysExist) + { + MicrosoftMceTransceiver.EnableAutomaticButtons(); + changeMade = true; + } + + if (changeMade) + MessageBox.Show(this, "You must restart the computer for changes to automatic button handling to take effect", "Restart required", MessageBoxButtons.OK, MessageBoxIcon.Information); } - else if (!checkBoxDisableAutomaticButtons.Checked && !keysExist) + catch (Exception ex) { - MicrosoftMceTransceiver.EnableAutomaticButtons(); - changeMade = true; + MessageBox.Show(this, ex.ToString(), "Error modifiying the system registry", MessageBoxButtons.OK); } - - if (changeMade) - MessageBox.Show(this, "You must restart the computer for changes to automatic button handling to take effect", "Restart required", MessageBoxButtons.OK, MessageBoxIcon.Information); } - catch (Exception ex) - { - MessageBox.Show(this, ex.ToString(), "Error modifiying the system registry", MessageBoxButtons.OK); - } this.DialogResult = DialogResult.OK; this.Close(); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-14 15:27:23 UTC (rev 1461) @@ -301,7 +301,15 @@ LoadSettings(); - _ignoreAutomaticButtons = CheckAutomaticButtons(); + // Put this in a try...catch so that if the registry keys don't exist we don't throw an ugly exception. + try + { + _ignoreAutomaticButtons = CheckAutomaticButtons(); + } + catch + { + _ignoreAutomaticButtons = false; + } if (_disableMceServices) DisableMceServices(); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs 2008-03-14 15:27:23 UTC (rev 1461) @@ -104,14 +104,14 @@ /// </summary> public override void Suspend() { - Stop(); + //Stop(); } /// <summary> /// Resume the IR Server plugin when the computer returns from standby. /// </summary> public override void Resume() { - Start(); + //Start(); } /// <summary> /// Stop the IR Server plugin. Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.Designer.cs 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.Designer.cs 2008-03-14 15:27:23 UTC (rev 1461) @@ -71,10 +71,10 @@ this.groupBoxStatus = new System.Windows.Forms.GroupBox(); this.labelStatus = new System.Windows.Forms.Label(); this.treeViewRemotes = new System.Windows.Forms.TreeView(); + this.tabPageMacros = new System.Windows.Forms.TabPage(); + this.listViewMacro = new System.Windows.Forms.ListView(); this.tabPageIR = new System.Windows.Forms.TabPage(); this.listViewIR = new System.Windows.Forms.ListView(); - this.tabPageMacros = new System.Windows.Forms.TabPage(); - this.listViewMacro = new System.Windows.Forms.ListView(); this.tabPageMultiMapping = new System.Windows.Forms.TabPage(); this.listBoxMappings = new System.Windows.Forms.ListBox(); this.labelButton = new System.Windows.Forms.Label(); @@ -90,12 +90,13 @@ this.groupBoxMouseModeOptions = new System.Windows.Forms.GroupBox(); this.labelMouseModeToggle = new System.Windows.Forms.Label(); this.labelMouseStep = new System.Windows.Forms.Label(); + this.checkBoxAbstractRemoteMode = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseStep)).BeginInit(); this.tabControl.SuspendLayout(); this.tabPageRemotes.SuspendLayout(); this.groupBoxStatus.SuspendLayout(); + this.tabPageMacros.SuspendLayout(); this.tabPageIR.SuspendLayout(); - this.tabPageMacros.SuspendLayout(); this.tabPageMultiMapping.SuspendLayout(); this.tabPageEventMapper.SuspendLayout(); this.tabPageMouseMode.SuspendLayout(); @@ -251,7 +252,8 @@ this.checkBoxMultiMapping.TabIndex = 0; this.checkBoxMultiMapping.Text = "Enable"; this.checkBoxMultiMapping.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.toolTips.SetToolTip(this.checkBoxMultiMapping, "Enable the multi-mapping feature, which lets you cycle through remote button mappings"); + this.toolTips.SetToolTip(this.checkBoxMultiMapping, "Enable the multi-mapping feature, which lets you cycle through remote button mapp" + + "ings"); this.checkBoxMultiMapping.UseVisualStyleBackColor = true; // // checkBoxEventMapper @@ -262,7 +264,8 @@ this.checkBoxEventMapper.TabIndex = 0; this.checkBoxEventMapper.Text = "Enable"; this.checkBoxEventMapper.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.toolTips.SetToolTip(this.checkBoxEventMapper, "Enable the event mapper, which lets you map plugin functions to MediaPortal internal events"); + this.toolTips.SetToolTip(this.checkBoxEventMapper, "Enable the event mapper, which lets you map plugin functions to MediaPortal inter" + + "nal events"); this.checkBoxEventMapper.UseVisualStyleBackColor = true; // // buttonSetCommand @@ -438,7 +441,8 @@ this.checkBoxMouseMode.TabIndex = 0; this.checkBoxMouseMode.Text = "Enable"; this.checkBoxMouseMode.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.toolTips.SetToolTip(this.checkBoxMouseMode, "Enable the mouse mode feature, which lets you control the on-screen mouse with your remote"); + this.toolTips.SetToolTip(this.checkBoxMouseMode, "Enable the mouse mode feature, which lets you control the on-screen mouse with yo" + + "ur remote"); this.checkBoxMouseMode.UseVisualStyleBackColor = true; // // comboBoxMouseModeButton @@ -483,7 +487,8 @@ this.checkBoxMouseAcceleration.Size = new System.Drawing.Size(152, 24); this.checkBoxMouseAcceleration.TabIndex = 4; this.checkBoxMouseAcceleration.Text = "Use mouse acceleration"; - this.toolTips.SetToolTip(this.checkBoxMouseAcceleration, "Enable mouse acceleration, which makes the mouse move in larger steps when holding the remote button down"); + this.toolTips.SetToolTip(this.checkBoxMouseAcceleration, "Enable mouse acceleration, which makes the mouse move in larger steps when holdin" + + "g the remote button down"); this.checkBoxMouseAcceleration.UseVisualStyleBackColor = true; // // buttonClearAll @@ -542,6 +547,7 @@ // // tabPageRemotes // + this.tabPageRemotes.Controls.Add(this.checkBoxAbstractRemoteMode); this.tabPageRemotes.Controls.Add(this.comboBoxRemotePresets); this.tabPageRemotes.Controls.Add(this.buttonLoadPreset); this.tabPageRemotes.Controls.Add(this.buttonClearAll); @@ -598,45 +604,12 @@ | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.treeViewRemotes.HideSelection = false; - this.treeViewRemotes.Location = new System.Drawing.Point(8, 8); + this.treeViewRemotes.Location = new System.Drawing.Point(8, 40); this.treeViewRemotes.Name = "treeViewRemotes"; - this.treeViewRemotes.Size = new System.Drawing.Size(552, 192); + this.treeViewRemotes.Size = new System.Drawing.Size(552, 160); this.treeViewRemotes.TabIndex = 0; this.treeViewRemotes.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeViewRemotes_KeyDown); // - // tabPageIR - // - this.tabPageIR.Controls.Add(this.listViewIR); - this.tabPageIR.Controls.Add(this.buttonNewIR); - this.tabPageIR.Controls.Add(this.buttonEditIR); - this.tabPageIR.Controls.Add(this.buttonDeleteIR); - this.tabPageIR.Location = new System.Drawing.Point(4, 22); - this.tabPageIR.Name = "tabPageIR"; - this.tabPageIR.Padding = new System.Windows.Forms.Padding(3); - this.tabPageIR.Size = new System.Drawing.Size(568, 302); - this.tabPageIR.TabIndex = 2; - this.tabPageIR.Text = "IR Commands"; - this.tabPageIR.UseVisualStyleBackColor = true; - // - // listViewIR - // - this.listViewIR.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.listViewIR.FullRowSelect = true; - this.listViewIR.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.listViewIR.HideSelection = false; - this.listViewIR.LabelEdit = true; - this.listViewIR.Location = new System.Drawing.Point(8, 8); - this.listViewIR.MultiSelect = false; - this.listViewIR.Name = "listViewIR"; - this.listViewIR.Size = new System.Drawing.Size(552, 256); - this.listViewIR.TabIndex = 0; - this.listViewIR.UseCompatibleStateImageBehavior = false; - this.listViewIR.View = System.Windows.Forms.View.List; - this.listViewIR.DoubleClick += new System.EventHandler(this.listViewIR_DoubleClick); - this.listViewIR.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewIR_AfterLabelEdit); - // // tabPageMacros // this.tabPageMacros.Controls.Add(this.listViewMacro); @@ -671,6 +644,39 @@ this.listViewMacro.DoubleClick += new System.EventHandler(this.listViewMacro_DoubleClick); this.listViewMacro.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewMacro_AfterLabelEdit); // + // tabPageIR + // + this.tabPageIR.Controls.Add(this.listViewIR); + this.tabPageIR.Controls.Add(this.buttonNewIR); + this.tabPageIR.Controls.Add(this.buttonEditIR); + this.tabPageIR.Controls.Add(this.buttonDeleteIR); + this.tabPageIR.Location = new System.Drawing.Point(4, 22); + this.tabPageIR.Name = "tabPageIR"; + this.tabPageIR.Padding = new System.Windows.Forms.Padding(3); + this.tabPageIR.Size = new System.Drawing.Size(568, 302); + this.tabPageIR.TabIndex = 2; + this.tabPageIR.Text = "IR Commands"; + this.tabPageIR.UseVisualStyleBackColor = true; + // + // listViewIR + // + this.listViewIR.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.listViewIR.FullRowSelect = true; + this.listViewIR.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewIR.HideSelection = false; + this.listViewIR.LabelEdit = true; + this.listViewIR.Location = new System.Drawing.Point(8, 8); + this.listViewIR.MultiSelect = false; + this.listViewIR.Name = "listViewIR"; + this.listViewIR.Size = new System.Drawing.Size(552, 256); + this.listViewIR.TabIndex = 0; + this.listViewIR.UseCompatibleStateImageBehavior = false; + this.listViewIR.View = System.Windows.Forms.View.List; + this.listViewIR.DoubleClick += new System.EventHandler(this.listViewIR_DoubleClick); + this.listViewIR.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewIR_AfterLabelEdit); + // // tabPageMultiMapping // this.tabPageMultiMapping.Controls.Add(this.checkBoxMultiMapping); @@ -854,6 +860,18 @@ this.labelMouseStep.Text = "Mouse step distance:"; this.labelMouseStep.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // + // checkBoxAbstractRemoteMode + // + this.checkBoxAbstractRemoteMode.Enabled = false; + this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(8, 8); + this.checkBoxAbstractRemoteMode.Name = "checkBoxAbstractRemoteMode"; + this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(176, 24); + this.checkBoxAbstractRemoteMode.TabIndex = 6; + this.checkBoxAbstractRemoteMode.Text = "Use Abstract Remote Model"; + this.toolTips.SetToolTip(this.checkBoxAbstractRemoteMode, "Use the abstract remote model"); + this.checkBoxAbstractRemoteMode.UseVisualStyleBackColor = true; + this.checkBoxAbstractRemoteMode.CheckedChanged += new System.EventHandler(this.checkBoxAbstractRemoteMode_CheckedChanged); + // // SetupForm // this.AcceptButton = this.buttonOK; @@ -881,8 +899,8 @@ this.tabControl.ResumeLayout(false); this.tabPageRemotes.ResumeLayout(false); this.groupBoxStatus.ResumeLayout(false); + this.tabPageMacros.ResumeLayout(false); this.tabPageIR.ResumeLayout(false); - this.tabPageMacros.ResumeLayout(false); this.tabPageMultiMapping.ResumeLayout(false); this.tabPageEventMapper.ResumeLayout(false); this.tabPageEventMapper.PerformLayout(); @@ -955,5 +973,6 @@ private System.Windows.Forms.GroupBox groupBoxMouseModeOptions; private System.Windows.Forms.ListView listViewIR; private System.Windows.Forms.ListView listViewMacro; + private System.Windows.Forms.CheckBox checkBoxAbstractRemoteMode; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2008-03-14 15:27:23 UTC (rev 1461) @@ -1019,6 +1019,11 @@ #endregion Other Controls + private void checkBoxAbstractRemoteMode_CheckedChanged(object sender, EventArgs e) + { + // TODO: Implement proper abstract remote model handling + } + } } Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.resx =================================================================== --- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.resx 2008-03-14 09:55:40 UTC (rev 1460) +++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.resx 2008-03-14 15:27:23 UTC (rev 1461) @@ -120,6 +120,9 @@ <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> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>59</value> </metadata> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-16 12:17:25
|
Revision: 1470 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1470&view=rev Author: and-81 Date: 2008-03-16 05:17:24 -0700 (Sun, 16 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-16 10:20:54 UTC (rev 1469) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-16 12:17:24 UTC (rev 1470) @@ -19,11 +19,11 @@ <P>Version 1.0.4.2 <UL> <LI>MP Control plugin: Fixed Macro command for Multi-Mapping.</LI> -<LI>MCE Transceiver: Fixed XP and Replacement driver blasting bug that has existed since October.</LI> +<LI>MCE Remote Receiver: Fixed XP and Replacement driver blasting bug that has existed since October.</LI> <LI>AdsTech 335 Receiver: Attempted to fix a bug that caused Input Service to crash roughly every 5 minutes.</LI> <LI>Installer: New IR Server Suite installer. It looks more professional and you can now change the MediaPortal plugin install paths.</LI> <LI>General: Fixed the "pause" macro command.</LI> -<LI>MCE Transceiver: Fixed another XP and Vista suspend/resume bug. When will it all end? ;)</LI> +<LI>MCE Remote Receiver: Fixed another XP and Vista suspend/resume bug. When will it all end? ;)</LI> <LI>Input plugins: Modified some method signatures.</LI> <LI>TV3 Blaster Plugin: Fixed a fatal error.</LI> <LI>General: Anywhere that previously took user input for a command and could include escape codes can now also include Environment Variables (including clipboard contents, date, time, and others). See documentation for more info.</LI> @@ -57,6 +57,7 @@ <LI>Translator: Fixed a critical bug.</LI> <LI>Translator: Added process priority adjustment (under the new Advanced configuration menu item).</LI> <LI>WinLirc Plugin: Changed suspend/resume behaviour to fix a bug with repeated buttons after resume from standby.</LI> +<LI>MCE Remote Receiver: Fixed an SMK brand receiver issue that was preventing some from receiving remote buttons.</LI> </UL></P> <BR> 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 2008-03-16 10:20:54 UTC (rev 1469) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-03-16 12:17:24 UTC (rev 1470) @@ -1045,7 +1045,7 @@ if (curByte == 0x9F) break; - if (curByte < 0x81 || curByte > 0x8F) + if (curByte < 0x81 || curByte > 0x9E) return null; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-16 10:20:54 UTC (rev 1469) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-16 12:17:24 UTC (rev 1470) @@ -372,31 +372,6 @@ // Send packet byte[] data = DataPacket(code); - /* - if (data.Length > 100) - data = new byte[] { 0x84, 0x8A, 0x30, 0x8A, 0x13, 0x84, 0x94, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x30, 0x8A, 0x13, 0x84, 0x94, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, - 0x84, 0x8A, 0x30, 0x8A, 0x13, 0x84, 0x94, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x09, 0x8B, 0x09, 0x84, 0x8A, 0x7F, 0x17, 0x8A, 0x84, 0x30, 0x8A, 0x13, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x8A, 0x84, 0x09, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x95, 0x84, 0x13, 0x94, 0x13, 0x94, 0x84, 0x09, 0x8A, 0x13, 0x8B, 0x84, 0x30, 0x8A, 0x30, 0x8A, 0x84, 0x13, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8A, 0x84, 0x0A, 0x8A, 0x09, 0x8A, 0x84, 0x0A, 0x8A, 0x09, 0x8A, 0x84, 0x09, 0x95, 0x13, 0x94, 0x84, 0x13, 0x94, 0x09, 0x8A, 0x84, 0x13, 0x8B, 0x30, 0x8A, 0x84, 0x30, 0x8A, 0x13, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x94, 0x84, 0x13, 0x94, 0x13, 0x94, 0x84, 0x09, 0x8A, 0x13, 0x8B, 0x84, 0x30, 0x8A, 0x30, 0x8A, 0x84, 0x13, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8A, 0x84, 0x0A, 0x8A, 0x09, 0x8A, 0x84, 0x0A, 0x94, 0x13, 0x94, 0x84, 0x13, 0x94, 0x09, 0x8B, 0x84, 0x12, 0x8B, 0x30, 0x8A, 0x84, 0x30, 0x8A, 0x13, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x94, 0x84, 0x13, 0x94, 0x13, 0x94, 0x84, 0x09, 0x8B, 0x12, 0x8B, 0x84, 0x30, 0x8A, 0x30, 0x8A, 0x84, 0x13, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8B, 0x84, 0x09, 0x8A, 0x09, 0x8A, 0x84, 0x0A, 0x94, 0x13, 0x94, 0x84, 0x13, 0x94, 0x09, 0x8B, 0x84, 0x12, 0x8B, 0x30, 0x8A, 0x84, 0x30, 0x8A, 0x13, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8B, 0x09, 0x8A, 0x84, 0x09, 0x8A, 0x0A, 0x94, 0x84, 0x13, 0x94, 0x13, 0x94, 0x84, 0x09, 0x8B, 0x12, 0x8B, - 0x83, 0x30, 0x8A, 0x13, 0x80 }; - */ - - //data = new byte[259]; - //for (int index = 0; index < data.Length; index++) - //data[index] = (byte)(index % 256); - - /* - while (data.Length > 255) // use 255 to catch the "0x8x" segment boundaries - { - byte[] segment = new byte[255]; - Array.Copy(data, segment, segment.Length); - - WriteSync(segment); - - byte[] newData = new byte[data.Length - 255]; - Array.Copy(data, 255, newData, 0, newData.Length); - data = newData; - } - */ - // If the code would go longer than the allowable limit, truncate the code if (data.Length > 341) // 340 minus the overhead of 1 byte in 4 for header is 255 bytes of actual time code data, add one for a terminator byte { @@ -1048,7 +1023,7 @@ if (curByte == 0x9F) break; - if (curByte < 0x81 || curByte > 0x8F) + if (curByte < 0x81 || curByte > 0x9E) return null; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-16 10:20:54 UTC (rev 1469) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-16 12:17:24 UTC (rev 1470) @@ -89,89 +89,12 @@ c.Start(); - //Application.Run(); + Console.WriteLine("Test App Started"); + Console.WriteLine("Press a button on your remote to test ..."); - byte[] fileBytes; - //string fileName = @"C:\test2.IR"; - /* - if (c.Learn(out fileBytes) == LearnStatus.Success) - { - using (FileStream writeFile = File.OpenWrite(fileName)) - { - writeFile.Write(fileBytes, 0, fileBytes.Length); - } - } - */ - Console.WriteLine("Testing IR longest length without crashing receiver"); - /* - using (FileStream file = File.OpenRead(fileName)) - { - if (file.Length == 0) - throw new IOException(String.Format("Cannot Blast. IR file \"{0}\" has no data, possible IR learn failure", fileName)); - fileBytes = new byte[file.Length]; - file.Read(fileBytes, 0, (int)file.Length); - } - */ + Application.Run(); - fileBytes = Encoding.ASCII.GetBytes("0000 0076 005A 0000 0009 0019 0009 005D 0007 001A 0007 0062 0007 002E 0009 002C 0009 001E 0009 004A 0007 01E1 0009 0019 0009 0053 0009 0019 0009 001A 0007 001A 0009 002C 0009 001A 0007 001A 0007 0DAB 0009 0019 0009 005D 0007 001A 0009 0061 0007 002E 0007 002E 0009 001E 0009 004A 0007 01E1 0009 0019 0009 002C 0009 003F 0009 001A 0007 001A 0007 002E 0009 0019 0009 001A 0009 0AF5 0009 0019 0009 005B 0009 001A 0007 0062 0007 002E 0009 002C 0009 001E 0009 004A 0007 01E1 0007 001A 0009 002C 0009 0041 0007 0019 0009 001A 0009 002C 0009 0019 0009 001A 0007 0AF7 0007 001A 0009 005D 0007 001A 0007 0062 0007 002E 0009 002C 0009 001E 0009 0048 0009 01E1 0009 0019 0009 002C 0009 003F 0009 001A 0007 001A 0007 002E 0009 0019 0009 0019 0009 0AF7 0009 0019 0009 005B 0009 001A 0009 0061 0007 002E 0007 002E 0009 001E 0009 004A 0007 01E1 0007 001A 0009 002C 0009 003F 0009 001A 0007 001A 0009 002C 0007 001A 0009 001A 0007 0DB9"); - - IrCode code = IrCode.FromByteArray(fileBytes); - //code.Carrier = 37010; - //code.TimingData = new int[] { +150, -5950, +450, -1300, +450, -400, +500, -1250, +450, -450, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +500, -400, +450, -400, +500, -400, +450, -1300, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +450, -450, +450, -400, +500, -1250, +450, -10250, +3450, -1750, +450, -400, +500, -1250, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -1300, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -1250, +500, -400, +450, -1250, +500, -400, +500, -350, +500, -400, +500, -350, +500, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -1250, +500, -350, +500, -400, +500, -350, +500, -400, +500, -400, +450, -400, +500, -400, +450, -400, +500, -400, +450, -1250, +500, -10400 }; - Dump(code.TimingData); - - - Console.WriteLine("Press any key to begin ..."); - Console.ReadKey(); - - int length = 1725000; - //for (int length = 700000; length < 5000000; length += 50000) - while (true) - { - Console.WriteLine("Blasting with approx. total time of {0}us ...", length); - - List<int> newCode = new List<int>(); - - int total = 0; - int pulseTotal = 0; - for (int index = 0; index < code.TimingData.Length; index++) - { - int time = code.TimingData[index]; - - if (total + Math.Abs(time) >= length) - { - if (time > 0) - { - break; - } - else - { - time = total - length; - } - } - - newCode.Add(time); - total += Math.Abs(time); - if (time > 0) - pulseTotal += time; - } - - Console.WriteLine("Blasting with actual total time of {0}us ...", total); - Console.WriteLine("Blasting with total pulse time of {0}us ...", pulseTotal); - - IrCode test = new IrCode(code.Carrier, newCode.ToArray()); - Dump(test.TimingData); - - c.Transmit("Both", test.ToByteArray()); - - Console.WriteLine("Blast complete, press any key to contiue ..."); - if (Console.ReadKey().Key == ConsoleKey.Escape) - break; - } - - Console.WriteLine("Done"); - c.Stop(); c = null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-19 00:38:38
|
Revision: 1482 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1482&view=rev Author: and-81 Date: 2008-03-18 17:38:37 -0700 (Tue, 18 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.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 Plugins/Microsoft MCE Transceiver/IrCode.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -369,10 +369,16 @@ } byte[] fileData = new byte[file.Length]; - file.Read(fileData, 0, (int)file.Length); - _code = IrCode.FromByteArray(fileData); + IrCode newCode = IrCode.FromByteArray(fileData); + if (newCode == null) + { + MessageBox.Show(this, "Not a valid IR code file", "Bad file", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + + _code = newCode; } _fileName = openFileDialog.FileName; @@ -394,6 +400,102 @@ } private void buttonAttemptDecode_Click(object sender, EventArgs e) { + /* + int[][] timingData = new int[][] + { + + new int[] { + +2800, -750, +550, -350, +550, -350, +500, -800, +550, -800, +1400, -800, +550, -350, +500, -400, +500, -400, +500, -350, +550, -350, +500, -400, +500, -400, +500, -350, +500, -400, +500, -8400, +900, -850, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +950, -400, +450, -850, +950, -50800, + }, + + new int[] { + +2700, -850, +450, -400, +500, -400, +500, -850, +500, -850, +1350, -850, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +950, -400, +500, -400, +450, -450, +450, -850, +500, -400, +450, -450, +450, -400, +500, -400, +900, -900, +450, -400, +500, -400, +4600, -31750, + }, + + // RC6A (RC6_24) // no, Replay + new int[] { + 3107, -887, 443, -443, 443, -443, 443, -887, 443, -887, 887, -443, 443, -443, 443, -443, 443, -443, 443, -443, 443, -443, 887, -443, 443, -887, 887, -443, 443, -443, 443, -443, 443, -443, 443, -887, 443, -443, 443, -443, 443, -443, 887, -443, 443, -443, 443, -887, 443, -443, 443, -443, 443, -75000 + }, + + // RC6_MCE + new int[] { + +2750, -800, +550, -350, +500, -350, +550, -800, +500, -800, +1450, // Header + -800, +500, -350, +550, -350, +500, -400, +500, -350, +550, -350, +500, -400, +500, -350, +500, -400, +500, -400, +500, -350, +950, -400, +500, -400, +500, -350, +500, -850, +500, -400, +450, -400, +500, -400, +500, -400, +900, -850, +500, -400, +500, -350, +500, -400, +500, -400, +500, -350, +950, -400, +500, -850, +900, -19050, + }, + // Nothing + new int[] { + +2800, -750, +550, -350, +550, -350, +500, -800, +550, -800, +1400, // Header + -800, +550, -350, +500, -400, +500, -400, +500, -350, +550, -350, +500, -400, +500, -400, +500, -350, +500, -400, +500, -8400, +900, -850, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +950, -400, +450, -850, +950, -70000, + }, + // RC6_24 + new int[] { + +2700, -850, +450, -400, +500, -400, +500, -850, +500, -850, +1350, // Header + -850, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +950, -400, +500, -400, +450, -450, +450, -850, +500, -400, +450, -450, +450, -400, +500, -400, +900, -900, +450, -400, +500, -400, +4600, -61750, + }, + + new int[] { + +2650, -900, +450, -400, +450, -450, +450, -900, +450, -850, +1350, // Header + -900, +450, -400, +500, -400, +450, -450, +450, -450, +450, -400, +500, -400, +450, -450, +450, -450, +450, -400, +500, -400, +900, -450, +450, -450, +450, -400, +450, -450, +5150, -31750, + }, + }; + + for (int index = 0; index < timingData.GetLength(0); index++) + { + IrDecoder.DecodeIR(timingData[index], new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); + + IrCode newCode = new IrCode(timingData[index]); + Pronto.WriteProntoFile(String.Format("C:\\{0}.ir", index), Pronto.ConvertIrCodeToProntoRaw(newCode)); + + } + */ + /* + + byte[] data = new byte[] { + //0x11, 0x8A, 0x08, 0x08, 0x8A, 0x11, 0x11, 0x9B, 0x11, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8B, 0x07, 0x08, 0x8A, 0x08, 0x09, 0x8A, 0x08, 0x09, 0x89, 0x12, 0x08, 0x8A, 0x08, 0x09, 0x89, 0x09, 0x12, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x93, 0x08, 0x08, 0x8A, 0x08, 0x11, 0x89, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x5C + 0x11, 0x89, 0x08, 0x08, 0x8A, 0x11, 0x11, 0x9C, 0x11, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x08, 0x8A, 0x09, 0x11, 0x8B, 0x08, 0x08, 0x8A, 0x08, 0x12, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x12, 0x8A, 0x08, 0x08, 0x92, 0x12, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x5C, + }; + + List<int> timingData = new List<int>(); + + int len = 0; + byte curByte; + int time; + + for (int j = 0; j < data.Length; j++) + { + curByte = data[j]; + + if ((curByte & 0x80) != 0) + len -= (int)(curByte & 0x7F); + else + len += (int)curByte; + + if ((curByte & 0x7F) != 0x7F) + { + time = len * 50; + + if (timingData.Count > 0 && ((timingData[timingData.Count - 1] > 0 && time > 0) || (timingData[timingData.Count - 1] < 0 && time < 0))) + timingData[timingData.Count - 1] += time; + else + timingData.Add(time); + + len = 0; + } + } + + if (len != 0) + { + time = len * 50; + + if ((timingData[timingData.Count - 1] > 0 && time > 0) || (timingData[timingData.Count - 1] < 0 && time < 0)) + timingData[timingData.Count - 1] += time; + else + timingData.Add(time); + } + + IrDecoder.DecodeIR(timingData.ToArray(), new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); + */ + IrDecoder.DecodeIR(_code.TimingData, new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); } @@ -446,37 +548,48 @@ void RemoteEvent(IrProtocol codeType, uint keyCode, bool firstPress) { - if (DialogResult.Yes == MessageBox.Show(this, String.Format("Remote: {0}, {1}\nUse this protocol's carrier frequency?", Enum.GetName(typeof(IrProtocol), codeType), keyCode), "Decode IR", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) + MessageBox.Show(this, String.Format("Protocol: {0}\nCode: {1}", Enum.GetName(typeof(IrProtocol), codeType), keyCode), "Decode IR", MessageBoxButtons.OK, MessageBoxIcon.Information); + + int newCarrier; + switch (codeType) { - switch (codeType) - { - case IrProtocol.Daewoo: textBoxCarrier.Text = "38000"; break; - case IrProtocol.JVC: textBoxCarrier.Text = "38000"; break; - case IrProtocol.Matsushita: textBoxCarrier.Text = "56800"; break; - case IrProtocol.Mitsubishi: textBoxCarrier.Text = "40000"; break; - case IrProtocol.NEC: textBoxCarrier.Text = "38000"; break; - case IrProtocol.NRC17: textBoxCarrier.Text = "38000"; break; - case IrProtocol.Panasonic: textBoxCarrier.Text = "38000"; break; - case IrProtocol.RC5: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RC5X: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RC6: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RC6A: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RC6_MCE: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RC6_Foxtel: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RCA: textBoxCarrier.Text = "56000"; break; - case IrProtocol.RCMM: textBoxCarrier.Text = "36000"; break; - case IrProtocol.RECS80: textBoxCarrier.Text = "38000"; break; - case IrProtocol.Sharp: textBoxCarrier.Text = "38000"; break; - case IrProtocol.SIRC: textBoxCarrier.Text = "40000"; break; - case IrProtocol.Toshiba: textBoxCarrier.Text = "38000"; break; - case IrProtocol.XSAT: textBoxCarrier.Text = "38000"; break; + case IrProtocol.Daewoo: newCarrier = 38000; break; + case IrProtocol.JVC: newCarrier = 38000; break; + case IrProtocol.Matsushita: newCarrier = 56800; break; + case IrProtocol.Mitsubishi: newCarrier = 40000; break; + case IrProtocol.NEC: newCarrier = 38000; break; + case IrProtocol.NRC17: newCarrier = 38000; break; + case IrProtocol.Panasonic: newCarrier = 38000; break; + case IrProtocol.RC5: newCarrier = 36000; break; + case IrProtocol.RC5X: newCarrier = 36000; break; + case IrProtocol.RC6: newCarrier = 36000; break; + case IrProtocol.RC6A: newCarrier = 36000; break; + case IrProtocol.RC6_MCE: newCarrier = 36000; break; + case IrProtocol.RC6_16: newCarrier = 36000; break; + case IrProtocol.RC6_20: newCarrier = 36000; break; + case IrProtocol.RC6_24: newCarrier = 36000; break; + case IrProtocol.RC6_32: newCarrier = 36000; break; + case IrProtocol.RCA: newCarrier = 56000; break; + case IrProtocol.RCMM: newCarrier = 36000; break; + case IrProtocol.RECS80: newCarrier = 38000; break; + case IrProtocol.Sharp: newCarrier = 38000; break; + case IrProtocol.SIRC: newCarrier = 40000; break; + case IrProtocol.Toshiba: newCarrier = 38000; break; + case IrProtocol.XSAT: newCarrier = 38000; break; - default: - return; - } + default: + return; + } - _code.Carrier = int.Parse(textBoxCarrier.Text); + if (_code.Carrier == newCarrier) + return; + if (DialogResult.Yes == MessageBox.Show(this, String.Format("Use this protocol's carrier frequency ({0})?", newCarrier), "Decode IR", MessageBoxButtons.YesNo, MessageBoxIcon.Question)) + { + textBoxCarrier.Text = newCarrier.ToString(); + + _code.Carrier = newCarrier; + RefreshForm(); } } Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -225,7 +225,8 @@ prontoData[i] = ushort.Parse(stringData[i], System.Globalization.NumberStyles.HexNumber); IrCode newCode = Pronto.ConvertProntoDataToIrCode(prontoData); - newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ... + if (newCode != null) + newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ... return newCode; } Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -73,10 +73,22 @@ /// </summary> RC6_MCE, /// <summary> - /// Foxtel's protocol variation of Philips RC6. 36kHz carrier. + /// RC6-6-16 protocol variation of Philips RC6. 36kHz carrier. Used by some Vista MCE remotes (I think). /// </summary> - RC6_Foxtel, + RC6_16, /// <summary> + /// RC6-6-20 protocol variation of Philips RC6. 36kHz carrier. Used by Pace Foxtel STB's. + /// </summary> + RC6_20, + /// <summary> + /// RC6-6-24 protocol variation of Philips RC6. 36kHz carrier. RC6A. + /// </summary> + RC6_24, + /// <summary> + /// RC6-6-32 protocol variation of Philips RC6. 36kHz carrier. Used by Microsoft MCE remote. + /// </summary> + RC6_32, + /// <summary> /// RCA protocol. 56kHz carrier. /// </summary> RCA, @@ -134,16 +146,16 @@ const ushort CustomerMce = 0x800F; const ushort ToggleBitRC5 = 0x0800; - const ushort ToggleMaskRC5 = 0xF7FF; + const ushort ToggleMaskRC5 = 0x07FF; const uint ToggleBitRC5X = 0x00020000; - const ushort ToggleMaskRC5X = 0xFFFF; + const uint ToggleMaskRC5X = 0x0001FFFF; const uint RC6HeaderMask = 0xFFFFFFF0; - const uint PrefixRC6 = 0x000FC950; - const uint PrefixRC6A = 0x000FCA90; - const uint PrefixRC6Foxtel = 0x000FCA93; + //const uint PrefixRC6 = 0x000FC950; + //const uint PrefixRC6A = 0x000FCA90; + //const uint PrefixRC6M2X = 0x000FCA93; const uint MceMouse = 1; const uint MceKeyboard = 4; @@ -998,7 +1010,7 @@ case RemoteDetectionState.HeaderPulse: if (pulse) { - if (IsBetween(duration, 750, 1100)) + if (IsBetween(duration, 700, 1100)) { RC5_Data.State = RemoteDetectionState.HeaderSpace; RC5_Data.Bit = 13; @@ -1019,7 +1031,7 @@ #region HeaderSpace case RemoteDetectionState.HeaderSpace: - if (!pulse && IsBetween(duration, 750, 1000)) + if (!pulse && IsBetween(duration, 700, 1100)) { RC5_Data.State = RemoteDetectionState.Data; RC5_Data.HalfBit = 0; @@ -1034,7 +1046,7 @@ { if (pulse) { - if (IsBetween(duration, 750, 1100) || IsBetween(duration, 1500, 2000)) + if (IsBetween(duration, 700, 1100) || IsBetween(duration, 1500, 2000)) { RC5_Data.HalfBit = (byte)((duration >= 1500) ? 0 : 1); RC5_Data.Bit--; @@ -1047,7 +1059,7 @@ } else { - if (IsBetween(duration, 750, 1100) || IsBetween(duration, 1500, 2000)) + if (IsBetween(duration, 700, 1100) || IsBetween(duration, 1500, 2000)) { RC5_Data.HalfBit = (byte)((duration >= 1500) ? 0 : 1); RC5_Data.Bit--; @@ -1064,41 +1076,29 @@ RC5_Data.Bit += 5; } } - break; } - - if (IsBetween(duration, 750, 1100)) + else // RC5_Data.HalfBit != 0 { - RC5_Data.HalfBit = 0; - ignored = false; + if (IsBetween(duration, 700, 1100)) + { + RC5_Data.HalfBit = 0; + ignored = false; - if ((RC5_Data.Bit == 1) && pulse) - RC5_Data.State = RemoteDetectionState.KeyCode; + if ((RC5_Data.Bit == 1) && pulse) + RC5_Data.State = RemoteDetectionState.KeyCode; + } + else if (RC5_Data.Bit == 7 && (IsBetween(duration, 3400, 3800) || IsBetween(duration, 4300, 4700))) + { + RC5_Data.HalfBit = (byte)((duration >= 4300) ? 0 : 1); + RC5_Data.Code <<= 6; + RC5_Data.Bit += 6; + ignored = false; + } } - else if (RC5_Data.Bit == 7 && (IsBetween(duration, 3400, 3800) || IsBetween(duration, 4300, 4700))) - { - RC5_Data.HalfBit = (byte)((duration >= 4300) ? 0 : 1); - RC5_Data.Code <<= 6; - RC5_Data.Bit += 6; - ignored = false; - } break; #endregion Data - #region Leading - case RemoteDetectionState.Leading: - if (pulse) - break; - - if (duration > 10000) - { - RC5_Data.State = RemoteDetectionState.HeaderPulse; - ignored = false; - } - break; - #endregion Leading - } if (RC5_Data.State == RemoteDetectionState.KeyCode) @@ -1156,14 +1156,14 @@ case RemoteDetectionState.HeaderPulse: if (pulse && IsBetween(duration, 2600, 3300)) { - RC6_Data.State = RemoteDetectionState.HeaderSpace; - RC6_Data.Header = 0x000FC000; - RC6_Data.Bit = 12; - RC6_Data.HalfBit = 0; - RC6_Data.Code = 0; - RC6_Data.LongPulse = false; - RC6_Data.LongSpace = false; - RC6_Data.Toggle &= 0xFE; + RC6_Data.State = RemoteDetectionState.HeaderSpace; + RC6_Data.Header = 0x000FC000; + RC6_Data.Bit = 12; + RC6_Data.HalfBit = 0; + RC6_Data.Code = 0; + RC6_Data.LongPulse = false; + RC6_Data.LongSpace = false; + RC6_Data.Toggle &= 0xFE; ignored = false; } break; @@ -1240,27 +1240,8 @@ } if (!ignored && RC6_Data.Bit == 0) - { - if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6) - { - RC6_Data.Bit = 16; - } - //else if (RC6_Data.Header == PrefixRC6Foxtel) - //{ - //RC6_Data.Bit = 20; - //} - else if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) - { - RC6_Data.Bit = 32; - } - else - { - ignored = true; - break; - } + RC6_Data.State = RemoteDetectionState.Data; - RC6_Data.State = RemoteDetectionState.Data; - } break; #endregion PreData @@ -1274,8 +1255,8 @@ RC6_Data.LongPulse = true; RC6_Data.HalfBit++; - if (RC6_Data.Bit == 1) - RC6_Data.State = RemoteDetectionState.KeyCode; + //if (RC6_Data.Bit == 1) + //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (!pulse && IsBetween(duration, 300, 600)) { @@ -1283,6 +1264,12 @@ RC6_Data.LongSpace = true; RC6_Data.HalfBit++; } + else if (!pulse && duration > 4000) + { + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) + RC6_Data.State = RemoteDetectionState.KeyCode; + } + break; } @@ -1294,17 +1281,29 @@ if (IsBetween(duration, 750, 1000)) { - RC6_Data.Bit--; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.LongSpace = true; RC6_Data.HalfBit += 2; ignored = false; } else if (IsBetween(duration, 300, 600)) { - RC6_Data.Bit--; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.HalfBit++; ignored = false; } + else if (duration > 4000) + { + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) + RC6_Data.State = RemoteDetectionState.KeyCode; + } } else if (RC6_Data.LongSpace) { @@ -1313,28 +1312,38 @@ if (!pulse) break; - if (RC6_Data.Bit == 32) - RC6_Data.Bit = 24; + //if (RC6_Data.Bit == 32) + //RC6_Data.Bit = 24; if (IsBetween(duration, 750, 1000)) { - RC6_Data.Bit--; - RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.Code |= 1; + //RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.LongPulse = true; RC6_Data.HalfBit += 2; ignored = false; - if (RC6_Data.Bit == 1) - RC6_Data.State = RemoteDetectionState.KeyCode; + //if (RC6_Data.Bit == 1) + //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (IsBetween(duration, 300, 600)) { - RC6_Data.Bit--; - RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.Code |= 1; + RC6_Data.HalfBit++; ignored = false; - if (RC6_Data.Bit == 0) + //if (RC6_Data.Bit == 0) + //RC6_Data.State = RemoteDetectionState.KeyCode; + } + else if (duration > 4000) + { + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) RC6_Data.State = RemoteDetectionState.KeyCode; } } @@ -1363,7 +1372,7 @@ protocolVariation = IrProtocol.RC6_MCE; } - else // Standard RC6 or Non-MCE variations + else // Non-MCE RC6 variations { bool toggleOn = (RC6_Data.Toggle & 1) == 1; @@ -1376,11 +1385,36 @@ else RC6_Data.Toggle = 4; - //if (RC6_Data.Header == PrefixRC6Foxtel) - //protocolVariation = IrProtocol.RC6_Foxtel; - //else - if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) + if (RC6_Data.Bit == 16) + protocolVariation = IrProtocol.RC6_16; + else if (RC6_Data.Bit == 20) + protocolVariation = IrProtocol.RC6_20; + else if (RC6_Data.Bit == 24) + protocolVariation = IrProtocol.RC6_24; + else if (RC6_Data.Bit == 32) + protocolVariation = IrProtocol.RC6_32; + else + break; + + /* + if (RC6_Data.Header == PrefixRC6M2X) + { + if (RC6_Data.Bit == 16) + protocolVariation = IrProtocol.RC6_16; + else if (RC6_Data.Bit == 20) + protocolVariation = IrProtocol.RC6_20; + else if (RC6_Data.Bit == 24) + protocolVariation = IrProtocol.RC6_24; + else if (RC6_Data.Bit == 32) + protocolVariation = IrProtocol.RC6_32; + else + break; + } + else if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) + { protocolVariation = IrProtocol.RC6A; + } + */ } remoteCallback(protocolVariation, RC6_Data.Code, first); Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -250,20 +250,20 @@ for (int i = 13; i > 0; i--) { - if ((rc5 & (1 << i)) != 0) // Logic 1 (S, P) + if ((rc5 & (1 << i)) != 0) // Logic 1 (Space, Pulse) { if (currentTime > 0) { timingData.Add(currentTime); currentTime = 0; } - + currentTime -= 900; timingData.Add(currentTime); - + currentTime = 900; } - else // Logic 0 (P, S) + else // Logic 0 (Pulse, Space) { if (currentTime < 0) { Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -501,8 +501,16 @@ process.Start(); // Give new process focus ... - if (!process.StartInfo.CreateNoWindow && process.StartInfo.WindowStyle != ProcessWindowStyle.Hidden && forceFocus) + if (forceFocus && !process.StartInfo.CreateNoWindow && process.StartInfo.WindowStyle != ProcessWindowStyle.Hidden) { + process.WaitForInputIdle(5000); + + Thread focusForcer = new Thread(new ParameterizedThreadStart(FocusForcer)); + focusForcer.Name = String.Format("Focus Forcer: {0}", process.MainWindowTitle); + focusForcer.IsBackground = true; + focusForcer.Start(process.MainWindowTitle); + + /* int attempt = 0; while (!process.HasExited && attempt++ < 50) { @@ -514,6 +522,7 @@ Thread.Sleep(500); } + */ } if (waitForExit) @@ -521,6 +530,33 @@ } } + static void FocusForcer(object processObj) + { + string title = processObj as string; + + if (title == null) + throw new ArgumentException("Argument is not a string object", "processObj"); + + IntPtr windowHandle; + + while ((windowHandle = Win32.FindWindowByTitle(title)) != IntPtr.Zero) + { + IntPtr focused = Win32.ForegroundWindow(); + + string focusedTitle = Win32.GetWindowTitle(focused); + + Trace.WriteLine(String.Format("Focused: {0}", focused.ToInt32())); + + if (!title.Equals(focusedTitle, StringComparison.Ordinal) && !Win32.IsWindowChild(windowHandle, focused) && Win32.GetParentWindow(focused) != windowHandle) + { + Win32.SetForegroundWindow(windowHandle, true); + Trace.WriteLine(String.Format("Give focus to {0}", windowHandle.ToInt32())); + } + + Thread.Sleep(1500); + } + } + /// <summary> /// Given a split Serial Command this method will send the command over the serial port according to the command structure supplied. /// </summary> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -1907,11 +1907,41 @@ StringBuilder lpClassName, int nMaxCount); + [DllImport("user32.dll")] + static extern bool IsChild( + IntPtr hWndParent, + IntPtr hWndChild); + + [DllImport("user32.dll")] + static extern IntPtr GetParent( + IntPtr hWnd); + #endregion Interop #region Methods /// <summary> + /// Gets the parent window. + /// </summary> + /// <param name="child">The child.</param> + /// <returns>Handle to parent window.</returns> + public static IntPtr GetParentWindow(IntPtr child) + { + return GetParent(child); + } + + /// <summary> + /// Determines whether one window is a child of another. + /// </summary> + /// <param name="parent">The parent.</param> + /// <param name="child">The child.</param> + /// <returns><c>true</c> if the window is a child of the parent; otherwise, <c>false</c>.</returns> + public static bool IsWindowChild(IntPtr parent, IntPtr child) + { + return IsChild(parent, child); + } + + /// <summary> /// Gets the desktop window handle. /// </summary> /// <returns></returns> 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 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -53,7 +53,7 @@ /// </summary> Microsoft = 0, /// <summary> - /// Device is an third party SMK or Topseed MCE transceiver. + /// Device is a third party SMK or Topseed MCE transceiver. /// </summary> SmkTopseed = 1, } @@ -212,6 +212,9 @@ try { + if (_readHandle == null) + throw new InvalidOperationException("Cannot stop, device is not active"); + _notifyWindow.DeviceArrival -= new DeviceEventHandler(OnDeviceArrival); _notifyWindow.DeviceRemoval -= new DeviceEventHandler(OnDeviceRemoval); @@ -223,12 +226,14 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; + } #else catch { -#endif throw; } +#endif finally { _notifyWindow.Dispose(); @@ -249,10 +254,28 @@ DebugWriteLine("Suspend()"); #endif - WriteSync(StopPacket); + try + { + if (_readHandle == null) + throw new InvalidOperationException("Cannot suspend, device is not active"); - StopReadThread(); - CloseDevice(); + WriteSync(StopPacket); + + StopReadThread(); + CloseDevice(); + } +#if DEBUG + catch (Exception ex) + { + DebugWriteLine(ex.ToString()); + throw; + } +#else + catch + { + throw; + } +#endif } /// <summary> @@ -267,13 +290,11 @@ try { if (String.IsNullOrEmpty(Driver.Find(_deviceGuid))) - { -#if DEBUG - DebugWriteLine("Device not available"); -#endif - return; - } + throw new InvalidOperationException("Device not available"); + if (_readHandle != null) + throw new InvalidOperationException("Cannot resume, device is active"); + OpenDevice(); StartReadThread(); InitializeDevice(); @@ -282,6 +303,7 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; } #else catch @@ -392,6 +414,7 @@ /// </summary> void InitializeDevice() { + WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); // Testing some commands that MCE sends, but I don't know what they mean (what do these get back?) @@ -749,8 +772,10 @@ if (!success) throw new InvalidOperationException("Failed to initialize safe wait handle"); + IntPtr dangerousWaitHandle = safeWaitHandle.DangerousGetHandle(); + DeviceIoOverlapped overlapped = new DeviceIoOverlapped(); - overlapped.ClearAndSetEvent(safeWaitHandle.DangerousGetHandle()); + overlapped.ClearAndSetEvent(dangerousWaitHandle); deviceBufferPtr = Marshal.AllocHGlobal(DeviceBufferSize); 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 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -523,14 +523,23 @@ if (!_deviceAvailable) throw new InvalidOperationException("Device not available"); - try + int lastError; + + using (WaitHandle waitHandle = new ManualResetEvent(false)) { - int lastError; + SafeHandle safeWaitHandle = waitHandle.SafeWaitHandle; - using (WaitHandle waitHandle = new ManualResetEvent(false)) + bool success = false; + safeWaitHandle.DangerousAddRef(ref success); + if (!success) + throw new InvalidOperationException("Failed to initialize safe wait handle"); + + try { + IntPtr dangerousWaitHandle = safeWaitHandle.DangerousGetHandle(); + DeviceIoOverlapped overlapped = new DeviceIoOverlapped(); - overlapped.ClearAndSetEvent(waitHandle.SafeWaitHandle.DangerousGetHandle()); + overlapped.ClearAndSetEvent(dangerousWaitHandle); bool deviceIoControl = DeviceIoControl(_eHomeHandle, ioControlCode, inBuffer, inBufferSize, outBuffer, outBufferSize, out bytesReturned, overlapped.Overlapped); lastError = Marshal.GetLastWin32Error(); @@ -549,13 +558,17 @@ throw new Win32Exception(lastError); } } - } - catch - { - if (_eHomeHandle != null) - CancelIo(_eHomeHandle); + catch + { + if (_eHomeHandle != null) + CancelIo(_eHomeHandle); - throw; + throw; + } + finally + { + safeWaitHandle.DangerousRelease(); + } } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -53,7 +53,7 @@ /// </summary> Microsoft = 0, /// <summary> - /// Device is an third party SMK or Topseed MCE transceiver. + /// Device is a third party SMK or Topseed MCE transceiver. /// </summary> SmkTopseed = 1, } @@ -211,6 +211,9 @@ try { + if (_eHomeHandle == null) + throw new InvalidOperationException("Cannot stop, device is not active"); + _notifyWindow.DeviceArrival -= new DeviceEventHandler(OnDeviceArrival); _notifyWindow.DeviceRemoval -= new DeviceEventHandler(OnDeviceRemoval); @@ -222,12 +225,14 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; + } #else catch { -#endif throw; } +#endif finally { _notifyWindow.Dispose(); @@ -248,10 +253,28 @@ DebugWriteLine("Suspend()"); #endif - WriteSync(StopPacket); + try + { + if (_eHomeHandle == null) + throw new InvalidOperationException("Cannot suspend, device is not active"); - StopReadThread(); - CloseDevice(); + WriteSync(StopPacket); + + StopReadThread(); + CloseDevice(); + } +#if DEBUG + catch (Exception ex) + { + DebugWriteLine(ex.ToString()); + throw; + } +#else + catch + { + throw; + } +#endif } /// <summary> @@ -266,13 +289,11 @@ try { if (String.IsNullOrEmpty(Driver.Find(_deviceGuid))) - { -#if DEBUG - DebugWriteLine("Device not available"); -#endif - return; - } + throw new InvalidOperationException("Device not available"); + if (_eHomeHandle != null) + throw new InvalidOperationException("Cannot resume, device is active"); + OpenDevice(); StartReadThread(); InitializeDevice(); @@ -281,6 +302,7 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; } #else catch @@ -391,6 +413,7 @@ /// </summary> void InitializeDevice() { + WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); // Testing some commands that MCE sends, but I don't know what they mean (what do these get back?) @@ -727,8 +750,10 @@ if (!success) throw new InvalidOperationException("Failed to initialize safe wait handle"); + IntPtr dangerousWaitHandle = safeWaitHandle.DangerousGetHandle(); + DeviceIoOverlapped overlapped = new DeviceIoOverlapped(); - overlapped.ClearAndSetEvent(safeWaitHandle.DangerousGetHandle()); + overlapped.ClearAndSetEvent(dangerousWaitHandle); deviceBufferPtr = Marshal.AllocHGlobal(DeviceBufferSize); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrCode.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrCode.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrCode.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -225,7 +225,8 @@ prontoData[i] = ushort.Parse(stringData[i], System.Globalization.NumberStyles.HexNumber); IrCode newCode = Pronto.ConvertProntoDataToIrCode(prontoData); - newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ... + if (newCode != null) + newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ... return newCode; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -73,10 +73,22 @@ /// </summary> RC6_MCE, /// <summary> - /// Foxtel's protocol variation of Philips RC6. 36kHz carrier. + /// RC6-6-16 protocol variation of Philips RC6. 36kHz carrier. Used by some Vista MCE remotes (I think). /// </summary> - RC6_Foxtel, + RC6_16, /// <summary> + /// RC6-6-20 protocol variation of Philips RC6. 36kHz carrier. Used by Pace Foxtel STB's. + /// </summary> + RC6_20, + /// <summary> + /// RC6-6-24 protocol variation of Philips RC6. 36kHz carrier. RC6A. + /// </summary> + RC6_24, + /// <summary> + /// RC6-6-32 protocol variation of Philips RC6. 36kHz carrier. Used by Microsoft MCE remote. + /// </summary> + RC6_32, + /// <summary> /// RCA protocol. 56kHz carrier. /// </summary> RCA, @@ -134,16 +146,16 @@ const ushort CustomerMce = 0x800F; const ushort ToggleBitRC5 = 0x0800; - const ushort ToggleMaskRC5 = 0xF7FF; + const ushort ToggleMaskRC5 = 0x07FF; const uint ToggleBitRC5X = 0x00020000; - const ushort ToggleMaskRC5X = 0xFFFF; + const uint ToggleMaskRC5X = 0x0001FFFF; const uint RC6HeaderMask = 0xFFFFFFF0; - const uint PrefixRC6 = 0x000FC950; - const uint PrefixRC6A = 0x000FCA90; - const uint PrefixRC6Foxtel = 0x000FCA93; + //const uint PrefixRC6 = 0x000FC950; + //const uint PrefixRC6A = 0x000FCA90; + //const uint PrefixRC6M2X = 0x000FCA93; const uint MceMouse = 1; const uint MceKeyboard = 4; @@ -998,7 +1010,7 @@ case RemoteDetectionState.HeaderPulse: if (pulse) { - if (IsBetween(duration, 750, 1100)) + if (IsBetween(duration, 700, 1100)) { RC5_Data.State = RemoteDetectionState.HeaderSpace; RC5_Data.Bit = 13; @@ -1019,7 +1031,7 @@ #region HeaderSpace case RemoteDetectionState.HeaderSpace: - if (!pulse && IsBetween(duration, 750, 1000)) + if (!pulse && IsBetween(duration, 700, 1100)) { RC5_Data.State = RemoteDetectionState.Data; RC5_Data.HalfBit = 0; @@ -1034,7 +1046,7 @@ { if (pulse) { - if (IsBetween(duration, 750, 1100) || IsBetween(duration, 1500, 2000)) + if (IsBetween(duration, 700, 1100) || IsBetween(duration, 1500, 2000)) { RC5_Data.HalfBit = (byte)((duration >= 1500) ? 0 : 1); RC5_Data.Bit--; @@ -1047,7 +1059,7 @@ } else { - if (IsBetween(duration, 750, 1100) || IsBetween(duration, 1500, 2000)) + if (IsBetween(duration, 700, 1100) || IsBetween(duration, 1500, 2000)) { RC5_Data.HalfBit = (byte)((duration >= 1500) ? 0 : 1); RC5_Data.Bit--; @@ -1064,41 +1076,29 @@ RC5_Data.Bit += 5; } } - break; } - - if (IsBetween(duration, 750, 1100)) + else // RC5_Data.HalfBit != 0 { - RC5_Data.HalfBit = 0; - ignored = false; + if (IsBetween(duration, 700, 1100)) + { + RC5_Data.HalfBit = 0; + ignored = false; - if ((RC5_Data.Bit == 1) && pulse) - RC5_Data.State = RemoteDetectionState.KeyCode; + if ((RC5_Data.Bit == 1) && pulse) + RC5_Data.State = RemoteDetectionState.KeyCode; + } + else if (RC5_Data.Bit == 7 && (IsBetween(duration, 3400, 3800) || IsBetween(duration, 4300, 4700))) + { + RC5_Data.HalfBit = (byte)((duration >= 4300) ? 0 : 1); + RC5_Data.Code <<= 6; + RC5_Data.Bit += 6; + ignored = false; + } } - else if (RC5_Data.Bit == 7 && (IsBetween(duration, 3400, 3800) || IsBetween(duration, 4300, 4700))) - { - RC5_Data.HalfBit = (byte)((duration >= 4300) ? 0 : 1); - RC5_Data.Code <<= 6; - RC5_Data.Bit += 6; - ignored = false; - } break; #endregion Data - #region Leading - case RemoteDetectionState.Leading: - if (pulse) - break; - - if (duration > 10000) - { - RC5_Data.State = RemoteDetectionState.HeaderPulse; - ignored = false; - } - break; - #endregion Leading - } if (RC5_Data.State == RemoteDetectionState.KeyCode) @@ -1156,14 +1156,14 @@ case RemoteDetectionState.HeaderPulse: if (pulse && IsBetween(duration, 2600, 3300)) { - RC6_Data.State = RemoteDetectionState.HeaderSpace; - RC6_Data.Header = 0x000FC000; - RC6_Data.Bit = 12; - RC6_Data.HalfBit = 0; - RC6_Data.Code = 0; - RC6_Data.LongPulse = false; - RC6_Data.LongSpace = false; - RC6_Data.Toggle &= 0xFE; + RC6_Data.State = RemoteDetectionState.HeaderSpace; + RC6_Data.Header = 0x000FC000; + RC6_Data.Bit = 12; + RC6_Data.HalfBit = 0; + RC6_Data.Code = 0; + RC6_Data.LongPulse = false; + RC6_Data.LongSpace = false; + RC6_Data.Toggle &= 0xFE; ignored = false; } break; @@ -1240,27 +1240,8 @@ } if (!ignored && RC6_Data.Bit == 0) - { - if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6) - { - RC6_Data.Bit = 16; - } - //else if (RC6_Data.Header == PrefixRC6Foxtel) - //{ - //RC6_Data.Bit = 20; - //} - else if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) - { - RC6_Data.Bit = 32; - } - else - { - ignored = true; - break; - } + RC6_Data.State = RemoteDetectionState.Data; - RC6_Data.State = RemoteDetectionState.Data; - } break; #endregion PreData @@ -1274,8 +1255,8 @@ RC6_Data.LongPulse = true; RC6_Data.HalfBit++; - if (RC6_Data.Bit == 1) - RC6_Data.State = RemoteDetectionState.KeyCode; + //if (RC6_Data.Bit == 1) + //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (!pulse && IsBetween(duration, 300, 600)) { @@ -1283,6 +1264,12 @@ RC6_Data.LongSpace = true; RC6_Data.HalfBit++; } + else if (!pulse && duration > 4000) + { + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) + RC6_Data.State = RemoteDetectionState.KeyCode; + } + break; } @@ -1294,17 +1281,29 @@ if (IsBetween(duration, 750, 1000)) { - RC6_Data.Bit--; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.LongSpace = true; RC6_Data.HalfBit += 2; ignored = false; } else if (IsBetween(duration, 300, 600)) { - RC6_Data.Bit--; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.HalfBit++; ignored = false; } + else if (duration > 4000) + { + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) + RC6_Data.State = RemoteDetectionState.KeyCode; + } } else if (RC6_Data.LongSpace) { @@ -1313,28 +1312,38 @@ if (!pulse) break; - if (RC6_Data.Bit == 32) - RC6_Data.Bit = 24; + //if (RC6_Data.Bit == 32) + //RC6_Data.Bit = 24; if (IsBetween(duration, 750, 1000)) { - RC6_Data.Bit--; - RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.Code |= 1; + //RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.LongPulse = true; RC6_Data.HalfBit += 2; ignored = false; - if (RC6_Data.Bit == 1) - RC6_Data.State = RemoteDetectionState.KeyCode; + //if (RC6_Data.Bit == 1) + //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (IsBetween(duration, 300, 600)) { - RC6_Data.Bit--; - RC6_Data.Code |= (uint)1 << RC6_Data.Bit; + RC6_Data.Bit++; + RC6_Data.Code = RC6_Data.Code << 1; + RC6_Data.Code |= 1; + RC6_Data.HalfBit++; ignored = false; - if (RC6_Data.Bit == 0) + //if (RC6_Data.Bit == 0) + //RC6_Data.State = RemoteDetectionState.KeyCode; + } + else if (duration > 4000) + { + if (RC6_Data.Bit == 16 || RC6_Data.Bit == 20 || RC6_Data.Bit == 24 || RC6_Data.Bit == 32) RC6_Data.State = RemoteDetectionState.KeyCode; } } @@ -1363,7 +1372,7 @@ protocolVariation = IrProtocol.RC6_MCE; } - else // Standard RC6 or Non-MCE variations + else // Non-MCE RC6 variations { bool toggleOn = (RC6_Data.Toggle & 1) == 1; @@ -1376,11 +1385,36 @@ else RC6_Data.Toggle = 4; - //if (RC6_Data.Header == PrefixRC6Foxtel) - //protocolVariation = IrProtocol.RC6_Foxtel; - //else - if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) + if (RC6_Data.Bit == 16) + protocolVariation = IrProtocol.RC6_16; + else if (RC6_Data.Bit == 20) + protocolVariation = IrProtocol.RC6_20; + else if (RC6_Data.Bit == 24) + protocolVariation = IrProtocol.RC6_24; + else if (RC6_Data.Bit == 32) + protocolVariation = IrProtocol.RC6_32; + else + break; + + /* + if (RC6_Data.Header == PrefixRC6M2X) + { + if (RC6_Data.Bit == 16) + protocolVariation = IrProtocol.RC6_16; + else if (RC6_Data.Bit == 20) + protocolVariation = IrProtocol.RC6_20; + else if (RC6_Data.Bit == 24) + protocolVariation = IrProtocol.RC6_24; + else if (RC6_Data.Bit == 32) + protocolVariation = IrProtocol.RC6_32; + else + break; + } + else if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) + { protocolVariation = IrProtocol.RC6A; + } + */ } remoteCallback(protocolVariation, RC6_Data.Code, first); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -300,8 +300,14 @@ if (_driver != null) { - _driver.Stop(); - _driver = null; + try + { + _driver.Stop(); + } + finally + { + _driver = null; + } } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs 2008-03-17 16:46:10 UTC (rev 1481) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs 2008-03-19 00:38:37 UTC (rev 1482) @@ -252,20 +252,20 @@ for (int i = 13; i > 0; i--) { - if ((rc5 & (1 << i)) != 0) // Logic 1 (S, P) + if ((rc5 & (1 << i)) != 0) // Logic 1 (Space, Pulse) { if (currentTime > 0) { timingData.Add(currentTime); currentTime = 0; } - + currentTime -= 900; timingData.Add(currentTime); - + currentTime = 900; } - else // Logic 0 (P, S) + else // Logic 0 (Pulse, Space) { if (currentTime < 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-19 06:36:44
|
Revision: 1483 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1483&view=rev Author: and-81 Date: 2008-03-18 23:36:43 -0700 (Tue, 18 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.resx trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/Resources.resx Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.resx trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.resx trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Graphics/Start.png trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Graphics/Stop.png Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -21,6 +21,7 @@ string _serverHost; string _processPriority; + bool _hideTrayIcon; List<ButtonMapping> _systemWideMappings; List<ProgramSettings> _programSettings; @@ -53,6 +54,17 @@ } /// <summary> + /// Gets or sets a value indicating whether to hide the tray icon. + /// </summary> + /// <value><c>true</c> to hide the tray icon; otherwise, <c>false</c>.</value> + [XmlElement] + public bool HideTrayIcon + { + get { return _hideTrayIcon; } + set { _hideTrayIcon = value; } + } + + /// <summary> /// System wide button mappings. /// </summary> /// <value>The system wide mappings.</value> @@ -93,6 +105,7 @@ { _serverHost = "localhost"; _processPriority = "No Change"; + _hideTrayIcon = false; _systemWideMappings = new List<ButtonMapping>(); _programSettings = new List<ProgramSettings>(); Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.Designer.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,160 @@ +namespace Translator +{ + + partial class Advanced + { + + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Advanced)); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.toolTips = new System.Windows.Forms.ToolTip(this.components); + this.labelPriority = new System.Windows.Forms.Label(); + this.comboBoxPriority = new System.Windows.Forms.ComboBox(); + this.groupBoxTrayIcon = new System.Windows.Forms.GroupBox(); + this.groupBoxPriority = new System.Windows.Forms.GroupBox(); + this.checkBoxHideTrayIcon = new System.Windows.Forms.CheckBox(); + this.groupBoxTrayIcon.SuspendLayout(); + this.groupBoxPriority.SuspendLayout(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(272, 136); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // 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(200, 136); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // labelPriority + // + this.labelPriority.Location = new System.Drawing.Point(8, 21); + this.labelPriority.Name = "labelPriority"; + this.labelPriority.Size = new System.Drawing.Size(88, 24); + this.labelPriority.TabIndex = 0; + this.labelPriority.Text = "Set Priority:"; + this.labelPriority.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxPriority + // + this.comboBoxPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxPriority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxPriority.FormattingEnabled = true; + this.comboBoxPriority.Location = new System.Drawing.Point(104, 24); + this.comboBoxPriority.Name = "comboBoxPriority"; + this.comboBoxPriority.Size = new System.Drawing.Size(216, 21); + this.comboBoxPriority.TabIndex = 1; + // + // groupBoxTrayIcon + // + this.groupBoxTrayIcon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxTrayIcon.Controls.Add(this.checkBoxHideTrayIcon); + this.groupBoxTrayIcon.Location = new System.Drawing.Point(8, 72); + this.groupBoxTrayIcon.Name = "groupBoxTrayIcon"; + this.groupBoxTrayIcon.Size = new System.Drawing.Size(328, 56); + this.groupBoxTrayIcon.TabIndex = 1; + this.groupBoxTrayIcon.TabStop = false; + this.groupBoxTrayIcon.Text = "Tray Icon"; + // + // groupBoxPriority + // + this.groupBoxPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxPriority.Controls.Add(this.labelPriority); + this.groupBoxPriority.Controls.Add(this.comboBoxPriority); + this.groupBoxPriority.Location = new System.Drawing.Point(8, 8); + this.groupBoxPriority.Name = "groupBoxPriority"; + this.groupBoxPriority.Size = new System.Drawing.Size(328, 56); + this.groupBoxPriority.TabIndex = 0; + this.groupBoxPriority.TabStop = false; + this.groupBoxPriority.Text = "Process Priority"; + // + // checkBoxHideTrayIcon + // + this.checkBoxHideTrayIcon.AutoSize = true; + this.checkBoxHideTrayIcon.Location = new System.Drawing.Point(8, 24); + this.checkBoxHideTrayIcon.Name = "checkBoxHideTrayIcon"; + this.checkBoxHideTrayIcon.Size = new System.Drawing.Size(109, 17); + this.checkBoxHideTrayIcon.TabIndex = 0; + this.checkBoxHideTrayIcon.Text = "Hide the tray icon"; + this.toolTips.SetToolTip(this.checkBoxHideTrayIcon, "Hides the tray icon until Translator is launched again"); + this.checkBoxHideTrayIcon.UseVisualStyleBackColor = true; + // + // Advanced + // + 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(344, 168); + this.Controls.Add(this.groupBoxTrayIcon); + this.Controls.Add(this.groupBoxPriority); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "Advanced"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Translator - Advanced Configuration"; + this.groupBoxTrayIcon.ResumeLayout(false); + this.groupBoxTrayIcon.PerformLayout(); + this.groupBoxPriority.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.ToolTip toolTips; + private System.Windows.Forms.Label labelPriority; + private System.Windows.Forms.ComboBox comboBoxPriority; + private System.Windows.Forms.GroupBox groupBoxTrayIcon; + private System.Windows.Forms.CheckBox checkBoxHideTrayIcon; + private System.Windows.Forms.GroupBox groupBoxPriority; + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,90 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using IrssUtils; + +namespace Translator +{ + + /// <summary> + /// Advanced Configuration Form. + /// </summary> + partial class Advanced : Form + { + + #region Properties + + /// <summary> + /// Gets or sets the process priority. + /// </summary> + /// <value>The process priority.</value> + public string ProcessPriority + { + get + { + return comboBoxPriority.SelectedItem as string; + } + set + { + comboBoxPriority.SelectedItem = value; + } + } + + /// <summary> + /// Gets or sets a value indicating whether to hide the tray icon. + /// </summary> + /// <value><c>true</c> to hide tray icon; otherwise, <c>false</c>.</value> + public bool HideTrayIcon + { + get + { + return checkBoxHideTrayIcon.Checked; + } + set + { + checkBoxHideTrayIcon.Checked = value; + } + } + + #endregion Properties + + #region Constructor + + /// <summary> + /// Initializes a new instance of the <see cref="Advanced"/> class. + /// </summary> + public Advanced() + { + InitializeComponent(); + + comboBoxPriority.Items.Add("No Change"); + comboBoxPriority.Items.AddRange(Enum.GetNames(typeof(ProcessPriorityClass))); + comboBoxPriority.SelectedIndex = 0; + } + + #endregion Constructor + + #region Controls + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + #endregion Controls + + } + +} Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/Advanced.resx 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,189 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAIAICAAAAEACACoCAAAJgAAABAQAAABAAgAaAUAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEKhLwBBoC8AQqAwAEKiLwBAnS4ARq0yAEauMgBBny4AQqMwAD+Z + LQBFqjEAsuWoAJzdjwBDpTAAPpctAJTahQD1/PQAlduGAECcLgBAmy4ARakxAOT24ADG7L4AQZ8vAEi0 + MwBUwj8A8/vyAIbVdgBAni4AUMA6AMHquABYw0MAl9yJAOj35ABLujUAQ6MwALfmrQDp+OYAaspXAESo + MQDP78gAwuq6AOP13gC4564ARasxAD+aLQBJtjQARKcwAECdMgA9lzYAPpg4AD6aMwDm9uIAjNd8AILU + cgBxzV4APpYsAEy8NgDE67wAQ6QwAEOdMABFmTQASJg2AEaYNABEnTIAP5syAD2VRgBimpYAapmlAFei + dgBAnTkAQJ0vAO356gBnyVMA6/joAEewMgCQ2YEA9/z2AI3YfgBDnDEAUpY/AISedACpnJ4Am5+NAFqP + SABGlzQAOow9AE2HkABPT+sAQkLqAGZp6gBSmnkAPJU3AGvLVwDy+/AA4fXcAKzjoABJtzQAQJguAEyS + OwCKkHoA4GvcAN5I2QDgVNsAoW6UAFx6TABHlzUAP5gxADWDVABRYNMAExPjAAkJ5AAgIOcAXXXIADmM + SwBAnjEAb8xbAEGeLgDc89YAweq5AESmMABBky8AXYdMAMVzvQDaMNQA1A7NANYU0ADQPMgAf2FxAFSG + QwA/mjQAMXhbADxOywAODuQABgbkABgY5QBJaLwAOIpNAD+cMABvzFwAyOzAANbx0AC76LIAQ5ExAGOB + UgC6YrEA2CfRANMKzADWD88AyzLDAIJYdQBWiUUAQZ8xADeFSAApZoEANT7aAC4z4QA4RtIAL3VuADuQ + PABAmy8AYsdOAPD67gBmyVMAuOevAD+YLQCb3Y0AZchRAEKZMABTiEMAe29sAMlUwQDWOc8A0TzJAJdN + igBpb1oATJY6AECbNQA3h0cALW9lAC1ubwAwdWMAOIpEAD+aMgB3z2QAWMREAGjKVQDq+OYAuuewAEWY + MwBRikAAZntWAHNxYwBvbWEAYnpSAFCSPgA+mDYAPJM4AEGeMgBHsTMA4vXeAF7GSgBcxUgARJ8xAEWY + NABHlDYASJc2AEaaNABDnjEA0vDMANjy0gBOwDkAc85gAGDHTACE1XQAk9qFAEq5NQBjx08APZMsAI7Y + fgBGrDIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA////AAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB + AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB + AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAgECAQEBAgEBAgIBAh0CAQEBAgICAgEBAQIBAQEC + AQIBAQEBAQEBAQECAh083QIBBAIBAQICAQIBAQEBAQEBAQEBAQEBAQEBAQEIBdwqCx0BAgECAQICAgEB + AQEBAQEBAgIBAQICAgEEAttKSykoCAECAgEBAgEBAQICAgEBAgICAQECAQEBAQQdHSU12hMIGB0IAgEB + AQIBAQEBAgEBAgEBAQECAgEBAgrIXww8CC4I2NkIAgICAgEBAgIBAQEBAQEBAQECAQECD9Vf1hMdBdcR + IQECAgIEAQECAQEBAQEBAQEBAQEBAR0kj44GBRQG0tPUFAI8HQIBAQEBAQEBAQICMcXGMscCCsjJpwgI + BcpLDR0PBiHLEwLMzc7P0NECArKztLW2t7gFOia5OQIuIU66pg+7vL0Evr/AwcLDxEGZmpucnZ6foKGi + o6QKAgWlS3kFpqdfqKmqq6ytrq+wsYOEhYaHiImKi4xfGhQBAo2OFAUTjysokJGSk5SVlpeYbG1ub3Bx + cnN0dV8aDwJ2F3cPEx14YHl6e3x9fn+AgYJIV1hZWltcXRNeXyAKAgIfYAIFLmFJYmNkZWZnaGlqawJC + Q0RFRkdIBRpJSjkCEyxLTAUKTU5PE1BRUlNUVVYCAgIxMjM0CAIFGTU2CgIdNxE4Ljk6OxA8Aj0+P0BB + AgIBAQECCAIBAQUoKSoOHRQjKywtLgQvMAIBAQIIAgEBAQEBBAEBAQQBAgghIiMTEyQlJicIAggIAgEE + AQEBBAEBAQIBAQICAQECDxobHB0IEx4fIAIBAQEBAQECAgEBAgEBAQECAgIBAgQUFRYXBhMFGBkEAgEB + AQICAQICAgEBAQICAQIBAgECBAIPEBESAQICEwIBAQEBAgIBAgECAQICCAEBAQICAgEBCQoLDA0OCAIB + AQEBAQEBAQICAgEBAQgBAQECAQEBAQEEAgUGBwICAQEBAQEBAQEBAQEBAgEBAQICAQICAQMDAQEBAgIC + AgEBAQEBAQECAQICAQICAQICAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB + AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB + AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAQqEvAEGgLwBCoDAAQJ8uAEOmMABBny4AQaEvAFWtRAC15qwAQaEuAECd + LgCb1pAAdMJlAECcLgBmv1QAR6k0AEGgLgDE6rsAQ6QwAM7uxwBLqzgAQ6UwAEyfTwBSm2cAPpg3AEes + MwCx46YAP5stAG69XwCm3JsAPpksAKXemgBovFgAQp8vAGyoWwBnlFcASJc2ADuSOgBebNYALzDnADlm + lwBSrEoApN6YAD+cLgCCxXQAjseDAD+cLQBCoi8AcK9hAOV04ADQLcoAglZ1ADqPPwBFWckAIiXjACtW + mABPqUoAp9+cAIDDcgCRyoUAyu3DAEmoNwBlolUA2GHTAM0ixQCLTH8AQZ8wADmPQAA1g1AAOpA+AESo + MAC35q0AQJwtAFy2SwC15awAPpktAIvSfQBmulUAQJ0vAE+RPgBbgkoATpI+AECeLgC96LQASas2AMjs + wQBZtkcAQKAuAIvLfwCP0YIAVa1DAEOlLwBJpjYAwuq6AEKjLwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAD///8AAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAgECAgZfAgIC + AgICAQICAgECAgJdXl8CAgICAgIBAgICAgFTWVpJW1wCAgECAgIBAQIBU1RVAlZXB1gBAgEBQ0RFRkdI + SUpLTE1OT1BRUjU2Nzg5Ogs7PBw9Pj9AQUImJygpKissLS4vFDAxMjM0BBcYGRobHB0eHyAhIiMkJQEC + EQEREgUTFBUWBwERAgECAgICCwwNDg8QAQICAgICBgICAgcICQoGAgECAgICBgICAgMBBAUCAQEBAgIC + AgIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +</value> + </data> +</root> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -98,6 +98,7 @@ this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -105,7 +106,6 @@ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.advancedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStripButtonMapping.SuspendLayout(); this.tabControl.SuspendLayout(); this.tabPagePrograms.SuspendLayout(); @@ -819,6 +819,13 @@ this.serverToolStripMenuItem.Text = "&Server ..."; this.serverToolStripMenuItem.Click += new System.EventHandler(this.serverToolStripMenuItem_Click); // + // advancedToolStripMenuItem + // + this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; + this.advancedToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.advancedToolStripMenuItem.Text = "&Advanced ..."; + this.advancedToolStripMenuItem.Click += new System.EventHandler(this.advancedToolStripMenuItem_Click); + // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; @@ -863,13 +870,6 @@ this.saveFileDialog.Filter = "XML Files|*.xml"; this.saveFileDialog.Title = "Export settings ..."; // - // advancedToolStripMenuItem - // - this.advancedToolStripMenuItem.Name = "advancedToolStripMenuItem"; - this.advancedToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.advancedToolStripMenuItem.Text = "&Advanced ..."; - this.advancedToolStripMenuItem.Click += new System.EventHandler(this.advancedToolStripMenuItem_Click); - // // MainForm // this.AcceptButton = this.buttonOK; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -1171,15 +1171,18 @@ { Advanced advanced = new Advanced(); advanced.ProcessPriority = Program.Config.ProcessPriority; + advanced.HideTrayIcon = Program.Config.HideTrayIcon; if (advanced.ShowDialog(this) == DialogResult.OK) { if (!advanced.ProcessPriority.Equals(Program.Config.ProcessPriority, StringComparison.OrdinalIgnoreCase)) { Program.Config.ProcessPriority = advanced.ProcessPriority; + Program.AdjustPriority(Program.Config.ProcessPriority); + } - Program.AdjustPriority(Program.Config.ProcessPriority); - } + Program.Config.HideTrayIcon = advanced.HideTrayIcon; + Program.TrayIcon.Visible = !Program.Config.HideTrayIcon; } } private void quitToolStripMenuItem_Click(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -36,6 +36,16 @@ #endregion Constants + #region Components + + static NotifyIcon _notifyIcon; + static MainForm _mainForm; + static Client _client; + static Configuration _config; + static CopyDataWM _copyDataWM; + + #endregion Components + #region Variables static string _learnIRFilename; @@ -74,18 +84,13 @@ get { return _irServerInfo; } } + internal static NotifyIcon TrayIcon + { + get { return _notifyIcon; } + } + #endregion Properties - #region Components - - static NotifyIcon _notifyIcon; - static MainForm _mainForm; - static Client _client; - static Configuration _config; - static CopyDataWM _copyDataWM; - - #endregion Components - #region Main /// <summary> @@ -110,7 +115,10 @@ // Check for multiple instances. if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1) + { + CopyDataWM.SendCopyDataMessage(Common.CmdPrefixShowTrayIcon); return; + } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); @@ -195,6 +203,8 @@ IrssLog.Error("Error enabling CopyData messages: {0}", ex.ToString()); } + _notifyIcon.Visible = !_config.HideTrayIcon; + Application.Run(); if (_copyDataWM != null) @@ -658,7 +668,6 @@ _notifyIcon.Icon = Properties.Resources.Icon16Connecting; _notifyIcon.Text = "Translator - Connecting ..."; - _notifyIcon.Visible = true; ClientMessageSink sink = new ClientMessageSink(ReceivedMessage); @@ -1233,6 +1242,14 @@ Keyboard.ProcessCommand(sms.TextOutput); } } + else if (command.StartsWith(Common.CmdPrefixShowTrayIcon, StringComparison.OrdinalIgnoreCase)) + { + if (!_notifyIcon.Visible) + { + _notifyIcon.Visible = true; + _notifyIcon.ShowBalloonTip(1000, "Translator", "Icon is now visible", ToolTipIcon.Info); + } + } else { throw new ArgumentException(String.Format("Cannot process unrecognized command \"{0}\"", command), "commandObj"); Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -129,6 +129,8 @@ public const string CmdPrefixVirtualKB = "Show Virtual Keyboard"; public const string CmdPrefixSmsKB = "Show SMS Keyboard"; + public const string CmdPrefixShowTrayIcon = "Show Tray Icon"; + // Macro Commands ... public const string CmdPrefixGotoLabel = "Goto Label: "; public const string CmdPrefixLabel = "Label: "; @@ -503,7 +505,7 @@ // Give new process focus ... if (forceFocus && !process.StartInfo.CreateNoWindow && process.StartInfo.WindowStyle != ProcessWindowStyle.Hidden) { - process.WaitForInputIdle(5000); + process.WaitForInputIdle(15000); Thread focusForcer = new Thread(new ParameterizedThreadStart(FocusForcer)); focusForcer.Name = String.Format("Focus Forcer: {0}", process.MainWindowTitle); @@ -545,12 +547,12 @@ string focusedTitle = Win32.GetWindowTitle(focused); - Trace.WriteLine(String.Format("Focused: {0}", focused.ToInt32())); + //Trace.WriteLine(String.Format("Focused: {0}", focused.ToInt32())); if (!title.Equals(focusedTitle, StringComparison.Ordinal) && !Win32.IsWindowChild(windowHandle, focused) && Win32.GetParentWindow(focused) != windowHandle) { Win32.SetForegroundWindow(windowHandle, true); - Trace.WriteLine(String.Format("Give focus to {0}", windowHandle.ToInt32())); + //Trace.WriteLine(String.Format("Give focus to {0}", windowHandle.ToInt32())); } Thread.Sleep(1500); Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -39,6 +39,9 @@ this.toolStripButtonDetect = new System.Windows.Forms.ToolStripButton(); this.toolStripButtonAdvancedSettings = new System.Windows.Forms.ToolStripButton(); this.toolStripButtonHelp = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButtonStop = new System.Windows.Forms.ToolStripButton(); + this.toolStripButtonStart = new System.Windows.Forms.ToolStripButton(); this.groupBoxTransceiver.SuspendLayout(); this.toolStrip.SuspendLayout(); this.SuspendLayout(); @@ -100,7 +103,10 @@ this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripButtonDetect, this.toolStripButtonAdvancedSettings, - this.toolStripButtonHelp}); + this.toolStripButtonHelp, + this.toolStripSeparator, + this.toolStripButtonStop, + this.toolStripButtonStart}); this.toolStrip.Location = new System.Drawing.Point(0, 0); this.toolStrip.Name = "toolStrip"; this.toolStrip.Size = new System.Drawing.Size(504, 25); @@ -136,12 +142,36 @@ this.toolStripButtonHelp.Text = "Help"; this.toolStripButtonHelp.Click += new System.EventHandler(this.toolStripButtonHelp_Click); // + // toolStripSeparator + // + this.toolStripSeparator.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.toolStripSeparator.Name = "toolStripSeparator"; + this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); + // + // toolStripButtonStop + // + this.toolStripButtonStop.Enabled = false; + this.toolStripButtonStop.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonStop.Image"))); + this.toolStripButtonStop.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonStop.Name = "toolStripButtonStop"; + this.toolStripButtonStop.Size = new System.Drawing.Size(49, 22); + this.toolStripButtonStop.Text = "Stop"; + this.toolStripButtonStop.ToolTipText = "Stop the Input Service"; + // + // toolStripButtonStart + // + this.toolStripButtonStart.Enabled = false; + this.toolStripButtonStart.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonStart.Image"))); + this.toolStripButtonStart.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonStart.Name = "toolStripButtonStart"; + this.toolStripButtonStart.Size = new System.Drawing.Size(51, 22); + this.toolStripButtonStart.Text = "Start"; + this.toolStripButtonStart.ToolTipText = "Start the Input Service"; + // // Config // - 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(504, 432); this.Controls.Add(this.toolStrip); this.Controls.Add(this.groupBoxTransceiver); @@ -152,6 +182,7 @@ this.Name = "Config"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Input Service Configuration"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Config_FormClosing); this.groupBoxTransceiver.ResumeLayout(false); this.toolStrip.ResumeLayout(false); this.toolStrip.PerformLayout(); @@ -171,5 +202,8 @@ private System.Windows.Forms.ToolStripButton toolStripButtonDetect; private System.Windows.Forms.ToolStripButton toolStripButtonAdvancedSettings; private System.Windows.Forms.ToolStripButton toolStripButtonHelp; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator; + private System.Windows.Forms.ToolStripButton toolStripButtonStop; + private System.Windows.Forms.ToolStripButton toolStripButtonStart; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -6,6 +6,7 @@ using System.IO; using System.Runtime.InteropServices; using System.Security; +using System.ServiceProcess; using System.Text; using System.Threading; using System.Windows.Forms; @@ -38,6 +39,8 @@ string _hostComputer = String.Empty; string _processPriority = String.Empty; + bool _serviceMonitorActive; + #endregion Variables #region Properties @@ -151,6 +154,12 @@ MessageBox.Show(this, "No Input Service Plugins found!", "Input Service Configuration", MessageBoxButtons.OK, MessageBoxIcon.Error); else CreateGrid(); + + _serviceMonitorActive = true; + Thread serviceMonitor = new Thread(new ThreadStart(ServiceMonitor)); + serviceMonitor.IsBackground = true; + serviceMonitor.Name = "Input Service Monitor"; + serviceMonitor.Start(); } #endregion Constructor @@ -225,6 +234,62 @@ #endregion Controls + void ServiceMonitor() + { + try + { + ServiceController inputService = null; + + ServiceController[] services = ServiceController.GetServices(); + foreach (ServiceController service in services) + { + if (service.ServiceName.Equals(Program.ServiceName, StringComparison.OrdinalIgnoreCase)) + { + inputService = service; + break; + } + } + + if (inputService == null) + throw new InvalidOperationException("Unable to locate Input Service, cannot monitor status"); + + UpdateServiceButtonsDelegate update = new UpdateServiceButtonsDelegate(UpdateServiceButtons); + + while (_serviceMonitorActive) + { + this.Invoke(update, inputService.Status); + + Thread.Sleep(5000); + } + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + } + + delegate void UpdateServiceButtonsDelegate(ServiceControllerStatus status); + void UpdateServiceButtons(ServiceControllerStatus status) + { + switch (status) + { + case ServiceControllerStatus.Running: + toolStripButtonStop.Enabled = true; + toolStripButtonStart.Enabled = false; + break; + + case ServiceControllerStatus.Stopped: + toolStripButtonStop.Enabled = false; + toolStripButtonStart.Enabled = true; + break; + + default: + toolStripButtonStop.Enabled = false; + toolStripButtonStart.Enabled = false; + break; + } + } + void CreateGrid() { IrssLog.Info("Creating configuration grid ..."); @@ -400,6 +465,11 @@ } } + private void Config_FormClosing(object sender, FormClosingEventArgs e) + { + _serviceMonitorActive = false; + } + } } Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.resx =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.resx 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.resx 2008-03-19 06:36:43 UTC (rev 1483) @@ -124,6 +124,22 @@ <value>107, 17</value> </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="toolStripButtonStop.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAACNJREFUOE9jYBhM + 4D/QMaRgDLeTohmkdtSA0TAYpOlgYPIlAJlmj3GVJV9cAAAAAElFTkSuQmCC +</value> + </data> + <data name="toolStripButtonStart.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAKNJREFUOE9jYECA + ciBTGIlPMvM/UMd7IM4HYmaSdQM1gAyA4ctAtjOphiAbAGMvBxoiT6xB2AwAiX0H4mogZidkEC4DYOL3 + gQb44zOEkAEw+d1AQ9SxGUSsASB1v4G4G4j5kQ0ixQCQ2tXoAUysAddxRTEhAwgmMnwGzAbaKk5ONB4H + ajInpBEmj+yC50DBZGI1IhsAip5+9Ogh1qDpuBIIPgMAx/5rImrVViYAAAAASUVORK5CYII= +</value> + </data> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAABAAIAICAAAAEACACoCAAAJgAAABAQEAABAAQAKAEAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAIAE Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj 2008-03-19 00:38:37 UTC (rev 1482) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj 2008-03-19 06:36:43 UTC (rev 1483) @@ -112,6 +112,8 @@ <None Include="Graphics\Detect.png" /> <None Include="Graphics\Advanced.png" /> <Content Include="Graphics\Help.png" /> + <Content Include="Graphics\Start.png" /> + <Content Include="Graphics\Stop.png" /> <Content Include="Input Service Configuration.exe.manifest"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> Added: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.Designer.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,114 @@ +namespace InputService.Configuration +{ + partial class Exclusions + { + /// <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(Exclusions)); + this.listViewExclusions = new System.Windows.Forms.ListView(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.columnHeaderPlugin = new System.Windows.Forms.ColumnHeader(); + this.SuspendLayout(); + // + // listViewExclusions + // + this.listViewExclusions.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.listViewExclusions.CheckBoxes = true; + this.listViewExclusions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeaderPlugin}); + this.listViewExclusions.FullRowSelect = true; + this.listViewExclusions.GridLines = true; + this.listViewExclusions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listViewExclusions.HideSelection = false; + this.listViewExclusions.Location = new System.Drawing.Point(8, 8); + this.listViewExclusions.MultiSelect = false; + this.listViewExclusions.Name = "listViewExclusions"; + this.listViewExclusions.ShowGroups = false; + this.listViewExclusions.Size = new System.Drawing.Size(304, 216); + this.listViewExclusions.TabIndex = 0; + this.listViewExclusions.UseCompatibleStateImageBehavior = false; + this.listViewExclusions.View = System.Windows.Forms.View.Details; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(248, 232); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 2; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // 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(176, 232); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 1; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // columnHeaderPlugin + // + this.columnHeaderPlugin.Text = "Plugin"; + this.columnHeaderPlugin.Width = 284; + // + // Exclusions + // + 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(320, 266); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.listViewExclusions); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MinimizeBox = false; + this.Name = "Exclusions"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Abstrct Remote Model Exclusions"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listViewExclusions; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.ColumnHeader columnHeaderPlugin; + + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.cs (rev 0) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.cs 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace InputService.Configuration +{ + + partial class Exclusions : Form + { + + /// <summary> + /// Gets or sets the exclusion list. + /// </summary> + /// <value>The exclusion list.</value> + public string[] ExclusionList + { + get + { + List<string> exclude = new List<string>(); + foreach (ListViewItem item in listViewExclusions.Items) + { + if (item.Checked) + exclude.Add(item.Text); + } + + if (exclude.Count == 0) + return null; + else + return exclude.ToArray(); + } + set + { + foreach (ListViewItem item in listViewExclusions.Items) + { + foreach (string exclude in value) + { + if (item.Text.Equals(exclude, StringComparison.OrdinalIgnoreCase)) + { + item.Checked = true; + break; + } + } + } + } + } + + /// <summary> + /// Initializes a new instance of the <see cref="Exclusions"/> class. + /// </summary> + /// <param name="plugins">The list of plugins.</param> + public Exclusions(string[] plugins) + { + InitializeComponent(); + + foreach (string plugin in plugins) + listViewExclusions.Items.Add(plugin); + } + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + } + +} Added: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.resx =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.resx (rev 0) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.resx 2008-03-19 06:36:43 UTC (rev 1483) @@ -0,0 +1,168 @@ +<?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="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAIAICAAAAEACACoCAAAJgAAABAQEAABAAQAKAEAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAIAE + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAMDAwADA3MAA8MqmANTw + /wCx4v8AjtT/AGvG/wBIuP8AJar/AACq/wAAktwAAHq5AABilgAASnMAADJQANTj/wCxx/8Ajqv/AGuP + /wBIc/8AJVf/AABV/wAASdwAAD25AAAxlgAAJXMAABlQANTU/wCxsf8Ajo7/AGtr/wBISP8AJSX/AAAA + /gAAANwAAAC5AAAAlgAAAHMAAABQAOPU/wDHsf8Aq47/AI9r/wBzSP8AVyX/AFUA/wBJANwAPQC5ADEA + lgAlAHMAGQBQAPDU/wDisf8A1I7/AMZr/wC4SP8AqiX/AKoA/wCSANwAegC5AGIAlgBKAHMAMgBQAP/U + /wD/sf8A/47/AP9r/wD/SP8A/yX/AP4A/gDcANwAuQC5AJYAlgBzAHMAUABQAP/U8AD/seIA/47UAP9r + xgD/SLgA/yWqAP8AqgDcAJIAuQB6AJYAYgBzAEoAUAAyAP/U4wD/sccA/46rAP9rjwD/SHMA/yVXAP8A + VQDcAEkAuQA9AJYAMQBzACUAUAAZAP/U1AD/sbEA/46OAP9rawD/SEgA/yUlAP4AAADcAAAAuQAAAJYA + AABzAAAAUAAAAP/j1AD/x7EA/6uOAP+PawD/c0gA/1clAP9VAADcSQAAuT0AAJYxAABzJQAAUBkAAP/w + 1AD/4rEA/9SOAP/GawD/uEgA/6olAP+qAADckgAAuXoAAJZiAABzSgAAUDIAAP//1AD//7EA//+OAP// + awD//0gA//8lAP7+AADc3AAAubkAAJaWAABzcwAAUFAAAPD/1ADi/7EA1P+OAMb/awC4/0gAqv8lAKr/ + AACS3AAAerkAAGKWAABKcwAAMlAAAOP/1ADH/7EAq/+OAI//awBz/0gAV/8lAFX/AABJ3AAAPbkAADGW + AAAlcwAAGVAAANT/1ACx/7EAjv+OAGv/awBI/0gAJf8lAAD+AAAA3AAAALkAAACWAAAAcwAAAFAAANT/ + 4wCx/8cAjv+rAGv/jwBI/3MAJf9XAAD/VQAA3EkAALk9AACWMQAAcyUAAFAZANT/8ACx/+IAjv/UAGv/ + xgBI/7gAJf+qAAD/qgAA3JIAALl6AACWYgAAc0oAAFAyANT//wCx//8Ajv//AGv//wBI//8AJf//AAD+ + /gAA3NwAALm5AACWlgAAc3MAAFBQAPLy8gDm5uYA2traAM7OzgDCwsIAtra2AKqqqgCenp4AkpKSAIaG + hgB6enoAbm5uAGJiYgBWVlYASkpKAD4+PgAyMjIAJiYmABoaGgAODg4A8Pv/AKSgoACAgIAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + /Pw... [truncated message content] |
From: <an...@us...> - 2008-03-19 14:57:19
|
Revision: 1484 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1484&view=rev Author: and-81 Date: 2008-03-19 07:54:17 -0700 (Wed, 19 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs trunk/plugins/IR Server Suite/Documentation/new.html 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 Plugins/Microsoft MCE Transceiver/NotifyWindow.cs trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -197,12 +197,12 @@ string[] commands = Common.SplitRunCommand(suffix); tabControl.SelectTab(tabPageProgram); - textBoxApp.Text = commands[0]; - textBoxAppStartFolder.Text = commands[1]; + textBoxApp.Text = commands[0]; + textBoxAppStartFolder.Text = commands[1]; textBoxApplicationParameters.Text = commands[2]; - comboBoxWindowStyle.SelectedItem = commands[3]; - checkBoxNoWindow.Checked = bool.Parse(commands[4]); - checkBoxShellExecute.Checked = bool.Parse(commands[5]); + comboBoxWindowStyle.SelectedItem = commands[3]; + checkBoxNoWindow.Checked = bool.Parse(commands[4]); + checkBoxShellExecute.Checked = bool.Parse(commands[5]); break; } @@ -211,12 +211,12 @@ string[] commands = Common.SplitSerialCommand(suffix); tabControl.SelectTab(tabPageSerial); - textBoxSerialCommand.Text = commands[0]; - comboBoxComPort.SelectedItem = commands[1]; - numericUpDownBaudRate.Value = decimal.Parse(commands[2]); - comboBoxParity.SelectedItem = commands[3]; - numericUpDownDataBits.Value = decimal.Parse(commands[4]); - comboBoxStopBits.SelectedItem = commands[5]; + textBoxSerialCommand.Text = commands[0]; + comboBoxComPort.SelectedItem = commands[1]; + numericUpDownBaudRate.Value = decimal.Parse(commands[2]); + comboBoxParity.SelectedItem = commands[3]; + numericUpDownDataBits.Value = decimal.Parse(commands[4]); + comboBoxStopBits.SelectedItem = commands[5]; checkBoxWaitForResponse.Checked = bool.Parse(commands[6]); break; @@ -479,14 +479,29 @@ textBoxCommand.Text = _command = Common.CmdPrefixSmsKB; break; - //comboBoxMiscCommand.Items.Add(Common.UITextTcpMsg); - //comboBoxMiscCommand.Items.Add(Common.UITextHttpMsg); + case Common.UITextTcpMsg: + TcpMessageCommand tcpMessageCommand = new TcpMessageCommand(); + if (tcpMessageCommand.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixTcpMsg + tcpMessageCommand.CommandString; + break; + case Common.UITextHttpMsg: + HttpMessageCommand httpMessageCommand = new HttpMessageCommand(); + if (httpMessageCommand.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixHttpMsg + httpMessageCommand.CommandString; + break; + case Common.UITextEject: - textBoxCommand.Text = _command = Common.CmdPrefixEject; + EjectCommand ejectCommand = new EjectCommand(); + if (ejectCommand.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixEject + ejectCommand.CommandString; break; - //comboBoxMiscCommand.Items.Add(Common.UITextPopup); + case Common.UITextPopup: + PopupMessage popupMessage = new PopupMessage(); + if (popupMessage.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixPopup + popupMessage.CommandString; + break; case Common.UITextStandby: textBoxCommand.Text = _command = Common.CmdPrefixStandby; @@ -504,8 +519,20 @@ textBoxCommand.Text = _command = Common.CmdPrefixShutdown; break; - //comboBoxMiscCommand.Items.Add(Common.UITextBeep); - //comboBoxMiscCommand.Items.Add(Common.UITextSound); + case Common.UITextBeep: + BeepCommand beepCommand = new BeepCommand(); + if (beepCommand.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixBeep + beepCommand.CommandString; + break; + + case Common.UITextSound: + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Filter = "Wave Files|*.wav"; + openFileDialog.Multiselect = false; + + if (openFileDialog.ShowDialog(this) == DialogResult.OK) + textBoxCommand.Text = Common.CmdPrefixSound + openFileDialog.FileName; + break; } break; Modified: trunk/plugins/IR Server Suite/Documentation/new.html =================================================================== --- trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-03-19 14:54:17 UTC (rev 1484) @@ -58,6 +58,9 @@ <LI>Translator: Added process priority adjustment (under the new Advanced configuration menu item).</LI> <LI>WinLirc Plugin: Changed suspend/resume behaviour to fix a bug with repeated buttons after resume from standby.</LI> <LI>MCE Remote Receiver: Fixed an SMK brand receiver issue that was preventing some from receiving remote buttons.</LI> +<LI>Translator: Fixed broken misc command types on the button mapping form.</LI> +<LI>Translator: Added option to hide the tray icon in Advanced configuration. To reveal the icon just run the Translator application again.</LI> +<LI>Input Service Configuration: Added Start and Stop buttons to the toolbar.</LI> </UL></P> <BR> 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 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -236,6 +236,7 @@ #endif finally { + _notifyWindow.UnregisterDeviceArrival(); _notifyWindow.Dispose(); _notifyWindow = null; @@ -257,7 +258,12 @@ try { if (_readHandle == null) - throw new InvalidOperationException("Cannot suspend, device is not active"); + { +#if DEBUG + DebugWriteLine("Warning: Device is not active"); +#endif + return; + } WriteSync(StopPacket); @@ -290,11 +296,18 @@ try { if (String.IsNullOrEmpty(Driver.Find(_deviceGuid))) - throw new InvalidOperationException("Device not available"); + { +#if DEBUG + DebugWriteLine("Device not found"); +#endif + return; + } if (_readHandle != null) - throw new InvalidOperationException("Cannot resume, device is active"); + throw new InvalidOperationException("Cannot resume, device is already active"); + //_notifyWindow.RegisterDeviceArrival(); + OpenDevice(); StartReadThread(); InitializeDevice(); @@ -382,7 +395,7 @@ public override void Send(IrCode code, int port) { #if DEBUG - DebugWriteLine("Send()"); + DebugWrite("Send(): "); DebugDump(code.TimingData); #endif @@ -414,6 +427,10 @@ /// </summary> void InitializeDevice() { +#if DEBUG + DebugWriteLine("InitializeDevice()"); +#endif + WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); @@ -651,7 +668,7 @@ } /// <summary> - /// Opens the device. + /// Opens the device handles and registers for device removal notification. /// </summary> void OpenDevice() { @@ -687,13 +704,20 @@ throw new Win32Exception(lastError); } - _notifyWindow.RegisterDeviceRemoval(_readHandle.DangerousGetHandle()); + bool success = false; + _readHandle.DangerousAddRef(ref success); + if (success) + _notifyWindow.RegisterDeviceRemoval(_readHandle.DangerousGetHandle()); +#if DEBUG + else + DebugWriteLine("Warning: Failed to initialize device removal notification"); +#endif _deviceAvailable = true; } /// <summary> - /// Close all handles to the device. + /// Close all handles to the device and unregisters device removal notification. /// </summary> void CloseDevice() { @@ -715,6 +739,8 @@ { _notifyWindow.UnregisterDeviceRemoval(); + _readHandle.DangerousRelease(); + CloseHandle(_readHandle); _readHandle.Dispose(); @@ -730,6 +756,9 @@ } } + /// <summary> + /// Called when device arrival is notified. + /// </summary> void OnDeviceArrival() { #if DEBUG @@ -740,6 +769,9 @@ StartReadThread(); InitializeDevice(); } + /// <summary> + /// Called when device removal is notified. + /// </summary> void OnDeviceRemoval() { #if DEBUG @@ -763,15 +795,15 @@ SafeHandle safeWaitHandle = waitHandle.SafeWaitHandle; WaitHandle[] waitHandles = new WaitHandle[] { waitHandle, _stopReadThread }; - IntPtr deviceBufferPtr = IntPtr.Zero; + IntPtr deviceBufferPtr = IntPtr.Zero; + bool success = false; + safeWaitHandle.DangerousAddRef(ref success); + if (!success) + throw new InvalidOperationException("Failed to initialize safe wait handle"); + try { - bool success = false; - safeWaitHandle.DangerousAddRef(ref success); - if (!success) - throw new InvalidOperationException("Failed to initialize safe wait handle"); - IntPtr dangerousWaitHandle = safeWaitHandle.DangerousGetHandle(); DeviceIoOverlapped overlapped = new DeviceIoOverlapped(); @@ -819,7 +851,7 @@ Marshal.Copy(deviceBufferPtr, packetBytes, 0, bytesRead); #if DEBUG - DebugWriteLine("Received data:"); + DebugWrite("Received bytes ({0}): ", bytesRead); DebugDump(packetBytes); #endif @@ -975,7 +1007,7 @@ void WriteSync(byte[] data) { #if DEBUG - DebugWriteLine("WriteSync({0} bytes)", data.Length); + DebugWrite("WriteSync({0}): ", data.Length); DebugDump(data); #endif @@ -1045,8 +1077,6 @@ int[] GetTimingDataFromPacket(byte[] packet) { #if DEBUG - DebugWriteLine("GetTimingDataFromPacket()"); - // TODO: Remove this try/catch block once the IndexOutOfRangeException is corrected... try #endif @@ -1117,7 +1147,7 @@ timingData.Add(len * TimingResolution); #if DEBUG - DebugWriteLine("Received:"); + DebugWrite("Received timing: "); DebugDump(timingData.ToArray()); #endif @@ -1127,7 +1157,7 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); - DebugWriteLine("Method Input:"); + DebugWrite("Method Input: "); DebugDump(packet); return null; 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 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -13,7 +13,7 @@ { /// <summary> - /// Driver class for Windows Vista eHome driver. + /// Driver class for the Windows Vista eHome driver. /// </summary> class DriverVista : Driver { @@ -622,14 +622,17 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; + } #else catch { -#endif throw; } +#endif finally { + _notifyWindow.UnregisterDeviceArrival(); _notifyWindow.Dispose(); _notifyWindow = null; @@ -666,7 +669,7 @@ if (String.IsNullOrEmpty(Driver.Find(_deviceGuid))) { #if DEBUG - DebugWriteLine("Device not available"); + DebugWriteLine("Device not found"); #endif return; } @@ -681,6 +684,7 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); + throw; } #else catch @@ -763,7 +767,7 @@ public override void Send(IrCode code, int port) { #if DEBUG - DebugWriteLine("Send()"); + DebugWrite("Send(): "); DebugDump(code.TimingData); #endif @@ -789,6 +793,10 @@ /// </summary> void InitializeDevice() { +#if DEBUG + DebugWriteLine("InitializeDevice()"); +#endif + GetDeviceCapabilities(); GetBlasters(); } @@ -876,7 +884,7 @@ } /// <summary> - /// Opens the device. + /// Opens the device handles and registers for device removal notification. /// </summary> void OpenDevice() { @@ -892,15 +900,24 @@ return; } + int lastError; + _eHomeHandle = CreateFile(_devicePath, CreateFileAccessTypes.GenericRead | CreateFileAccessTypes.GenericWrite, CreateFileShares.None, IntPtr.Zero, CreateFileDisposition.OpenExisting, CreateFileAttributes.Overlapped, IntPtr.Zero); - int lastError = Marshal.GetLastWin32Error(); + lastError = Marshal.GetLastWin32Error(); if (_eHomeHandle.IsInvalid) { _eHomeHandle = null; throw new Win32Exception(lastError); } - _notifyWindow.RegisterDeviceRemoval(_eHomeHandle.DangerousGetHandle()); + bool success = false; + _eHomeHandle.DangerousAddRef(ref success); + if (success) + _notifyWindow.RegisterDeviceRemoval(_eHomeHandle.DangerousGetHandle()); +#if DEBUG + else + DebugWriteLine("Warning: Failed to initialize device removal notification"); +#endif Thread.Sleep(PacketTimeout); // Hopefully improves compatibility with Zalman remote which times out retrieving device capabilities. (2008-01-01) @@ -908,7 +925,7 @@ } /// <summary> - /// Close all handles to the device. + /// Close all handles to the device and unregisters device removal notification. /// </summary> void CloseDevice() { @@ -928,12 +945,17 @@ _notifyWindow.UnregisterDeviceRemoval(); + _eHomeHandle.DangerousRelease(); + CloseHandle(_eHomeHandle); _eHomeHandle.Dispose(); _eHomeHandle = null; } + /// <summary> + /// Called when device arrival is notified. + /// </summary> void OnDeviceArrival() { #if DEBUG @@ -946,6 +968,9 @@ StartReceive(_receivePort, PacketTimeout); StartReadThread(ReadThreadMode.Receiving); } + /// <summary> + /// Called when device removal is notified. + /// </summary> void OnDeviceRemoval() { #if DEBUG @@ -996,7 +1021,7 @@ int[] timingData = GetTimingDataFromPacket(packetBytes); #if DEBUG - DebugWriteLine("Received:"); + DebugWrite("Received timing: "); DebugDump(timingData); #endif Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -235,6 +235,7 @@ #endif finally { + _notifyWindow.UnregisterDeviceArrival(); _notifyWindow.Dispose(); _notifyWindow = null; @@ -256,7 +257,12 @@ try { if (_eHomeHandle == null) - throw new InvalidOperationException("Cannot suspend, device is not active"); + { +#if DEBUG + DebugWriteLine("Warning: Device is not active"); +#endif + return; + } WriteSync(StopPacket); @@ -289,11 +295,18 @@ try { if (String.IsNullOrEmpty(Driver.Find(_deviceGuid))) - throw new InvalidOperationException("Device not available"); + { +#if DEBUG + DebugWriteLine("Device not found"); +#endif + return; + } if (_eHomeHandle != null) - throw new InvalidOperationException("Cannot resume, device is active"); + throw new InvalidOperationException("Cannot resume, device is already active"); + //_notifyWindow.RegisterDeviceArrival(); + OpenDevice(); StartReadThread(); InitializeDevice(); @@ -381,7 +394,7 @@ public override void Send(IrCode code, int port) { #if DEBUG - DebugWriteLine("Send()"); + DebugWrite("Send(): "); DebugDump(code.TimingData); #endif @@ -413,6 +426,10 @@ /// </summary> void InitializeDevice() { +#if DEBUG + DebugWriteLine("InitializeDevice()"); +#endif + WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); @@ -650,7 +667,7 @@ } /// <summary> - /// Opens the device. + /// Opens the device handles and registers for device removal notification. /// </summary> void OpenDevice() { @@ -676,13 +693,20 @@ throw new Win32Exception(lastError); } - _notifyWindow.RegisterDeviceRemoval(_eHomeHandle.DangerousGetHandle()); + bool success = false; + _eHomeHandle.DangerousAddRef(ref success); + if (success) + _notifyWindow.RegisterDeviceRemoval(_eHomeHandle.DangerousGetHandle()); +#if DEBUG + else + DebugWriteLine("Warning: Failed to initialize device removal notification"); +#endif _deviceAvailable = true; } /// <summary> - /// Close all handles to the device. + /// Close all handles to the device and unregisters device removal notification. /// </summary> void CloseDevice() { @@ -702,12 +726,17 @@ _notifyWindow.UnregisterDeviceRemoval(); + _eHomeHandle.DangerousRelease(); + CloseHandle(_eHomeHandle); _eHomeHandle.Dispose(); _eHomeHandle = null; } + /// <summary> + /// Called when device arrival is notified. + /// </summary> void OnDeviceArrival() { #if DEBUG @@ -718,6 +747,9 @@ StartReadThread(); InitializeDevice(); } + /// <summary> + /// Called when device removal is notified. + /// </summary> void OnDeviceRemoval() { #if DEBUG @@ -741,15 +773,15 @@ SafeHandle safeWaitHandle = waitHandle.SafeWaitHandle; WaitHandle[] waitHandles = new WaitHandle[] { waitHandle, _stopReadThread }; - IntPtr deviceBufferPtr = IntPtr.Zero; + IntPtr deviceBufferPtr = IntPtr.Zero; + bool success = false; + safeWaitHandle.DangerousAddRef(ref success); + if (!success) + throw new InvalidOperationException("Failed to initialize safe wait handle"); + try { - bool success = false; - safeWaitHandle.DangerousAddRef(ref success); - if (!success) - throw new InvalidOperationException("Failed to initialize safe wait handle"); - IntPtr dangerousWaitHandle = safeWaitHandle.DangerousGetHandle(); DeviceIoOverlapped overlapped = new DeviceIoOverlapped(); @@ -797,7 +829,7 @@ Marshal.Copy(deviceBufferPtr, packetBytes, 0, bytesRead); #if DEBUG - DebugWriteLine("Received data:"); + DebugWrite("Received bytes ({0}): ", bytesRead); DebugDump(packetBytes); #endif @@ -953,7 +985,7 @@ void WriteSync(byte[] data) { #if DEBUG - DebugWriteLine("WriteSync({0} bytes)", data.Length); + DebugWrite("WriteSync({0}): ", data.Length); DebugDump(data); #endif @@ -1023,8 +1055,6 @@ int[] GetTimingDataFromPacket(byte[] packet) { #if DEBUG - DebugWriteLine("GetTimingDataFromPacket()"); - // TODO: Remove this try/catch block once the IndexOutOfRangeException is corrected... try #endif @@ -1095,7 +1125,7 @@ timingData.Add(len * TimingResolution); #if DEBUG - DebugWriteLine("Received:"); + DebugWrite("Received timing: "); DebugDump(timingData.ToArray()); #endif @@ -1105,7 +1135,7 @@ catch (Exception ex) { DebugWriteLine(ex.ToString()); - DebugWriteLine("Method Input:"); + DebugWrite("Method Input: "); DebugDump(packet); return null; Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/NotifyWindow.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/NotifyWindow.cs 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/NotifyWindow.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -118,7 +118,10 @@ #endregion IDisposable Members #region Methods - + + /// <summary> + /// Creates the window handle. + /// </summary> internal void Create() { if (Handle != IntPtr.Zero) @@ -130,6 +133,9 @@ CreateHandle(Params); } + /// <summary> + /// Destroys the window handle. + /// </summary> void Destroy() { if (Handle == IntPtr.Zero) Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-19 06:36:43 UTC (rev 1483) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2008-03-19 14:54:17 UTC (rev 1484) @@ -539,8 +539,8 @@ #region Resume case PowerBroadcastStatus.ResumeAutomatic: - case PowerBroadcastStatus.ResumeCritical: - case PowerBroadcastStatus.ResumeSuspend: + //case PowerBroadcastStatus.ResumeCritical: + //case PowerBroadcastStatus.ResumeSuspend: IrssLog.Info("Resume from standby ..."); bool resumedTransmit = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-21 04:49:15
|
Revision: 1491 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1491&view=rev Author: and-81 Date: 2008-03-20 21:49:12 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DeviceIoOverlapped.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Suite.nsi trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.Designer.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Exclusions.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.cs trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.resx Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-20 11:58:28 UTC (rev 1490) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -400,102 +400,97 @@ } private void buttonAttemptDecode_Click(object sender, EventArgs e) { + // NOTES: + // All start with a correct RC6 0xFCA93 header. + /* int[][] timingData = new int[][] { - - new int[] { - +2800, -750, +550, -350, +550, -350, +500, -800, +550, -800, +1400, -800, +550, -350, +500, -400, +500, -400, +500, -350, +550, -350, +500, -400, +500, -400, +500, -350, +500, -400, +500, -8400, +900, -850, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +950, -400, +450, -850, +950, -50800, - }, - new int[] { - +2700, -850, +450, -400, +500, -400, +500, -850, +500, -850, +1350, -850, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +950, -400, +500, -400, +450, -450, +450, -850, +500, -400, +450, -450, +450, -400, +500, -400, +900, -900, +450, -400, +500, -400, +4600, -31750, - }, +new int[] { 2800, -750, 550, -350, 500, -400, 500, -800, 550, -800, 1400, -800, 550, -350, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 950, -350, 500, -400, 500, -400, 500, -850, 450, -400, 500, -400, 500, -400, 6550, -850, 450, -400, 500, -400, 500, -850, 500, -800, 1400, -850, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -2800, 350, -400, 500, -400, 450, -450, 900, -25400 }, - // RC6A (RC6_24) // no, Replay - new int[] { - 3107, -887, 443, -443, 443, -443, 443, -887, 443, -887, 887, -443, 443, -443, 443, -443, 443, -443, 443, -443, 443, -443, 887, -443, 443, -887, 887, -443, 443, -443, 443, -443, 443, -443, 443, -887, 443, -443, 443, -443, 443, -443, 887, -443, 443, -443, 443, -887, 443, -443, 443, -443, 443, -75000 - }, +new int[] { 2800, -750, 550, -350, 550, -350, 500, -800, 550, -800, 1400, -800, 550, -350, 550, -350, 500, -400, 500, -350, 550, -350, 500, -400, 500, -400, 500, -350, 550, -350, 500, -3750, 250, -400, 500, -800, 500, -400, 500, -400, 500, -400, 900, -850, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 500, -400, 500, -350, 500, -400, 950, -31550 }, - // RC6_MCE - new int[] { - +2750, -800, +550, -350, +500, -350, +550, -800, +500, -800, +1450, // Header - -800, +500, -350, +550, -350, +500, -400, +500, -350, +550, -350, +500, -400, +500, -350, +500, -400, +500, -400, +500, -350, +950, -400, +500, -400, +500, -350, +500, -850, +500, -400, +450, -400, +500, -400, +500, -400, +900, -850, +500, -400, +500, -350, +500, -400, +500, -400, +500, -350, +950, -400, +500, -850, +900, -19050, - }, - // Nothing - new int[] { - +2800, -750, +550, -350, +550, -350, +500, -800, +550, -800, +1400, // Header - -800, +550, -350, +500, -400, +500, -400, +500, -350, +550, -350, +500, -400, +500, -400, +500, -350, +500, -400, +500, -8400, +900, -850, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +950, -400, +450, -850, +950, -70000, - }, - // RC6_24 - new int[] { - +2700, -850, +450, -400, +500, -400, +500, -850, +500, -850, +1350, // Header - -850, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +500, -400, +500, -400, +500, -400, +450, -400, +950, -400, +500, -400, +450, -450, +450, -850, +500, -400, +450, -450, +450, -400, +500, -400, +900, -900, +450, -400, +500, -400, +4600, -61750, - }, +new int[] { 2700, -850, 500, -400, 450, -400, 500, -850, 500, -850, 1350, -850, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 900, -400, 500, -400, 500, -400, 450, -450, 450, -850, 500, -400, 450, -31750 }, - new int[] { - +2650, -900, +450, -400, +450, -450, +450, -900, +450, -850, +1350, // Header - -900, +450, -400, +500, -400, +450, -450, +450, -450, +450, -400, +500, -400, +450, -450, +450, -450, +450, -400, +500, -400, +900, -450, +450, -450, +450, -400, +450, -450, +5150, -31750, - }, - }; +new int[] { 2700, -850, 450, -400, 500, -400, 500, -850, 450, -850, 1400, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 1850, -400, 500, -400, 450, -450, 450, -450, 900, -25400 }, - for (int index = 0; index < timingData.GetLength(0); index++) - { - IrDecoder.DecodeIR(timingData[index], new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); +new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -5350, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -31750 }, - IrCode newCode = new IrCode(timingData[index]); - Pronto.WriteProntoFile(String.Format("C:\\{0}.ir", index), Pronto.ConvertIrCodeToProntoRaw(newCode)); +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 1100, -300, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400, }, - } - */ - /* +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -4400, 450, -450, 450, -450, 450, -900, 400, -450, 450, -450, 450, -400, 950, -850, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -31750 }, - byte[] data = new byte[] { - //0x11, 0x8A, 0x08, 0x08, 0x8A, 0x11, 0x11, 0x9B, 0x11, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8B, 0x07, 0x08, 0x8A, 0x08, 0x09, 0x8A, 0x08, 0x09, 0x89, 0x12, 0x08, 0x8A, 0x08, 0x09, 0x89, 0x09, 0x12, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x93, 0x08, 0x08, 0x8A, 0x08, 0x11, 0x89, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x5C - 0x11, 0x89, 0x08, 0x08, 0x8A, 0x11, 0x11, 0x9C, 0x11, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x08, 0x8A, 0x09, 0x11, 0x8B, 0x08, 0x08, 0x8A, 0x08, 0x12, 0x8A, 0x08, 0x08, 0x8A, 0x09, 0x12, 0x8A, 0x08, 0x08, 0x92, 0x12, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x5C, - }; +new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 900, -450, 450, -450, 450, -450, 450, -400, 500, -850, 5150, -31750 }, - List<int> timingData = new List<int>(); +new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -950, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -25400 }, - int len = 0; - byte curByte; - int time; +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -3750, 250, -400, 500, -400, 450, -450, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -31750 }, - for (int j = 0; j < data.Length; j++) - { - curByte = data[j]; +new int[] { 2700, -900, 400, -450, 450, -450, 450, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -400, 500, -400, 450, -450, 450, -450, 450, -31750 }, - if ((curByte & 0x80) != 0) - len -= (int)(curByte & 0x7F); - else - len += (int)curByte; +new int[] { 2700, -850, 450, -450, 450, -450, 450, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -450, 450, -400, 1000, -400, 450, -450, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400 }, - if ((curByte & 0x7F) != 0x7F) - { - time = len * 50; +new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -3550, 450, -450, 450, -450, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -31750 }, - if (timingData.Count > 0 && ((timingData[timingData.Count - 1] > 0 && time > 0) || (timingData[timingData.Count - 1] < 0 && time < 0))) - timingData[timingData.Count - 1] += time; - else - timingData.Add(time); - - len = 0; - } - } +new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 5300, -31750 }, - if (len != 0) - { - time = len * 50; - - if ((timingData[timingData.Count - 1] > 0 && time > 0) || (timingData[timingData.Count - 1] < 0 && time < 0)) - timingData[timingData.Count - 1] += time; - else - timingData.Add(time); - } +new int[] { 2700, -850, 450, -450, 450, -450, 450, -900, 400, -900, 1350, -900, 400, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -12900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400 }, - IrDecoder.DecodeIR(timingData.ToArray(), new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); - */ +new int[] { 2700, -850, 450, -450, 450, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -2500, 650, -400, 450, -450, 450, -450, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -450, 450, -31750 }, +new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 950, -400, 450, -450, 450, -450, 450, -400, 4650, -31750 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -11950, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 900, -19050 }, + +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 2400, -300, 900, -400, 500, -400, 450, -450, 450, -450, 450, -900, 400, -450, 450, -450, 450, -400, 950, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 4700, -31750 }, + +new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 950, -400, 450, -450, 450, -450, 450, -31750 }, + +new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 5350, -31750 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -1300, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -31750 }, + +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -400, 500, -400, 450, -450, 450, -31750 }, + +new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 4700, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, + +new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, 3350, 350, -900, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -400, 500, -400, 450, -31750 }, + +new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 10650, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, + +new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 550, -350, 450, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 450, -400, 450, -450, 450, -450, 4700, -31750 }, + +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 900, -400, 500, -400, 450, -31750 }, + +new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 10650, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, + +new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -450, 450, -450, 450, -400, 500, -400, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 450, -450, 450, -31750 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 450, -400, 3350, -31750 }, + +new int[] { 2650, -900, 450, -400, 450, -450, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, 2400, 50, -450, 900, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 900, -19050 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 400, -450, 450, -450, 4300, -31750 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 3600, -31750 }, + +new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 2300, -200, 450, -400, 900, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -19050 }, + +new int[] { 2650, -900, 450, -400, 450, -450, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -450, 450, -450, 450, -400, 500, -400, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 4650, -31750 }, + +new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 400, -900, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -3500, 550, -25400 }, + + }; + + for (int index = 0; index < timingData.GetLength(0); index++) + { + IrDecoder.DecodeIR(timingData[index], new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); + + //IrCode newCode = new IrCode(timingData[index]); + //Pronto.WriteProntoFile(String.Format("C:\\{0}.ir", index), Pronto.ConvertIrCodeToProntoRaw(newCode)); + } + */ IrDecoder.DecodeIR(_code.TimingData, new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); } Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs 2008-03-20 11:58:28 UTC (rev 1490) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/IrDecoder.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -141,22 +141,16 @@ #region Constants - const ushort ToggleBitMce = 0x8000; - const ushort ToggleMaskMce = 0x7FFF; - const ushort CustomerMce = 0x800F; + const uint ToggleBitMce = 0x8000; + const uint ToggleMaskMce = 0x7FFF; + const uint CustomerMce = 0x800F; - const ushort ToggleBitRC5 = 0x0800; - const ushort ToggleMaskRC5 = 0x07FF; + const uint ToggleBitRC5 = 0x0800; + const uint ToggleMaskRC5 = 0x07FF; const uint ToggleBitRC5X = 0x00020000; const uint ToggleMaskRC5X = 0x0001FFFF; - const uint RC6HeaderMask = 0xFFFFFFF0; - - //const uint PrefixRC6 = 0x000FC950; - //const uint PrefixRC6A = 0x000FCA90; - //const uint PrefixRC6M2X = 0x000FCA93; - const uint MceMouse = 1; const uint MceKeyboard = 4; @@ -1132,6 +1126,7 @@ remoteCallback(IrProtocol.RC5, RC5_Data.Code, first); RC5_Data.State = RemoteDetectionState.HeaderPulse; + ignored = false; } if (ignored && (RC5_Data.State != RemoteDetectionState.Leading) && (RC5_Data.State != RemoteDetectionState.HeaderPulse)) @@ -1254,9 +1249,6 @@ ignored = false; RC6_Data.LongPulse = true; RC6_Data.HalfBit++; - - //if (RC6_Data.Bit == 1) - //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (!pulse && IsBetween(duration, 300, 600)) { @@ -1276,6 +1268,7 @@ if (RC6_Data.LongPulse) { RC6_Data.LongPulse = false; + if (pulse) break; @@ -1315,19 +1308,18 @@ //if (RC6_Data.Bit == 32) //RC6_Data.Bit = 24; + //if (RC6_Data.Bit == 24) + //RC6_Data.Bit = 32; + if (IsBetween(duration, 750, 1000)) { RC6_Data.Bit++; RC6_Data.Code = RC6_Data.Code << 1; RC6_Data.Code |= 1; - //RC6_Data.Code |= (uint)1 << RC6_Data.Bit; RC6_Data.LongPulse = true; RC6_Data.HalfBit += 2; ignored = false; - - //if (RC6_Data.Bit == 1) - //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (IsBetween(duration, 300, 600)) { @@ -1337,9 +1329,6 @@ RC6_Data.HalfBit++; ignored = false; - - //if (RC6_Data.Bit == 0) - //RC6_Data.State = RemoteDetectionState.KeyCode; } else if (duration > 4000) { @@ -1395,37 +1384,17 @@ protocolVariation = IrProtocol.RC6_32; else break; - - /* - if (RC6_Data.Header == PrefixRC6M2X) - { - if (RC6_Data.Bit == 16) - protocolVariation = IrProtocol.RC6_16; - else if (RC6_Data.Bit == 20) - protocolVariation = IrProtocol.RC6_20; - else if (RC6_Data.Bit == 24) - protocolVariation = IrProtocol.RC6_24; - else if (RC6_Data.Bit == 32) - protocolVariation = IrProtocol.RC6_32; - else - break; - } - else if ((RC6_Data.Header & RC6HeaderMask) == PrefixRC6A) - { - protocolVariation = IrProtocol.RC6A; - } - */ } remoteCallback(protocolVariation, RC6_Data.Code, first); RC6_Data.State = RemoteDetectionState.HeaderPulse; + ignored = false; } if (ignored && (RC6_Data.State != RemoteDetectionState.HeaderPulse)) RC6_Data.State = RemoteDetectionState.HeaderPulse; } - } static void DetectRCA(int[] timingData, RemoteCallback remoteCallback) { Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-20 11:58:28 UTC (rev 1490) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -39,9 +39,9 @@ this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); - this.groupBoxAbstractRemoteModel = new System.Windows.Forms.GroupBox(); this.buttonExclusions = new System.Windows.Forms.Button(); this.checkBoxAbstractRemoteMode = new System.Windows.Forms.CheckBox(); + this.groupBoxAbstractRemoteModel = new System.Windows.Forms.GroupBox(); this.groupBoxPriority = new System.Windows.Forms.GroupBox(); this.labelPriority = new System.Windows.Forms.Label(); this.comboBoxPriority = new System.Windows.Forms.ComboBox(); @@ -152,19 +152,6 @@ this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // - // groupBoxAbstractRemoteModel - // - this.groupBoxAbstractRemoteModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxAbstractRemoteModel.Controls.Add(this.buttonExclusions); - this.groupBoxAbstractRemoteModel.Controls.Add(this.checkBoxAbstractRemoteMode); - this.groupBoxAbstractRemoteModel.Location = new System.Drawing.Point(8, 136); - this.groupBoxAbstractRemoteModel.Name = "groupBoxAbstractRemoteModel"; - this.groupBoxAbstractRemoteModel.Size = new System.Drawing.Size(384, 56); - this.groupBoxAbstractRemoteModel.TabIndex = 1; - this.groupBoxAbstractRemoteModel.TabStop = false; - this.groupBoxAbstractRemoteModel.Text = "Abstract Remote Model"; - // // buttonExclusions // this.buttonExclusions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -176,6 +163,7 @@ this.buttonExclusions.Text = "Exclusions"; this.toolTips.SetToolTip(this.buttonExclusions, "Configure Abstract Remote Model exclusions"); this.buttonExclusions.UseVisualStyleBackColor = true; + this.buttonExclusions.Visible = false; this.buttonExclusions.Click += new System.EventHandler(this.buttonExclusions_Click); // // checkBoxAbstractRemoteMode @@ -191,6 +179,19 @@ this.checkBoxAbstractRemoteMode.UseVisualStyleBackColor = true; this.checkBoxAbstractRemoteMode.CheckedChanged += new System.EventHandler(this.checkBoxAbstractRemoteMode_CheckedChanged); // + // groupBoxAbstractRemoteModel + // + this.groupBoxAbstractRemoteModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxAbstractRemoteModel.Controls.Add(this.buttonExclusions); + this.groupBoxAbstractRemoteModel.Controls.Add(this.checkBoxAbstractRemoteMode); + this.groupBoxAbstractRemoteModel.Location = new System.Drawing.Point(8, 136); + this.groupBoxAbstractRemoteModel.Name = "groupBoxAbstractRemoteModel"; + this.groupBoxAbstractRemoteModel.Size = new System.Drawing.Size(384, 56); + this.groupBoxAbstractRemoteModel.TabIndex = 1; + this.groupBoxAbstractRemoteModel.TabStop = false; + this.groupBoxAbstractRemoteModel.Text = "Abstract Remote Model"; + // // groupBoxPriority // this.groupBoxPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-20 11:58:28 UTC (rev 1490) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -23,7 +23,7 @@ public bool AbstractRemoteMode { get { return checkBoxAbstractRemoteMode.Checked; } - set { checkBoxAbstractRemoteMode.Checked = value; } + set { buttonExclusions.Enabled = checkBoxAbstractRemoteMode.Checked = value; } } public IRServerMode Mode { @@ -105,15 +105,13 @@ private void buttonExclusions_Click(object sender, EventArgs e) { - /* - Exclusions exclusions = new Exclusions(new string[] { "plugin1", "plugin2", "plugin3" }); - exclusions.ExclusionList = new string[] { "plugin1" }; + Exclusions exclusions = new Exclusions(); + //exclusions.ExclusionList = new string[] { "Microsoft MCE:" }; if (exclusions.ShowDialog(this) == DialogResult.OK) { } - */ } private void radioButtonServer_CheckedChanged(object sender, EventArgs e) @@ -131,7 +129,7 @@ private void checkBoxAbstractRemoteMode_CheckedChanged(object sender, EventArgs e) { - //buttonExclusions.Enabled = checkBoxAbstractRemoteMode.Checked; + buttonExclusions.Enabled = checkBoxAbstractRemoteMode.Checked; } #endregion Controls Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-20 11:58:28 UTC (rev 1490) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -233,6 +233,7 @@ private void toolStripButtonDetect_Click(object sender, EventArgs e) { + // TODO: Place on a seperate thread? Detect(); } private void toolStripButtonAdvancedSettings_Click(object sender, EventArgs e) @@ -248,128 +249,151 @@ void CreateGrid() { - int row = 0; + IrssLog.Info("Creating configuration grid ..."); - gridPlugins.Rows.Clear(); - gridPlugins.Columns.SetCount(5); + try + { + int row = 0; - // Setup Column Headers - gridPlugins.Rows.Insert(row); + gridPlugins.Rows.Clear(); + gridPlugins.Columns.SetCount(5); - SourceGrid.Cells.ColumnHeader header = new SourceGrid.Cells.ColumnHeader(" "); - header.AutomaticSortEnabled = false; - gridPlugins[row, ColIcon] = header; + // Setup Column Headers + gridPlugins.Rows.Insert(row); - gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); - gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); - gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); - gridPlugins[row, ColConfigure] = new SourceGrid.Cells.ColumnHeader("Configure"); - gridPlugins.FixedRows = 1; + SourceGrid.Cells.ColumnHeader header = new SourceGrid.Cells.ColumnHeader(" "); + header.AutomaticSortEnabled = false; + gridPlugins[row, ColIcon] = header; - foreach (PluginBase transceiver in _transceivers) - { - gridPlugins.Rows.Insert(++row); - gridPlugins.Rows[row].Tag = transceiver; + gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); + gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); + gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); + gridPlugins[row, ColConfigure] = new SourceGrid.Cells.ColumnHeader("Configure"); + gridPlugins.FixedRows = 1; - // Icon Cell - if (transceiver.DeviceIcon != null) + foreach (PluginBase transceiver in _transceivers) { - SourceGrid.Cells.Image iconCell = new SourceGrid.Cells.Image(transceiver.DeviceIcon); - iconCell.Editor.EnableEdit = false; + gridPlugins.Rows.Insert(++row); + gridPlugins.Rows[row].Tag = transceiver; - gridPlugins[row, ColIcon] = iconCell; - } - else - { - gridPlugins[row, ColIcon] = new SourceGrid.Cells.Cell(); - } + // Icon Cell + if (transceiver.DeviceIcon != null) + { + SourceGrid.Cells.Image iconCell = new SourceGrid.Cells.Image(transceiver.DeviceIcon); + iconCell.Editor.EnableEdit = false; - // Name Cell - SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name); + gridPlugins[row, ColIcon] = iconCell; + } + else + { + gridPlugins[row, ColIcon] = new SourceGrid.Cells.Cell(); + } - SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents(); - nameCellController.DoubleClick += new EventHandler(PluginDoubleClick); - nameCell.AddController(nameCellController); + // Name Cell + SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name); - nameCell.AddController(new SourceGrid.Cells.Controllers.ToolTipText()); - nameCell.ToolTipText = String.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); + SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents(); + nameCellController.DoubleClick += new EventHandler(PluginDoubleClick); + nameCell.AddController(nameCellController); - gridPlugins[row, ColName] = nameCell; + nameCell.AddController(new SourceGrid.Cells.Controllers.ToolTipText()); + nameCell.ToolTipText = String.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description); - // Receive Cell - if (transceiver is IRemoteReceiver || transceiver is IMouseReceiver || transceiver is IKeyboardReceiver) - { - gridPlugins[row, ColReceive] = new SourceGrid.Cells.CheckBox(); - } - else - { - gridPlugins[row, ColReceive] = new SourceGrid.Cells.Cell(); - } + gridPlugins[row, ColName] = nameCell; - // Transmit Cell - if (transceiver is ITransmitIR) - { - SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); + // Receive Cell + if (transceiver is IRemoteReceiver || transceiver is IMouseReceiver || transceiver is IKeyboardReceiver) + { + gridPlugins[row, ColReceive] = new SourceGrid.Cells.CheckBox(); + } + else + { + gridPlugins[row, ColReceive] = new SourceGrid.Cells.Cell(); + } - SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents(); - checkboxcontroller.ValueChanged += new EventHandler(TransmitChanged); - checkbox.Controller.AddController(checkboxcontroller); + // Transmit Cell + if (transceiver is ITransmitIR) + { + SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox(); - gridPlugins[row, ColTransmit] = checkbox; - } - else - { - gridPlugins[row, ColTransmit] = new SourceGrid.Cells.Cell(); - } + SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents(); + checkboxcontroller.ValueChanged += new EventHandler(TransmitChanged); + checkbox.Controller.AddController(checkboxcontroller); - // Configure Cell - if (transceiver is IConfigure) - { - SourceGrid.Cells.Button button = new SourceGrid.Cells.Button("Configure"); + gridPlugins[row, ColTransmit] = checkbox; + } + else + { + gridPlugins[row, ColTransmit] = new SourceGrid.Cells.Cell(); + } - SourceGrid.Cells.Controllers.Button buttonClickEvent = new SourceGrid.Cells.Controllers.Button(); - buttonClickEvent.Executed += new EventHandler(buttonClickEvent_Executed); - button.Controller.AddController(buttonClickEvent); + // Configure Cell + if (transceiver is IConfigure) + { + SourceGrid.Cells.Button button = new SourceGrid.Cells.Button("Configure"); - gridPlugins[row, ColConfigure] = button; + SourceGrid.Cells.Controllers.Button buttonClickEvent = new SourceGrid.Cells.Controllers.Button(); + buttonClickEvent.Executed += new EventHandler(buttonClickEvent_Executed); + button.Controller.AddController(buttonClickEvent); + + gridPlugins[row, ColConfigure] = button; + } + else + { + gridPlugins[row, ColConfigure] = new SourceGrid.Cells.Cell(); + } } - else - { - gridPlugins[row, ColConfigure] = new SourceGrid.Cells.Cell(); - } + + gridPlugins.Columns[ColIcon].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColName].AutoSizeMode = SourceGrid.AutoSizeMode.Default; + gridPlugins.Columns[ColReceive].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColTransmit].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.Columns[ColConfigure].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; + gridPlugins.AutoStretchColumnsToFitWidth = true; + gridPlugins.AutoSizeCells(); } - - gridPlugins.Columns[ColIcon].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.Columns[ColName].AutoSizeMode = SourceGrid.AutoSizeMode.Default; - gridPlugins.Columns[ColReceive].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.Columns[ColTransmit].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.Columns[ColConfigure].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize; - gridPlugins.AutoStretchColumnsToFitWidth = true; - gridPlugins.AutoSizeCells(); + catch (Exception ex) + { + IrssLog.Error(ex); + MessageBox.Show(this, ex.ToString(), "Error setting up plugin grid", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } void Detect() { + IrssLog.Info("Attempting to detect Input Plugins ..."); + SourceGrid.Cells.CheckBox checkBox; for (int row = 1; row < gridPlugins.RowsCount; row++) { - PluginBase plugin = gridPlugins.Rows[row].Tag as PluginBase; - - bool detected = plugin.Detect(); + try + { + PluginBase plugin = gridPlugins.Rows[row].Tag as PluginBase; - // Receive - checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; - if (checkBox != null) - checkBox.Checked = detected; - - // Transmit - checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; - if (checkBox != null) - checkBox.Checked = detected; + bool detected = plugin.Detect(); + + IrssLog.Info("Found: {0}", plugin.Name); + + // Receive + checkBox = gridPlugins[row, ColReceive] as SourceGrid.Cells.CheckBox; + if (checkBox != null) + checkBox.Checked = detected; + + // Transmit + checkBox = gridPlugins[row, ColTransmit] as SourceGrid.Cells.CheckBox; + if (checkBox != null) + checkBox.Checked = detected; + } + catch (Exception ex) + { + IrssLog.Error(ex); + } } } void Advanced() { + IrssLog.Info("Entering advanced configuration ..."); + Advanced advanced = new Advanced(); advanced.AbstractRemoteMode = _abstractRemoteMode; Added: trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.Designer.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -0,0 +1,146 @@ +namespace IRServer +{ + partial class Exclusions + { + /// <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(Exclusions)); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.treeViewExclusions = new System.Windows.Forms.TreeView(); + this.labelExplain = new System.Windows.Forms.Label(); + this.labelExpandAll = new System.Windows.Forms.Label(); + this.labelCollapseAll = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(240, 312); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 5; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // 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(168, 312); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 4; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // treeViewExclusions + // + this.treeViewExclusions.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.treeViewExclusions.CheckBoxes = true; + this.treeViewExclusions.Location = new System.Drawing.Point(8, 72); + this.treeViewExclusions.Name = "treeViewExclusions"; + this.treeViewExclusions.ShowNodeToolTips = true; + this.treeViewExclusions.Size = new System.Drawing.Size(296, 232); + this.treeViewExclusions.TabIndex = 1; + // + // labelExplain + // + this.labelExplain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelExplain.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.labelExplain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelExplain.Location = new System.Drawing.Point(8, 8); + this.labelExplain.Name = "labelExplain"; + this.labelExplain.Size = new System.Drawing.Size(296, 56); + this.labelExplain.TabIndex = 0; + this.labelExplain.Text = "Put a check next to any device or individual remote you would like to exclude fro" + + "m being processed by the Abstract Remote Model"; + this.labelExplain.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelExpandAll + // + this.labelExpandAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.labelExpandAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelExpandAll.Location = new System.Drawing.Point(8, 304); + this.labelExpandAll.Name = "labelExpandAll"; + this.labelExpandAll.Size = new System.Drawing.Size(16, 16); + this.labelExpandAll.TabIndex = 2; + this.labelExpandAll.Text = "+"; + this.labelExpandAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.labelExpandAll.Click += new System.EventHandler(this.labelExpandAll_Click); + // + // labelCollapseAll + // + this.labelCollapseAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.labelCollapseAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelCollapseAll.Location = new System.Drawing.Point(24, 304); + this.labelCollapseAll.Name = "labelCollapseAll"; + this.labelCollapseAll.Size = new System.Drawing.Size(16, 16); + this.labelCollapseAll.TabIndex = 3; + this.labelCollapseAll.Text = "-"; + this.labelCollapseAll.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.labelCollapseAll.Click += new System.EventHandler(this.labelCollapseAll_Click); + // + // Exclusions + // + 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(312, 346); + this.Controls.Add(this.labelExplain); + this.Controls.Add(this.treeViewExclusions); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.labelExpandAll); + this.Controls.Add(this.labelCollapseAll); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(320, 380); + this.Name = "Exclusions"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Abstrct Remote Model Exclusions"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.TreeView treeViewExclusions; + private System.Windows.Forms.Label labelExplain; + private System.Windows.Forms.Label labelExpandAll; + private System.Windows.Forms.Label labelCollapseAll; + + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.cs 2008-03-21 04:49:12 UTC (rev 1491) @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; + +using IrssUtils; + +namespace IRServer +{ + + partial class Exclusions : Form + { + + /// <summary> + /// Gets or sets the exclusion list. + /// </summary> + /// <value>The exclusion list.</value> + public string[] ExclusionList + { + get + { + List<string> exclusions = new List<string>(); + foreach (TreeNode node in treeViewExclusions.Nodes) + if (node.Checked) + exclusions.Add(node.Tag as string); + + return exclusions.ToArray(); + } + set + { + foreach (TreeNode node in treeViewExclusions.Nodes) + { + node.Checked = false; + + foreach (string exclusion in value) + if (exclusion.Equals(node.Tag as string, StringComparison.OrdinalIgnoreCase)) + node.Checked = true; + } + } + } + + /// <summary> + /// Initializes a new instance of the <see cref="Exclusions"/> class. + /// </summary> + public Exclusions() + { + InitializeComponent(); + + InitTree(); + } + + void InitTree() + { + treeViewExclusions.Nodes.Clear(); + + string AbstractRemoteMapFolder = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps"); + + string[] folders = Directory.GetDirectories(AbstractRemoteMapFolder, "*", SearchOption.TopDirectoryOnly); + foreach (string folder in folders) + { + if (!Directory.Exists(folder)) + continue; + + string device = Path.GetFileName(folder); + + TreeNode deviceNode = new TreeNode(device); + deviceNode.Tag = String.Format("{0}:", device); + + string[] files = Directory.GetFiles(folder, "*.xml", SearchOption.TopDirectoryOnly); + foreach (string file in files) + { + if (!File.Exists(file)) + continue; + + string remote = Path.GetFileNameWithoutExtension(file); + + TreeNode remoteNode = new TreeNode(remote); + remoteNode.Tag = String.Format("{0}:{1}", device, remote); + + deviceNode.Nodes.Add(remoteNode); + } + + treeViewExclusions.Nodes.Add(deviceNode); + } + } + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void labelExpandAll_Click(object sender, EventArgs e) + { + treeViewExclusions.ExpandAll(); + } + private void labelCollapseAll_Click(object sender, EventArgs e) + { + treeViewExclusions.CollapseAll(); + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Exclusions.resx 2008-03-21 04:49:12 UTC (rev 1491) @@ -0,0 +1,168 @@ +<?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="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAIAICAAAAEACACoCAAAJgAAABAQEAABAAQAKAEAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAIAE + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAMDAwADA3MAA8MqmANTw + /wCx4v8AjtT/AGvG/wBIuP8AJar/AACq/wAAktwAAHq5AABilgAASnMAADJQANTj/wCxx/8Ajqv/AGuP + /wBIc/8AJVf/AABV/wAASdwAAD25AAAxlgAAJXMAABlQANTU/wCxsf8Ajo7/AGtr/wBISP8AJSX/AAAA + /gAAANwAAAC5AAAAlgAAAHMAAABQAOPU/wDHsf8Aq47/AI9r/wBzSP8AVyX/AFUA/wBJANwAPQC5ADEA + lgAlAHMAGQBQAPDU/wDisf8A1I7/AMZr/wC4SP8AqiX/AKoA/wCSANwAegC5AGIAlgBKAHMAMgBQAP/U + /wD/sf8A/47/AP9r/wD/SP8A/yX/AP4A/gDcANwAuQC5AJYAlgBzAHMAUABQAP/U8AD/seIA/47UAP9r + xgD/SLgA/yWqAP8AqgDcAJIAuQB6AJYAYgBzAEoAUAAyAP/U4wD/sccA/46rAP9rjwD/SHMA/yVXAP8A + VQDcAEkAuQA9AJYAMQBzACUAUAAZAP/U1AD/sbEA/46OAP9rawD/SEgA/yUlAP4AAADcAAAAuQAAAJYA + AABzAAAAUAAAAP/j1AD/x7EA/6uOAP+PawD/c0gA/1clAP9VAADcSQAAuT0AAJYxAABzJQAAUBkAAP/w + 1AD/4rEA/9SOAP/GawD/uEgA/6olAP+qAADckgAAuXoAAJZiAABzSgAAUDIAAP//1AD//7EA//+OAP// + awD//0gA//8lAP7+AADc3AAAubkAAJaWAABzcwAAUFAAAPD/1ADi/7EA1P+OAMb/awC4/0gAqv8lAKr/ + AACS3AAAerkAAGKWAABKcwAAMlAAAOP/1ADH/7EAq/+OAI//awBz/0gAV/8lAFX/AABJ3AAAPbkAADGW + AAAlcwAAGVAAANT/1ACx/7EAjv+OAGv/awBI/0gAJf8lAAD+AAAA3AAAALkAAACWAAAAcwAAAFAAANT/ + 4wCx/8cAjv+rAGv/jwBI/3MAJf9XAAD/VQAA3EkAALk9AACWMQAAcyUAAFAZANT/8ACx/+IAjv/UAGv/ + xgBI/7gAJf+qAAD/qgAA3JIAALl6AACWYgAAc0oAAFAyANT//wCx//8Ajv//AGv//wBI//8AJf//AAD+ + /gAA3NwAALm5AACWlgAAc3MAAFBQAPLy8gDm5uYA2traAM7OzgDCwsIAtra2AKqqqgCenp4AkpKSAIaG + hgB6enoAbm5uAGJiYgBWVlYASkpKAD4+PgAyMjIAJiYmABoaGgAODg4A8Pv/AKSgoACAgIAAAAD/AAD/ + AAAA//8A/wAAAP8A/wD//wAA////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + /PwAAPz8/PwA/AAA/AAAAPwAAAD8/Pz8APwAAPwAAAAAAPwA/AAAAAD8AAD8AAD8APwAAPwAAAAA/AAA + /AAAAAAA/AD8AAAAAPwAAPwAAPwA/AAA/AAAAAD8AAD8AAAAAAD8APwAAAAA/AAA/AD8AAAA/AD8AAAA + APwAAPwAAAAAAPwA/AAAAAD8AAD8APwAAAD8APwAAAAA/AAA/AAAAPz8AAD8/PwAAPz8/AAA/AAAAPwA + /Pz8AAD8/PwAAAD8AAAAAPwAAAAA/AAA/AD8AAAA/AD8AAAAAPwAAPwAAPwAAAAA/AAAAAD8AAD8APwA + AAD8APwAAAAA/AAA/AAA/AAAAAD8AAAAAPwAAPwA/AAAAPwA/AAAAAD8AAD8AAD8AAAAAPwAAAAA/AAA + /AD8AAAA/AD8AAAAAPwAAPwAAAD8/AAA/Pz8/AD8/PwAAPwAAAD8APz8/PwA/Pz8AAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + APn5+fn5+fn5AAAA+fn5AAAAAAD5+fkAAAAAAAAAAAAAAPn5+fn5+QAAAAAA+fkAAAAAAPn5AAAAAAAA + AAAAAAAAAAD5+QAAAAAAAAD5+QAAAAAA+fkAAAAAAAAAAAAAAAAAAPn5AAAAAAAAAPn5+fn5+fn5AAAA + AAAAAAAAAAAAAAAA+fkAAAAAAAAA+fn5+fn5+fkAAAAAAAAAAAAAAAAAAAD5+QAAAAAAAAD5+QAAAAAA + +fkAAAAAAAAAAAAAAAAAAPn5AAAAAAAAAPn5AAAAAAD5+QAAAAAAAAAAAAAAAAAA+fkAAAAAAAAA+fkA + AAAAAPn5AAAAAAAAAAAAAAAA+fn5+fn5AAAAAAD5+fn5+fn5+fkAAAAAAAAAAAAAAPn5+fn5+fn5AAAA + +fn5+fn5+fn5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+AAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAP/////MLdwt9e2t7fXtre317XXt9e117cxj + dGO97XXtve117b3tde297XXtzCN0I//////////////////////gHHx/8D58//z+fP/8/gH//P4B//z+ + fP/8/nz//P58//A+AP/gHAH///////////8AAA... [truncated message content] |
From: <an...@us...> - 2008-03-21 07:24:56
|
Revision: 1492 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1492&view=rev Author: and-81 Date: 2008-03-21 00:24:54 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Suite.sln Added Paths: ----------- trunk/plugins/IR Server Suite/Common/IrssScheduler/ trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj trunk/plugins/IR Server Suite/Common/IrssScheduler/Properties/ trunk/plugins/IR Server Suite/Common/IrssScheduler/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssScheduler/ScheduleEvent.cs trunk/plugins/IR Server Suite/Common/IrssScheduler/Scheduler.cs Added: trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj 2008-03-21 07:24:54 UTC (rev 1492) @@ -0,0 +1,47 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{28098574-D22E-457C-AFFA-560554499EAC}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>IrssScheduler</RootNamespace> + <AssemblyName>IrssScheduler</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ScheduleEvent.cs" /> + <Compile Include="Scheduler.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Common/IrssScheduler/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssScheduler/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssScheduler/Properties/AssemblyInfo.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("IrssScheduler")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("IrssScheduler")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a0d1d4e4-6c74-4199-90fd-68f0e789ff29")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] Added: trunk/plugins/IR Server Suite/Common/IrssScheduler/ScheduleEvent.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssScheduler/ScheduleEvent.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssScheduler/ScheduleEvent.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using System.Xml.Serialization; + +namespace IrssScheduler +{ + + /// <summary> + /// + /// </summary> + internal class ScheduleEvent + { + + /// <summary> + /// Initializes a new instance of the <see cref="ScheduleEvent"/> class. + /// </summary> + public ScheduleEvent() + { + + } + + + + + + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssScheduler/Scheduler.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssScheduler/Scheduler.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssScheduler/Scheduler.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using System.Xml.Serialization; + +namespace IrssScheduler +{ + + /// <summary> + /// + /// </summary> + public class Scheduler + { + + List<ScheduleEvent> _scheduleEvents; + + /// <summary> + /// Initializes a new instance of the <see cref="Scheduler"/> class. + /// </summary> + public Scheduler() + { + + _scheduleEvents = new List<ScheduleEvent>(); + + } + + + public void LoadSchedule(string fileName) + { + + } + + public void SaveSchedule(string fileName) + { + + } + + + } + +} 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 2008-03-21 04:49:12 UTC (rev 1491) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -431,13 +431,14 @@ DebugWriteLine("InitializeDevice()"); #endif - WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); // Testing some commands that MCE sends, but I don't know what they mean (what do these get back?) WriteSync(new byte[] { 0xFF, 0x0B }); // Looks like a request for Firmware version WriteSync(new byte[] { 0x9F, 0x05 }); WriteSync(new byte[] { 0x9F, 0x0D }); + WriteSync(new byte[] { 0x9F, 0x13 }); + Thread.Sleep(4 * PacketTimeout); SetTimeout(PacketTimeout); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-21 04:49:12 UTC (rev 1491) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -133,7 +133,7 @@ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; - static readonly byte[] ResetPacket = { 0xFF, 0xFE }; + static readonly byte[] ResetPacket = { 0xFF, 0xEE }; // Misc Packets static readonly byte[] SetCarrierFreqPacket = { 0x9F, 0x06, 0x01, 0x80 }; @@ -430,13 +430,14 @@ DebugWriteLine("InitializeDevice()"); #endif - WriteSync(ResetPacket); // Added 18-March-2008 to see what SMK devices think of it... WriteSync(StartPacket); // Testing some commands that MCE sends, but I don't know what they mean (what do these get back?) WriteSync(new byte[] { 0xFF, 0x0B }); // Looks like a request for Firmware version WriteSync(new byte[] { 0x9F, 0x05 }); WriteSync(new byte[] { 0x9F, 0x0D }); + WriteSync(new byte[] { 0x9F, 0x13 }); + Thread.Sleep(4 * PacketTimeout); SetTimeout(PacketTimeout); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2008-03-21 04:49:12 UTC (rev 1491) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2008-03-21 07:24:54 UTC (rev 1492) @@ -5,12 +5,13 @@ <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{BABC30EB-7D0F-4398-9FCB-E517EA8D2AA9}</ProjectGuid> - <OutputType>Exe</OutputType> + <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>InputService.Plugin</RootNamespace> <AssemblyName>Microsoft MCE Transceiver</AssemblyName> <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> - <StartupObject>InputService.Plugin.MicrosoftMceTransceiver</StartupObject> + <StartupObject> + </StartupObject> <ApplicationIcon>Icon.ico</ApplicationIcon> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> @@ -30,8 +31,7 @@ <DebugType>none</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> - <DefineConstants> - </DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-21 04:49:12 UTC (rev 1491) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-21 07:24:54 UTC (rev 1492) @@ -1,3 +1,5 @@ +//#define TEST_APPLICATION + using System; using System.Collections; using System.Collections.Generic; @@ -53,9 +55,10 @@ public class MicrosoftMceTransceiver : PluginBase, IConfigure, ITransmitIR, ILearnIR, IRemoteReceiver, IKeyboardReceiver, IMouseReceiver { - #region Debug -#if DEBUG +#if TEST_APPLICATION + static MicrosoftMceTransceiver device; + static void xRemote(string deviceName, string code) { Console.WriteLine("Remote: {0}", code); @@ -79,29 +82,132 @@ [STAThread] static void Main() { - MicrosoftMceTransceiver c = new MicrosoftMceTransceiver(); + Console.WriteLine("Microsoft MCE Transceiver Test App"); + Console.WriteLine("===================================="); + Console.WriteLine(); - //c.Configure(null); + SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); - c.RemoteCallback += new RemoteHandler(xRemote); - c.KeyboardCallback += new KeyboardHandler(xKeyboard); - c.MouseCallback += new MouseHandler(xMouse); + try + { + device = new MicrosoftMceTransceiver(); - c.Start(); + Console.Write("Configure device? (y/n) "); - Console.WriteLine("Test App Started"); - Console.WriteLine("====================="); - Console.WriteLine("Press a button on your remote to test ..."); - Console.WriteLine("Press any key to quit ..."); + if (Console.ReadKey().Key == ConsoleKey.Y) + { + Console.WriteLine(); - Console.ReadKey(); + Console.WriteLine("Configuring ..."); + device.Configure(null); + } + else + { + Console.WriteLine(); + } - c.Stop(); - c = null; + device.RemoteCallback += new RemoteHandler(xRemote); + device.KeyboardCallback += new KeyboardHandler(xKeyboard); + device.MouseCallback += new MouseHandler(xMouse); + + Console.WriteLine("Starting device access ..."); + + device.Start(); + + Console.Write("Learn IR? (y/n) "); + + while (Console.ReadKey().Key == ConsoleKey.Y) + { + Console.WriteLine(); + Console.WriteLine("Learning IR Command ..."); + + byte[] data; + + switch (device.Learn(out data)) + { + case LearnStatus.Failure: + Console.WriteLine("Learn process failed!"); + break; + + case LearnStatus.Success: + Console.WriteLine("Learn successful"); + + Console.Write("Blast IR back? (y/n) "); + + if (Console.ReadKey().Key == ConsoleKey.Y) + { + Console.WriteLine(); + Console.WriteLine("Blasting ..."); + + if (device.Transmit("Both", data)) + { + Console.WriteLine("Blasting successful"); + } + else + { + Console.WriteLine("Blasting failure!"); + } + } + else + { + Console.WriteLine(); + } + break; + + case LearnStatus.Timeout: + Console.WriteLine("Learn process timed-out"); + break; + } + + Console.Write("Learn another IR? (y/n) "); + } + Console.WriteLine(); + Console.WriteLine(); + + Console.WriteLine("Press a button on your remote ..."); + + Application.Run(); + + device.Stop(); + } + catch (Exception ex) + { + Console.WriteLine("Error:"); + Console.WriteLine(ex.ToString()); + Console.WriteLine(); + Console.WriteLine(""); + + Console.ReadKey(); + } + finally + { + device = null; + } + + SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); } + static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) + { + Console.WriteLine("Power Event: {0}", Enum.GetName(typeof(PowerModes), e.Mode)); + + switch (e.Mode) + { + + case PowerModes.Suspend: + if (device != null) + device.Suspend(); + break; + + case PowerModes.Resume: + if (device != null) + device.Resume(); + break; + + } + } + #endif - #endregion Debug #region Constants Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.sln 2008-03-21 04:49:12 UTC (rev 1491) +++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2008-03-21 07:24:54 UTC (rev 1492) @@ -490,6 +490,12 @@ Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IrssScheduler", "Common\IrssScheduler\IrssScheduler.csproj", "{28098574-D22E-457C-AFFA-560554499EAC}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -794,6 +800,10 @@ {58BFF250-541B-4AA4-A62D-ACB819AD317B}.Debug|Any CPU.Build.0 = Debug|Any CPU {58BFF250-541B-4AA4-A62D-ACB819AD317B}.Release|Any CPU.ActiveCfg = Release|Any CPU {58BFF250-541B-4AA4-A62D-ACB819AD317B}.Release|Any CPU.Build.0 = Release|Any CPU + {28098574-D22E-457C-AFFA-560554499EAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28098574-D22E-457C-AFFA-560554499EAC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28098574-D22E-457C-AFFA-560554499EAC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28098574-D22E-457C-AFFA-560554499EAC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -861,6 +871,7 @@ {08F57DD7-2C6E-484E-9CC5-835F70C5BC64} = {E757F80C-23C5-4AD6-B178-16799E337E03} {BCAFDF45-70DD-46FD-8B98-880DDA585AD2} = {E757F80C-23C5-4AD6-B178-16799E337E03} {28923F6E-8A68-4BC8-A507-825B09C3F64E} = {E757F80C-23C5-4AD6-B178-16799E337E03} + {28098574-D22E-457C-AFFA-560554499EAC} = {E757F80C-23C5-4AD6-B178-16799E337E03} {8ADDE1CB-2D23-4AB1-88B1-A241C60C16BA} = {DEE5AAD1-0110-4681-8FF9-662CEA72FD94} {DC79E2EC-7D1B-4359-A285-38AC8154166B} = {DEE5AAD1-0110-4681-8FF9-662CEA72FD94} {21E04B17-D850-43E7-AAD3-876C0E062BDB} = {F0D3A774-FE5E-4419-B9B6-C11FF1C4BB50} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-21 15:43:31
|
Revision: 1493 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1493&view=rev Author: and-81 Date: 2008-03-21 08:43:28 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/Configure.cs trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDriveReceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -70,7 +70,7 @@ this.serverToolStripMenuItem}); this.menuStrip.Location = new System.Drawing.Point(0, 0); this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(504, 24); + this.menuStrip.Size = new System.Drawing.Size(512, 24); this.menuStrip.TabIndex = 0; this.menuStrip.Text = "menuStrip"; // @@ -168,7 +168,7 @@ this.textBoxPronto.Multiline = true; this.textBoxPronto.Name = "textBoxPronto"; this.textBoxPronto.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxPronto.Size = new System.Drawing.Size(312, 240); + this.textBoxPronto.Size = new System.Drawing.Size(320, 240); this.textBoxPronto.TabIndex = 1; // // buttonSetCarrier @@ -186,7 +186,7 @@ // checkBoxStoreBinary // this.checkBoxStoreBinary.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxStoreBinary.Location = new System.Drawing.Point(336, 248); + this.checkBoxStoreBinary.Location = new System.Drawing.Point(344, 248); this.checkBoxStoreBinary.Name = "checkBoxStoreBinary"; this.checkBoxStoreBinary.Size = new System.Drawing.Size(160, 24); this.checkBoxStoreBinary.TabIndex = 6; @@ -197,7 +197,7 @@ // buttonAttemptDecode // this.buttonAttemptDecode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAttemptDecode.Location = new System.Drawing.Point(360, 208); + this.buttonAttemptDecode.Location = new System.Drawing.Point(368, 208); this.buttonAttemptDecode.Name = "buttonAttemptDecode"; this.buttonAttemptDecode.Size = new System.Drawing.Size(112, 24); this.buttonAttemptDecode.TabIndex = 5; @@ -222,7 +222,7 @@ // this.buttonLearn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonLearn.Enabled = false; - this.buttonLearn.Location = new System.Drawing.Point(360, 168); + this.buttonLearn.Location = new System.Drawing.Point(368, 168); this.buttonLearn.Name = "buttonLearn"; this.buttonLearn.Size = new System.Drawing.Size(112, 24); this.buttonLearn.TabIndex = 4; @@ -257,7 +257,7 @@ this.groupBoxCarrier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.groupBoxCarrier.Controls.Add(this.textBoxCarrier); this.groupBoxCarrier.Controls.Add(this.buttonSetCarrier); - this.groupBoxCarrier.Location = new System.Drawing.Point(328, 32); + this.groupBoxCarrier.Location = new System.Drawing.Point(336, 32); this.groupBoxCarrier.Name = "groupBoxCarrier"; this.groupBoxCarrier.Size = new System.Drawing.Size(168, 56); this.groupBoxCarrier.TabIndex = 2; @@ -270,7 +270,7 @@ this.groupBoxTestBlast.Controls.Add(this.buttonBlast); this.groupBoxTestBlast.Controls.Add(this.comboBoxPort); this.groupBoxTestBlast.Enabled = false; - this.groupBoxTestBlast.Location = new System.Drawing.Point(328, 96); + this.groupBoxTestBlast.Location = new System.Drawing.Point(336, 96); this.groupBoxTestBlast.Name = "groupBoxTestBlast"; this.groupBoxTestBlast.Size = new System.Drawing.Size(168, 56); this.groupBoxTestBlast.TabIndex = 3; @@ -292,9 +292,9 @@ // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabelConnected}); - this.statusStrip.Location = new System.Drawing.Point(0, 283); + this.statusStrip.Location = new System.Drawing.Point(0, 284); this.statusStrip.Name = "statusStrip"; - this.statusStrip.Size = new System.Drawing.Size(504, 22); + this.statusStrip.Size = new System.Drawing.Size(512, 22); this.statusStrip.TabIndex = 7; this.statusStrip.Text = "statusStrip"; // @@ -302,7 +302,7 @@ // this.toolStripStatusLabelConnected.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripStatusLabelConnected.Name = "toolStripStatusLabelConnected"; - this.toolStripStatusLabelConnected.Size = new System.Drawing.Size(489, 17); + this.toolStripStatusLabelConnected.Size = new System.Drawing.Size(497, 17); this.toolStripStatusLabelConnected.Spring = true; this.toolStripStatusLabelConnected.Text = "Not connected"; this.toolStripStatusLabelConnected.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -311,7 +311,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(504, 305); + this.ClientSize = new System.Drawing.Size(512, 306); this.Controls.Add(this.statusStrip); this.Controls.Add(this.buttonLearn); this.Controls.Add(this.groupBoxTestBlast); @@ -322,7 +322,7 @@ this.Controls.Add(this.menuStrip); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuStrip; - this.MinimumSize = new System.Drawing.Size(512, 332); + this.MinimumSize = new System.Drawing.Size(520, 332); this.Name = "FormMain"; this.Text = "IR File Tool"; this.menuStrip.ResumeLayout(false); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -195,9 +195,18 @@ SourceGrid.CellContext context = (SourceGrid.CellContext)sender; SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; - IConfigure plugin = cell.Row.Tag as IConfigure; - if (plugin != null) - plugin.Configure(this); + try + { + IConfigure plugin = cell.Row.Tag as IConfigure; + if (plugin != null) + plugin.Configure(this); + } + catch (Exception ex) + { + IrssLog.Error(ex); + + MessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private void TransmitChanged(object sender, EventArgs e) { Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -1908,6 +1908,7 @@ int nMaxCount); [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] static extern bool IsChild( IntPtr hWndParent, IntPtr hWndChild); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -129,7 +129,12 @@ { listViewPlugins.Clear(); - string[] files = Directory.GetFiles(textBoxPluginFolder.Text, "*.dll", SearchOption.TopDirectoryOnly); + string folder = textBoxPluginFolder.Text; + + if (String.IsNullOrEmpty(folder)) + return; + + string[] files = Directory.GetFiles(folder, "*.dll", SearchOption.TopDirectoryOnly); if (files.Length > 0) foreach (string file in files) listViewPlugins.Items.Add(Path.GetFileName(file)); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -261,8 +261,13 @@ #region Interop - [DllImport("kernel32", CharSet = CharSet.Auto)] - extern static IntPtr LoadLibrary( + [DllImport("kernel32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool SetDllDirectory( + string lpPathName); + + [DllImport("kernel32.dll", CharSet = CharSet.Auto)] + static extern IntPtr LoadLibrary( string dllFileName); [DllImport("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true)] @@ -270,9 +275,9 @@ IntPtr module, string functionName); - [DllImport("kernel32")] + [DllImport("kernel32.dll")] [return: MarshalAs(UnmanagedType.Bool)] - extern static bool FreeLibrary( + static extern bool FreeLibrary( IntPtr handle); #endregion Interop @@ -1111,6 +1116,10 @@ bool LoadGirderPlugin(string girderPluginFile) { + string folder = Path.GetDirectoryName(girderPluginFile); + string parent = Directory.GetParent(folder).FullName; + SetDllDirectory(parent); + _pluginDll = LoadLibrary(girderPluginFile); if (_pluginDll == IntPtr.Zero) throw new InvalidOperationException(String.Format("Failed to call LoadLibrary on girder plugin dll ({0})", girderPluginFile)); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/Configure.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/Configure.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/Configure.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -39,34 +39,52 @@ #region Properties + /// <summary> + /// Gets or sets the index of the device. + /// </summary> + /// <value>The index of the device.</value> public int DeviceIndex { - get { return comboBoxDevice.SelectedIndex; } - set { comboBoxDevice.SelectedIndex = value; } + get + { + return comboBoxDevice.SelectedIndex; + } + set + { + if (comboBoxDevice.Items.Count > value) + comboBoxDevice.SelectedIndex = value; + } } #endregion Properties #region Constructor + /// <summary> + /// Initializes a new instance of the <see cref="Configure"/> class. + /// </summary> public Configure() { InitializeComponent(); -/* + + // TODO: Finish the LiveDrive support! + MidiInCaps midiInCaps = new MidiInCaps(); ASCIIEncoding encoder = new ASCIIEncoding(); - for (int i = 0; i < m_lirPlugin.MIDIDeviceCount; i++) + for (int i = 0; i < LiveDriveReceiver.midiInGetNumDevs(); i++) { if (midiInGetDevCaps(i, ref midiInCaps, Marshal.SizeOf(typeof(MidiInCaps))) == 0) { string strName = encoder.GetString(midiInCaps.szPname); int intNullIndex = strName.IndexOf((char)0); strName = strName.Remove(intNullIndex, MidiInCaps.MAXPNAMELEN - intNullIndex); - cbxDevices.Items.Add(new MIDIDevice(strName, i)); + + comboBoxDevice.Items.Add(strName); + + //cbxDevices.Items.Add(new MIDIDevice(strName, i)); } } - */ } #endregion Constructor Modified: trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDriveReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDriveReceiver.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDriveReceiver.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -24,7 +24,7 @@ #region Interop [DllImport("winmm.dll")] - static extern int midiInGetNumDevs(); + internal static extern int midiInGetNumDevs(); [DllImport("winmm.dll")] static extern uint midiInOpen(ref int lphMidiIn, int uDeviceID, MidiInProc dwCallback, int dwInstance, Int64 dwFlags); @@ -249,7 +249,7 @@ Marshal.FreeHGlobal(_midiHeader.data); while ((error = midiInClose(_midiInHandle)) == MIDIERR_STILLPLAYING) - Thread.Sleep(5); + Thread.Sleep(50); } /// <summary> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -390,8 +390,11 @@ { try { +#if TEST_APPLICATION + string path = fileName; +#else string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), String.Format("IR Server Suite\\Logs\\{0}", fileName)); - +#endif _debugFile = new StreamWriter(path, false); _debugFile.AutoFlush = true; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -1,5 +1,3 @@ -//#define TEST_APPLICATION - using System; using System.Collections; using System.Collections.Generic; @@ -55,6 +53,7 @@ public class MicrosoftMceTransceiver : PluginBase, IConfigure, ITransmitIR, ILearnIR, IRemoteReceiver, IKeyboardReceiver, IMouseReceiver { + // #define TEST_APPLICATION in the project properties when creating the console test app ... #if TEST_APPLICATION static MicrosoftMceTransceiver device; Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs 2008-03-21 07:24:54 UTC (rev 1492) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs 2008-03-21 15:43:28 UTC (rev 1493) @@ -182,9 +182,18 @@ SourceGrid.CellContext context = (SourceGrid.CellContext)sender; SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell; - IConfigure plugin = cell.Row.Tag as IConfigure; - if (plugin != null) - plugin.Configure(this); + try + { + IConfigure plugin = cell.Row.Tag as IConfigure; + if (plugin != null) + plugin.Configure(this); + } + catch (Exception ex) + { + IrssLog.Error(ex); + + MessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } private void TransmitChanged(object sender, EventArgs e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2008-03-21 21:34:12
|
Revision: 1495 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1495&view=rev Author: chef_koch Date: 2008-03-21 14:34:11 -0700 (Fri, 21 Mar 2008) Log Message: ----------- just an short, and still a bit uncleaned example how it could work Added Paths: ----------- trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh trunk/plugins/IR Server Suite/setup-RememberSections.nsh trunk/plugins/IR Server Suite/setup-languages.nsh trunk/plugins/IR Server Suite/setup.nsi Added: trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-AddRemovePage.nsh 2008-03-21 21:34:11 UTC (rev 1495) @@ -0,0 +1,167 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +#**********************************************************************************************************# +# +# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality +# and modified for our needs. +# +#**********************************************************************************************************# + +!ifndef WORDFUNC_INCLUDED + !include WordFunc.nsh +!endif +!ifndef FILEFUNC_INCLUDED + !include FileFunc.nsh +!endif + +!insertmacro VersionCompare +!insertmacro GetParent + +##### Add/Remove/Reinstall page +Var ReinstallPageCheck + +Function PageReinstall + ReadRegStr $R0 HKLM "${REG_UNINSTALL}" "InstallPath" + + ${If} $R0 == "" + Abort + ${EndIf} + + ReadRegDWORD $R0 HKLM "${REG_UNINSTALL}" "VersionMajor" + ReadRegDWORD $R1 HKLM "${REG_UNINSTALL}" "VersionMinor" + ReadRegDWORD $R2 HKLM "${REG_UNINSTALL}" "VersionRevision" + ReadRegDWORD $R3 HKLM "${REG_UNINSTALL}" "VersionBuild" + StrCpy $R0 $R0.$R1.$R2.$R3 + + ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0 + ${If} $R0 == 0 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_REPAIR)" + StrCpy $R2 "$(TEXT_ADDREMOVE_REPAIR_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_REPAIR_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_REPAIR)" + StrCpy $R0 "2" + ${ElseIf} $R0 == 1 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_UPGRADE)" + StrCpy $R2 "$(TEXT_ADDREMOVE_UPDOWN_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_UPDOWN_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_UPDOWN)" + StrCpy $R0 "1" + ${ElseIf} $R0 == 2 + StrCpy $R1 "$(TEXT_ADDREMOVE_INFO_DOWNGRADE)" + StrCpy $R2 "$(TEXT_ADDREMOVE_UPDOWN_OPT1)" + StrCpy $R3 "$(TEXT_ADDREMOVE_UPDOWN_OPT2)" + !insertmacro MUI_HEADER_TEXT "$(TEXT_ADDREMOVE_HEADER)" "$(TEXT_ADDREMOVE_HEADER2_UPDOWN)" + StrCpy $R0 "1" + ${Else} + Abort + ${EndIf} + + nsDialogs::Create /NOUNLOAD 1018 + + ${NSD_CreateLabel} 0 0 100% 24u $R1 + Pop $R1 + + ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2 + Pop $R2 + ${NSD_OnClick} $R2 PageReinstallUpdateSelection + + ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3 + Pop $R3 + ${NSD_OnClick} $R3 PageReinstallUpdateSelection + + ${If} $ReinstallPageCheck != 2 + SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0 + ${Else} + SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0 + ${EndIf} + + nsDialogs::Show +FunctionEnd + +Function PageReinstallUpdateSelection + Pop $R1 + + ${NSD_GetState} $R2 $R1 + + ${If} $R1 == ${BST_CHECKED} + StrCpy $ReinstallPageCheck 1 + ${Else} + StrCpy $ReinstallPageCheck 2 + ${EndIf} + +FunctionEnd + +Function PageLeaveReinstall + ${NSD_GetState} $R2 $R1 + + StrCmp $R0 "1" 0 +2 + StrCmp $R1 "1" doUninstall finish + StrCmp $R0 "2" 0 +3 + StrCmp $R1 "1" finish doUninstall + + doUninstall: + ; check if MP is already installed + ReadRegStr $R0 HKLM "${REG_UNINSTALL}" UninstallString + IfFileExists $R0 0 unInstallDone + + ; get parent folder of uninstallation EXE (RO) and save it to R1 + ${GetParent} $R0 $R1 + ; start uninstallation of installed MP, from tmp folder, so it will delete itself + HideWindow + ClearErrors + CopyFiles $R0 "$TEMP\uninstall-tve3.exe" + ExecWait '"$TEMP\uninstall-tve3.exe" _?=$R1' + BringToFront + + ; if an error occured, ask to cancel installation + IfErrors 0 unInstallDone + MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_MSGBOX_ERROR_ON_UNINSTALL)" /SD IDNO IDYES unInstallDone IDNO 0 + Quit + unInstallDone: + + + ; if reboot flag is set, abort the installation, and continue the installer on next startup + ${If} ${FileExists} "$INSTDIR\rebootflag" + MessageBox MB_OK|MB_ICONEXCLAMATION "$(TEXT_MSGBOX_ERROR_REBOOT_REQUIRED)" IDOK 0 + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "$(^Name)" $EXEPATH + Quit + ${EndIf} + + finish: +FunctionEnd + + + +LangString TEXT_ADDREMOVE_HEADER ${LANG_ENGLISH} "Already Installed" +LangString TEXT_ADDREMOVE_HEADER2_REPAIR ${LANG_ENGLISH} "Choose the maintenance option to perform." +LangString TEXT_ADDREMOVE_HEADER2_UPDOWN ${LANG_ENGLISH} "Choose how you want to install $(^Name)." +LangString TEXT_ADDREMOVE_INFO_REPAIR ${LANG_ENGLISH} "$(^Name) ${VERSION} is already installed. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_INFO_UPGRADE ${LANG_ENGLISH} "An older version of $(^Name) is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_INFO_DOWNGRADE ${LANG_ENGLISH} "A newer version of $(^Name) is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue." +LangString TEXT_ADDREMOVE_REPAIR_OPT1 ${LANG_ENGLISH} "Add/Remove/Reinstall components" +LangString TEXT_ADDREMOVE_REPAIR_OPT2 ${LANG_ENGLISH} "Uninstall $(^Name)" +LangString TEXT_ADDREMOVE_UPDOWN_OPT1 ${LANG_ENGLISH} "Uninstall before installing" +LangString TEXT_ADDREMOVE_UPDOWN_OPT2 ${LANG_ENGLISH} "Do not uninstall" \ No newline at end of file Added: trunk/plugins/IR Server Suite/setup-RememberSections.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-RememberSections.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-RememberSections.nsh 2008-03-21 21:34:11 UTC (rev 1495) @@ -0,0 +1,89 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +#**********************************************************************************************************# +# +# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality +# and modified for our needs. +# +#**********************************************************************************************************# + +#Var AR_SecFlags +#Var AR_RegFlags + +# registry +# ${MEMENTO_REGISTRY_ROOT} +# ${MEMENTO_REGISTRY_KEY} +# ${MEMENTO_REGISTRY_KEY} +#ReadRegDWORD $AR_RegFlags ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` + + /* not needed anymore ----- done by MementoSectionRestore +!macro InitSection SecName + ;This macro reads component installed flag from the registry and + ;changes checked state of the section on the components page. + ;Input: section index constant name specified in Section command. + + ClearErrors + ;Reading component status from registry + ReadRegDWORD $AR_RegFlags "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "${SecName}" + IfErrors "default_${SecName}" + + ;Status will stay default if registry value not found + ;(component was never installed) + IntOp $AR_RegFlags $AR_RegFlags & 0x0001 ;Turn off all other bits + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags + IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off + IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit + + ;Writing modified flags + SectionSetFlags ${${SecName}} $AR_SecFlags + + "default_${SecName}:" +!macroend +*/ + +!macro FinishSection SecName + ;This macro reads section flag set by user and removes the section + ;if it is not selected. + ;Then it writes component installed flag to registry + ;Input: section index constant name specified in Section command. + + ${IfNot} ${SectionIsSelected} "${${SecName}}" + ClearErrors + ReadRegDWORD $R0 ${MEMENTO_REGISTRY_ROOT} '${MEMENTO_REGISTRY_KEY}' 'MementoSection_${SecName}' + + ${If} $R0 = 1 + !insertmacro "Remove_${${SecName}}" + ${EndIf} + ${EndIf} +!macroend + +!macro RemoveSection SecName + ;This macro is used to call section's Remove_... macro + ;from the uninstaller. + ;Input: section index constant name specified in Section command. + + !insertmacro "Remove_${${SecName}}" +!macroend \ No newline at end of file Added: trunk/plugins/IR Server Suite/setup-languages.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-languages.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-languages.nsh 2008-03-21 21:34:11 UTC (rev 1495) @@ -0,0 +1,57 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +#**********************************************************************************************************# +# +# This header contains multilanguage strings for the setup routine +# +#**********************************************************************************************************# + +# ENGLISH +LangString DESC_SectionInputService ${LANG_ENGLISH} "A windows service that provides access to your IR devices." +LangString DESC_SectionMPControlPlugin ${LANG_ENGLISH} "Connects to the Input Service to control MediaPortal." +LangString DESC_SectionMPBlastZonePlugin ${LANG_ENGLISH} "Lets you control your IR devices from within the MediaPortal GUI." +LangString DESC_SectionTV2BlasterPlugin ${LANG_ENGLISH} "For tuning external channels (on Set Top Boxes) with the default MediaPortal TV engine." +LangString DESC_SectionTV3BlasterPlugin ${LANG_ENGLISH} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." +LangString DESC_SectionTranslator ${LANG_ENGLISH} "Control your whole PC." +LangString DESC_SectionTrayLauncher ${LANG_ENGLISH} "Simple tray application to launch an application of your choosing when a particular button is pressed." +LangString DESC_SectionVirtualRemote ${LANG_ENGLISH} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote). Also includes a Skin Editor and Smart Device versions of Virtual Remote." +LangString DESC_SectionIRBlast ${LANG_ENGLISH} "Command line tools for blasting IR codes." +LangString DESC_SectionIRFileTool ${LANG_ENGLISH} "Tool for learning, modifying, testing, correcting and converting IR command files." +LangString DESC_SectionKeyboardInputRelay ${LANG_ENGLISH} "Relays keyboard input to the Input Service to act on keypresses like remote buttons." +LangString DESC_SectionDboxTuner ${LANG_ENGLISH} "Command line tuner for Dreambox devices." +LangString DESC_SectionHcwPvrTuner ${LANG_ENGLISH} "Command line tuner for Hauppauge PVR devices." +LangString DESC_SectionDebugClient ${LANG_ENGLISH} "Very simple testing tool for troubleshooting input and communications problems." + + +LangString ^UninstallLink ${LANG_ENGLISH ${LANG_ENGLISH} "Uninstall $(^Name)" + +LangString TEXT_MSGBOX_REMOVE_ALL ${LANG_ENGLISH ${LANG_ENGLISH} "Do you want to remove your User settings?$\r$\nAttention: This will remove all your customised settings including Skins and Databases." + +LangString TEXT_MSGBOX_ERROR_DOTNET ${LANG_ENGLISH ${LANG_ENGLISH} "Microsoft .Net Framework Runtime is a prerequisite. Please install first." +LangString TEXT_MSGBOX_ERROR_WIN ${LANG_ENGLISH ${LANG_ENGLISH} "MediaPortal requires at least Windows XP. Your Windows is not supported. Installation aborted" +LangString TEXT_MSGBOX_ERROR_IS_INSTALLED ${LANG_ENGLISH ${LANG_ENGLISH} "MediaPortal is already installed. You need to uninstall it, before you continue with the installation.$\r$\nUninstall will be lunched when pressing OK." +LangString TEXT_MSGBOX_ERROR_ON_UNINSTALL ${LANG_ENGLISH ${LANG_ENGLISH} "An error occured while trying to uninstall old version!$\r$\nDo you still want to continue the installation?" +LangString TEXT_MSGBOX_ERROR_REBOOT_REQUIRED ${LANG_ENGLISH ${LANG_ENGLISH} "REBOOT IS REQUIRED. DO THAT!!!!" Added: trunk/plugins/IR Server Suite/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup.nsi (rev 0) +++ trunk/plugins/IR Server Suite/setup.nsi 2008-03-21 21:34:11 UTC (rev 1495) @@ -0,0 +1,1100 @@ +;====================================== +; IR Server Suite.nsi +; +; (C) Copyright Aaron Dinnage, 2008 +;====================================== +!define DEBUG + +!ifdef DEBUG + !define BuildType "Debug" +!else + !define BuildType "Release" +!endif + +;====================================== + +!define PRODUCT_NAME "IR Server Suite" +!define PRODUCT_VERSION "1.0.4.2" +!define PRODUCT_PUBLISHER "and-81" +!define PRODUCT_WEB_SITE "http://forum.team-mediaportal.com/mce_replacement_plugin-f165.html" + +!define REG_UNINSTALL "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define MEMENTO_REGISTRY_ROOT HKLM +!define MEMENTO_REGISTRY_KEY "${REG_UNINSTALL}" + +; i would suggest to using the last digit for the svn revision number +; so you can also remove the debug flag becuase you could indicate it by using the VER_BUILD +; which is set to zero for Release BUILDS +!define VER_MAJOR 1 +!define VER_MINOR 4 +!define VER_REVISION 2 +!ifndef VER_BUILD + !define VER_BUILD 0 +!endif +!if ${VER_BUILD} == 0 # it's a stable release + !define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}" +!else # it's an svn release + !define VERSION "debug build ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}" +!endif +BrandingText "${PRODUCT_NAME} ${VERSION} by ${PRODUCT_PUBLISHER}" + +;====================================== + +!include "x64.nsh" +!include MUI2.nsh +!include Sections.nsh +!include LogicLib.nsh +!include Library.nsh +!include FileFunc.nsh +!include WinVer.nsh +!include Memento.nsh + +!include setup-AddRemovePage.nsh +!include setup-RememberSections.nsh +!include setup-languages.nsh + +; FileFunc macros +!insertmacro GetParent + +;====================================== +Name "${PRODUCT_NAME}" +OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" +InstallDir "" +!ifdef DEBUG + ShowInstDetails show + ShowUninstDetails show +!else + ShowInstDetails hide + ShowUninstDetails hide +!endif +BrandingText "${PRODUCT_NAME} by Aaron Dinnage" +SetCompressor /SOLID /FINAL lzma +CRCCheck On + +; Variables +var DIR_INSTALL +var DIR_MEDIAPORTAL +var DIR_TVSERVER + +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" + +!insertmacro MUI_PAGE_WELCOME +Page custom PageReinstall PageLeaveReinstall +!insertmacro MUI_PAGE_LICENSE "Documentation\LICENSE.GPL" +!insertmacro MUI_PAGE_COMPONENTS + +; Main app install path +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +!insertmacro MUI_PAGE_DIRECTORY + +; MediaPortal install path +!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP +!insertmacro MUI_PAGE_DIRECTORY + +; TV Server install path +!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV +!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV +!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV +!insertmacro MUI_PAGE_DIRECTORY + +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +;====================================== +;====================================== + +!macro SectionList MacroName + ; This macro used to perform operation on multiple sections. + ; List all of your components in following manner here. + !insertmacro "${MacroName}" "SectionInputService" + !insertmacro "${MacroName}" "SectionMPControlPlugin" + !insertmacro "${MacroName}" "SectionMPBlastZonePlugin" + !insertmacro "${MacroName}" "SectionTV2BlasterPlugin" + !insertmacro "${MacroName}" "SectionTV3BlasterPlugin" + !insertmacro "${MacroName}" "SectionTranslator" + !insertmacro "${MacroName}" "SectionTrayLauncher" + !insertmacro "${MacroName}" "SectionVirtualRemote" + !insertmacro "${MacroName}" "SectionIRBlast" + !insertmacro "${MacroName}" "SectionIRFileTool" + !insertmacro "${MacroName}" "SectionKeyboardInputRelay" + !insertmacro "${MacroName}" "SectionDboxTuner" + !insertmacro "${MacroName}" "SectionHcwPvrTuner" + !insertmacro "${MacroName}" "SectionDebugClient" +!macroend + +!macro initRegKeys + ${If} ${RunningX64} + + SetRegView 64 + + ${DisableX64FSRedirection} + + ; Get IR Server Suite installation directory ... + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ; Get MediaPortal installation directory ... + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ${Endif} + + ; Get MediaPortal TV Server installation directory ... + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${Endif} + + ${EnableX64FSRedirection} + + ${Else} + + SetRegView 32 + + ; Get IR Server Suite installation directory ... + ReadRegStr $DIR_INSTALL HKLM "Software\${PRODUCT_NAME}" "Install_Dir" + ${If} $DIR_INSTALL == "" + StrCpy '$DIR_INSTALL' '$PROGRAMFILES\${PRODUCT_NAME}' + ${Endif} + + ; Get MediaPortal installation directory ... + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" + ${If} $DIR_MEDIAPORTAL == "" + + ReadRegStr $DIR_MEDIAPORTAL HKLM "Software\Team MediaPortal\MediaPortal" "ApplicationDir" + + ${If} $DIR_MEDIAPORTAL == "" + StrCpy '$DIR_MEDIAPORTAL' '$PROGRAMFILES\Team MediaPortal\MediaPortal' + ${Endif} + + ${Endif} + + ; Get MediaPortal TV Server installation directory ... + ReadRegStr $DIR_TVSERVER HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" + ${If} $DIR_TVSERVER == "" + + ReadRegStr $DIR_TVSERVER HKLM "Software\Team MediaPortal\MediaPortal TV Server" "InstallPath" + + ${If} $DIR_TVSERVER == "" + StrCpy '$DIR_TVSERVER' '$PROGRAMFILES\Team MediaPortal\MediaPortal TV Server' + ${Endif} + + ${Endif} + + ${Endif} +!macroend + +;====================================== +;====================================== + +Function .onInit + +!insertmacro initRegKeys + +; reads components status for registry +${MementoSectionRestore} + +FunctionEnd + +;====================================== + +Function .onInstSuccess + + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StartInputService SkipStartInputService + +StartInputService: + Exec '"$DIR_INSTALL\Input Service\Input Service.exe" /start' + +SkipStartInputService: + +FunctionEnd + +;====================================== + +Function DirectoryPreMP + SectionGetFlags 3 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + SectionGetFlags 4 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + SectionGetFlags 5 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreMP + + Abort + +EndDirectoryPreMP: +FunctionEnd + +;====================================== + +Function DirectoryPreTV + SectionGetFlags 6 $R0 + IntOp $R0 $R0 & ${SF_SELECTED} + IntCmp $R0 ${SF_SELECTED} EndDirectoryPreTV + + Abort + +EndDirectoryPreTV: +FunctionEnd + +;====================================== + +Function DirectoryShowApp + !insertmacro MUI_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" "Choose the folder in which to install ${PRODUCT_NAME}." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." +FunctionEnd + +;====================================== + +Function DirectoryShowMP + !insertmacro MUI_HEADER_TEXT "Choose MediaPortal Location" "Choose the folder in which to install MediaPortal plugins." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +FunctionEnd + +;====================================== + +Function DirectoryShowTV + !insertmacro MUI_HEADER_TEXT "Choose TV Server Location" "Choose the folder in which to install TV Server plugins." + !insertmacro MUI_INNERDIALOG_TEXT 1041 "TV Server Folder" + !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_TVSERVER" + !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +FunctionEnd + +;====================================== + +Function DirectoryLeaveApp + StrCpy $DIR_INSTALL $INSTDIR +FunctionEnd + +;====================================== + +Function DirectoryLeaveMP + StrCpy $DIR_MEDIAPORTAL $INSTDIR +FunctionEnd + +;====================================== + +Function DirectoryLeaveTV + StrCpy $DIR_TVSERVER $INSTDIR +FunctionEnd + +;====================================== + +!define LVM_GETITEMCOUNT 0x1004 +!define LVM_GETITEMTEXT 0x102D + +Function DumpLog + Exch $5 + Push $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $6 + + FindWindow $0 "#32770" "" $HWNDPARENT + GetDlgItem $0 $0 1016 + StrCmp $0 0 exit + FileOpen $5 $5 "w" + StrCmp $5 "" exit + SendMessage $0 ${LVM_GETITEMCOUNT} 0 0 $6 + System::Alloc ${NSIS_MAX_STRLEN} + Pop $3 + StrCpy $2 0 + System::Call "*(i, i, i, i, i, i, i, i, i) i \ + (0, 0, 0, 0, 0, r3, ${NSIS_MAX_STRLEN}) .r1" + loop: StrCmp $2 $6 done + System::Call "User32::SendMessageA(i, i, i, i) i \ + ($0, ${LVM_GETITEMTEXT}, $2, r1)" + System::Call "*$3(&t${NSIS_MAX_STRLEN} .r4)" + FileWrite $5 "$4$\r$\n" + IntOp $2 $2 + 1 + Goto loop + done: + FileClose $5 + System::Free $1 + System::Free $3 + exit: + Pop $6 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 + Exch $5 +FunctionEnd + +;====================================== +;====================================== + +Section "-Prepare" + + DetailPrint "Preparing to install ..." + + ; Use the all users context + SetShellVarContext all + + ; Kill running Programs + DetailPrint "Terminating processes ..." + ExecWait '"taskkill" /F /IM Translator.exe' + ExecWait '"taskkill" /F /IM TrayLauncher.exe' + ExecWait '"taskkill" /F /IM WebRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' + ExecWait '"taskkill" /F /IM IRFileTool.exe' + ExecWait '"taskkill" /F /IM DebugClient.exe' + ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' + + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" StopInputService SkipStopInputService + +StopInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /stop' + +SkipStopInputService: + Sleep 100 + +SectionEnd + +;====================================== + +Section "-Core" + + DetailPrint "Setting up paths and installing core files ..." + + ; Use the all users context + SetShellVarContext all + + ; Create install directory + CreateDirectory "$DIR_INSTALL" + + ; Write the installation paths into the registry + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "Install_Dir" "$DIR_INSTALL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "MediaPortal_Dir" "$DIR_MEDIAPORTAL" + WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" + + ; Write documentation +!ifdef DEBUG + DetailPrint "Warning: Documentation is not included in debug builds" +!else + SetOutPath "$DIR_INSTALL" + SetOverwrite ifnewer + File "Documentation\${PRODUCT_NAME}.chm" +!endif + + ; Create app data directories + CreateDirectory "$APPDATA\${PRODUCT_NAME}" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Logs" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR Commands" + + ; Copy known set top boxes + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + SetOutPath "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + SetOverwrite ifnewer + File /r /x .svn "Set Top Boxes\*.*" + + ; Create a start menu shortcut folder + CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" + +SectionEnd + +;====================================== + +${MementoSection} "Input Service" SectionInputService + + DetailPrint "Installing Input Service ..." + + ; Use the all users context + SetShellVarContext all + + ; Uninstall current Input Service ... + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService + +UninstallInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' + +SkipUninstallInputService: + Sleep 100 + + ; Installing Input Service + CreateDirectory "$DIR_INSTALL\Input Service" + SetOutPath "$DIR_INSTALL\Input Service" + SetOverwrite ifnewer + File "Input Service\Input Service\bin\${BuildType}\*.*" + + ; Installing Input Service Configuration + CreateDirectory "$DIR_INSTALL\Input Service Configuration" + SetOutPath "$DIR_INSTALL\Input Service Configuration" + SetOverwrite ifnewer + File "Input Service\Input Service Configuration\bin\${BuildType}\*.*" + + ; Install IR Server Plugins ... + DetailPrint "Installing IR Server Plugins ..." + CreateDirectory "$DIR_INSTALL\IR Server Plugins" + SetOutPath "$DIR_INSTALL\IR Server Plugins" + SetOverwrite ifnewer + + File "IR Server Plugins\Ads Tech PTV-335 Receiver\bin\${BuildType}\Ads Tech PTV-335 Receiver.*" + File "IR Server Plugins\CoolCommand Receiver\bin\${BuildType}\CoolCommand Receiver.*" + File "IR Server Plugins\Custom HID Receiver\bin\${BuildType}\Custom HID Receiver.*" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Direct Input Receiver.*" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.DirectInput.dll" + File "IR Server Plugins\Direct Input Receiver\bin\${BuildType}\Microsoft.DirectX.dll" + File "IR Server Plugins\FusionRemote Receiver\bin\${BuildType}\FusionRemote Receiver.*" + File "IR Server Plugins\Girder Plugin\bin\${BuildType}\Girder Plugin.*" + File "IR Server Plugins\HCW Receiver\bin\${BuildType}\HCW Receiver.*" + File "IR Server Plugins\IgorPlug Receiver\bin\${BuildType}\IgorPlug Receiver.*" + ;File "IR Server Plugins\IR501 Receiver\bin\${BuildType}\IR501 Receiver.*" + File "IR Server Plugins\IR507 Receiver\bin\${BuildType}\IR507 Receiver.*" + ;File "IR Server Plugins\Ira Transceiver\bin\${BuildType}\Ira Transceiver.*" + File "IR Server Plugins\IRMan Receiver\bin\${BuildType}\IRMan Receiver.*" + File "IR Server Plugins\IRTrans Transceiver\bin\${BuildType}\IRTrans Transceiver.*" + ;File "IR Server Plugins\Keyboard Input\bin\${BuildType}\Keyboard Input.*" + File "IR Server Plugins\LiveDrive Receiver\bin\${BuildType}\LiveDrive Receiver.*" + File "IR Server Plugins\MacMini Receiver\bin\${BuildType}\MacMini Receiver.*" + File "IR Server Plugins\Microsoft MCE Transceiver\bin\${BuildType}\Microsoft MCE Transceiver.*" + ;File "IR Server Plugins\RC102 Receiver\bin\${BuildType}\RC102 Receiver.*" + File "IR Server Plugins\RedEye Blaster\bin\${BuildType}\RedEye Blaster.*" + File "IR Server Plugins\Serial IR Blaster\bin\${BuildType}\Serial IR Blaster.*" + ;File "IR Server Plugins\Speech Receiver\bin\${BuildType}\Speech Receiver.*" + File "IR Server Plugins\Technotrend Receiver\bin\${BuildType}\Technotrend Receiver.*" + ;File "IR Server Plugins\Tira Transceiver\bin\${BuildType}\Tira Transceiver.*" + File "IR Server Plugins\USB-UIRT Transceiver\bin\${BuildType}\USB-UIRT Transceiver.*" + File "IR Server Plugins\Wii Remote Receiver\bin\${BuildType}\Wii Remote Receiver.*" + File "IR Server Plugins\WiimoteLib\bin\${BuildType}\WiimoteLib.*" + File "IR Server Plugins\Windows Message Receiver\bin\${BuildType}\Windows Message Receiver.*" + File "IR Server Plugins\WinLirc Transceiver\bin\${BuildType}\WinLirc Transceiver.*" + File "IR Server Plugins\X10 Transceiver\bin\${BuildType}\X10 Transceiver.*" + File "IR Server Plugins\X10 Transceiver\bin\${BuildType}\Interop.X10.dll" + File "IR Server Plugins\XBCDRC Receiver\bin\${BuildType}\XBCDRC Receiver.*" + + ; Create App Data Folder for IR Server configuration files + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service" + + ; Copy Abstract Remote maps + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" + SetOutPath "$APPDATA\${PRODUCT_NAME}\Input Service\Abstract Remote Maps" + SetOverwrite ifnewer + File /r /x .svn "Input Service\Input Service\Abstract Remote Maps\*.*" + File "Input Service\Input Service\RemoteTable.xsd" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Input Service Configuration.lnk" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" "" "$DIR_INSTALL\Input Service Configuration\Input Service Configuration.exe" 0 + + ; Launch Input Service + DetailPrint "Starting Input Service ..." + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /install' + +${MementoSectionEnd} +!macro Remove_${SectionInputService} + DetailPrint "Attempting to remove Input Service ... !!!not implemented" +!macroend + +;====================================== + +${MementoSection} "MP Control Plugin" SectionMPControlPlugin + + DetailPrint "Installing MP Control Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\MP Control Plugin\bin\${BuildType}\MPControlPlugin.dll" + + ; Write input mapping + SetOutPath "$DIR_MEDIAPORTAL\InputDeviceMappings\defaults" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Control Plugin\InputMapping\MPControlPlugin.xml" + + ; Write app data + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" + SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Control Plugin" + SetOverwrite ifnewer + File /r /x .svn "MediaPortal Plugins\MP Control Plugin\AppData\*.*" + + ; Create Macro folder + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Control Plugin\Macro" + +${MementoSectionEnd} +!macro Remove_${SectionMPControlPlugin} + DetailPrint "Attempting to remove MediaPortal Control Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\MPControlPlugin.dll" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "MP Blast Zone Plugin" SectionMPBlastZonePlugin +!else +${MementoUnselectedSection} "MP Blast Zone Plugin" SectionMPBlastZonePlugin +!endif + + DetailPrint "Installing MP Blast Zone Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Windows" + SetOverwrite ifnewer + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\MP Blast Zone Plugin\bin\${BuildType}\MPBlastZonePlugin.dll" + + ; Write app data + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" + SetOutPath "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin" + SetOverwrite off + File "MediaPortal Plugins\MP Blast Zone Plugin\AppData\Menu.xml" + + ; Write skin files + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo" + SetOverwrite on + File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" + + SetOutPath "$DIR_MEDIAPORTAL\Skin\BlueTwo wide" + SetOverwrite on + File /r /x .svn "MediaPortal Plugins\MP Blast Zone Plugin\Skin\*.*" + + ; Create Macro folder + CreateDirectory "$APPDATA\${PRODUCT_NAME}\MP Blast Zone Plugin\Macro" + +${MementoSectionEnd} +!macro Remove_${SectionMPBlastZonePlugin} + DetailPrint "Attempting to remove MediaPortal Blast Zone Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPUtils.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssComms.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\IrssUtils.dll" + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Windows\MPBlastZonePlugin.dll" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "TV2 Blaster Plugin" SectionTV2BlasterPlugin +!else +${MementoUnselectedSection} "TV2 Blaster Plugin" SectionTV2BlasterPlugin +!endif + + DetailPrint "Installing TV2 Blaster Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_MEDIAPORTAL\Plugins\Process" + SetOverwrite ifnewer + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\TV2 Blaster Plugin\bin\${BuildType}\TV2BlasterPlugin.dll" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV2 Blaster Plugin\Macro" + +${MementoSectionEnd} +!macro Remove_${SectionTV2BlasterPlugin} + DetailPrint "Attempting to remove MediaPortal TV2 Plugin ..." + Delete /REBOOTOK "$DIR_MEDIAPORTAL\Plugins\Process\TV2BlasterPlugin.dll" +!macroend + +;====================================== + +${MementoUnselectedSection} "TV3 Blaster Plugin" SectionTV3BlasterPlugin + + DetailPrint "Installing TV3 Blaster Plugin ..." + + ; Use the all users context + SetShellVarContext all + + ; Write plugin dll + SetOutPath "$DIR_TVSERVER\Plugins" + SetOverwrite ifnewer + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\MPUtils.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\IrssComms.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\IrssUtils.dll" + File "MediaPortal Plugins\TV3 Blaster Plugin\bin\${BuildType}\TV3BlasterPlugin.dll" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\TV3 Blaster Plugin\Macro" + +${MementoSectionEnd} +!macro Remove_${SectionTV3BlasterPlugin} + DetailPrint "Attempting to remove MediaPortal TV3 Plugin ..." + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\MPUtils.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssComms.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\IrssUtils.dll" + Delete /REBOOTOK "$DIR_TVSERVER\Plugins\TV3BlasterPlugin.dll" +!macroend + +;====================================== + +${MementoSection} "Translator" SectionTranslator + + DetailPrint "Installing Translator ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Translator + CreateDirectory "$DIR_INSTALL\Translator" + SetOutPath "$DIR_INSTALL\Translator" + SetOverwrite ifnewer + File "Applications\Translator\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Macro" + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" + + ; Copy in default settings files + SetOutPath "$APPDATA\${PRODUCT_NAME}\Translator\Default Settings" + SetOverwrite ifnewer + File "Applications\Translator\Default Settings\*.xml" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Translator.lnk" "$DIR_INSTALL\Translator\Translator.exe" "" "$DIR_INSTALL\Translator\Translator.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionTranslator} + DetailPrint "Attempting to remove Translator ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "Tray Launcher" SectionTrayLauncher +!else +${MementoUnselectedSection} "Tray Launcher" SectionTrayLauncher +!endif + + DetailPrint "Installing Tray Launcher ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Translator + CreateDirectory "$DIR_INSTALL\Tray Launcher" + SetOutPath "$DIR_INSTALL\Tray Launcher" + SetOverwrite ifnewer + File "Applications\Tray Launcher\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Tray Launcher" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Tray Launcher.lnk" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" "" "$DIR_INSTALL\Tray Launcher\TrayLauncher.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionTrayLauncher} + DetailPrint "Attempting to remove Tray Launcher ... !!!not implemented" +!macroend + +;====================================== + +${MementoSection} "Virtual Remote" SectionVirtualRemote + + DetailPrint "Installing Virtual Remote, Skin Editor, Smart Device versions, and Web Remote..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Virtual Remote and Web Remote + CreateDirectory "$DIR_INSTALL\Virtual Remote" + SetOutPath "$DIR_INSTALL\Virtual Remote" + SetOverwrite ifnewer + File "Applications\Virtual Remote\bin\${BuildType}\*.*" + File "Applications\Web Remote\bin\${BuildType}\WebRemote.*" + File "Applications\Virtual Remote Skin Editor\bin\${BuildType}\VirtualRemoteSkinEditor.*" + + ; Installing skins + CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" + SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" + SetOverwrite ifnewer + File "Applications\Virtual Remote\Skins\*.*" + + ; Installing Virtual Remote for Smart Devices + CreateDirectory "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOutPath "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOverwrite ifnewer + File "Applications\Virtual Remote (PocketPC2003) Installer\${BuildType}\*.cab" + File "Applications\Virtual Remote (Smartphone2003) Installer\${BuildType}\*.cab" + File "Applications\Virtual Remote (WinCE5) Installer\${BuildType}\*.cab" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote Skin Editor.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemoteSkinEditor.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote for Smart Devices.lnk" "$DIR_INSTALL\Virtual Remote\Smart Devices" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionVirtualRemote} + DetailPrint "Attempting to remove Virtual Remote ... !!!not implemented" +!macroend + +;====================================== + +${MementoSection} "IR Blast" SectionIRBlast + + DetailPrint "Installing IR Blast ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\IR Blast" + SetOutPath "$DIR_INSTALL\IR Blast" + SetOverwrite ifnewer + File "Applications\IR Blast (No Window)\bin\${BuildType}\*.*" + File "Applications\IR Blast\bin\${BuildType}\IRBlast.exe" + +${MementoSectionEnd} +!macro Remove_${SectionIRBlast} + DetailPrint "Attempting to remove IR Blast ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "IR File Tool" SectionIRFileTool +!else +${MementoUnselectedSection} "IR File Tool" SectionIRFileTool +!endif + + DetailPrint "Installing IR File Tool ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\IR File Tool" + SetOutPath "$DIR_INSTALL\IR File Tool" + SetOverwrite ifnewer + File "Applications\IR File Tool\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\IR File Tool" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\IR File Tool.lnk" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" "" "$DIR_INSTALL\IR File Tool\IRFileTool.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionIRFileTool} + DetailPrint "Attempting to remove IR File Tool ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "Keyboard Relay" SectionKeyboardInputRelay +!else +${MementoUnselectedSection} "Keyboard Relay" SectionKeyboardInputRelay +!endif + + DetailPrint "Installing Keyboard Input Relay ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\Keyboard Input Relay" + SetOutPath "$DIR_INSTALL\Keyboard Input Relay" + SetOverwrite ifnewer + File "Applications\Keyboard Input Relay\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Keyboard Input Relay" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Keyboard Input Relay.lnk" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" "" "$DIR_INSTALL\Keyboard Input Relay\KeyboardInputRelay.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionKeyboardInputRelay} + DetailPrint "Attempting to remove Keyboard Relay ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "Dbox Tuner" SectionDboxTuner +!else +${MementoUnselectedSection} "Dbox Tuner" SectionDboxTuner +!endif + + DetailPrint "Installing Dbox Tuner ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\Dbox Tuner" + SetOutPath "$DIR_INSTALL\Dbox Tuner" + SetOverwrite ifnewer + File "Applications\Dbox Tuner\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Dbox Tuner" + +${MementoSectionEnd} +!macro Remove_${SectionDboxTuner} + DetailPrint "Attempting to remove Dbox Tuner ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "HCW PVR Tuner" SectionHcwPvrTuner +!else +${MementoUnselectedSection} "HCW PVR Tuner" SectionHcwPvrTuner +!endif + + DetailPrint "Installing HCW PVR Tuner ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing IR Server + CreateDirectory "$DIR_INSTALL\HCW PVR Tuner" + SetOutPath "$DIR_INSTALL\HCW PVR Tuner" + SetOverwrite ifnewer + File "Applications\HCW PVR Tuner\bin\${BuildType}\*.*" + +${MementoSectionEnd} +!macro Remove_${SectionHcwPvrTuner} + DetailPrint "Attempting to remove HCW PVR Tuner ... !!!not implemented" +!macroend + +;====================================== + +!ifdef DEBUG +${MementoSection} "Debug Client" SectionDebugClient +!else +${MementoUnselectedSection} "Debug Client" SectionDebugClient +!endif + + DetailPrint "Installing Debug Client ..." + + ; Use the all users context + SetShellVarContext all + + ; Installing Debug Client + CreateDirectory "$DIR_INSTALL\Debug Client" + SetOutPath "$DIR_INSTALL\Debug Client" + SetOverwrite ifnewer + File "Applications\Debug Client\bin\${BuildType}\*.*" + + ; Create folders + CreateDirectory "$APPDATA\${PRODUCT_NAME}\Debug Client" + + ; Create start menu shortcut + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Debug Client.lnk" "$DIR_INSTALL\Debug Client\DebugClient.exe" "" "$DIR_INSTALL\Debug Client\DebugClient.exe" 0 + +${MementoSectionEnd} +!macro Remove_${SectionDebugClient} + DetailPrint "Attempting to remove Debug Client ... !!!not implemented" +!macroend + +;====================================== + +${MementoSectionDone} + +;====================================== + +Section "-Complete" + + DetailPrint "Completing install ..." + + ;Removes unselected components + !insertmacro SectionList "FinishSection" + ;writes component status to registry + ${MementoSectionSave} + + ; Use the all users context + SetShellVarContext all + + ; Create website link file + WriteIniStr "$DIR_INSTALL\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + + ; Write the uninstaller + WriteUninstaller "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + + ; Create start menu shortcuts + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Documentation.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.chm" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$DIR_INSTALL\${PRODUCT_NAME}.url" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Log Files.lnk" "$APPDATA\${PRODUCT_NAME}\Logs" + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" "" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + + ; Write the uninstall keys for Windows + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$DIR_INSTALL\Uninstall ${PRODUCT_NAME}.exe" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "Publisher" "${PRODUCT_PUBLISHER}" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "NoRepair" 1 + + ; Store the install log + StrCpy $0 "$APPDATA\${PRODUCT_NAME}\Logs\Install.log" + Push $0 + Call DumpLog + + ; Finish +!ifdef DEBUG + SetAutoClose false +!else + SetAutoClose true +!endif + +SectionEnd + +;====================================== +;====================================== + +; Section descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SectionInputService} "$(DESC_SectionInputService)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPControlPlugin} "$(DESC_SectionMPControlPlugin)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionMPBlastZonePlugin} "$(DESC_SectionMPBlastZonePlugin)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV2BlasterPlugin} "$(DESC_SectionTV2BlasterPlugin)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV3BlasterPlugin} "$(DESC_SectionTV3BlasterPlugin)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTranslator} "$(DESC_SectionTranslator)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionTrayLauncher} "$(DESC_SectionTrayLauncher)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "$(DESC_SectionVirtualRemote)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "$(DESC_SectionIRBlast)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRFileTool} "$(DESC_SectionIRFileTool)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionKeyboardInputRelay} "$(DESC_SectionKeyboardInputRelay)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionDboxTuner} "$(DESC_SectionDboxTuner)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionHcwPvrTuner} "$(DESC_SectionHcwPvrTuner)" + !insertmacro MUI_DESCRIPTION_TEXT ${SectionDebugClient} "$(DESC_SectionDebugClient)" +!insertmacro MUI_FUNCTION_DESCRIPTION_END + +;====================================== +;====================================== + +!ifndef DEBUG +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd +!endif + + +;====================================== + +Function un.onInit + + !insertmacro initRegKeys + + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + Abort +FunctionEnd + +;====================================== +;====================================== + +Section "Uninstall" + + ;First removes all optional components + !insertmacro SectionList "RemoveSection" + + ; Use the all users context + SetShellVarContext all + + ; Kill running Programs + DetailPrint "Terminating processes ..." + ExecWait '"taskkill" /F /IM Translator.exe' + ExecWait '"taskkill" /F /IM TrayLauncher.exe' + ExecWait '"taskkill" /F /IM WebRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemote.exe' + ExecWait '"taskkill" /F /IM VirtualRemoteSkinEditor.exe' + ExecWait '"taskkill" /F /IM IRFileTool.exe' + ExecWait '"taskkill" /F /IM DebugClient.exe' + ExecWait '"taskkill" /F /IM KeyboardInputRelay.exe' + Sleep 100 + + ; Uninstall current Input Service ... + IfFileExists "$DIR_INSTALL\Input Service\Input Service.exe" UninstallInputService SkipUninstallInputService + +UninstallInputService: + ExecWait '"$DIR_INSTALL\Input Service\Input Service.exe" /uninstall' + +SkipUninstallInputService: + Sleep 100 + + ; Remove files and uninstaller + DetailPrint "Removing Set Top Box presets ..." + RMDir /R "$APPDATA\${PRODUCT_NAME}\Set Top Boxes" + + DetailPrint "Removing program files ..." + RMDir /R /REBOOTOK "$DIR_INSTALL" + + DetailPrint "Removing start menu shortcuts ..." + RMDir /R "$SMPROGRAMS\${PRODUCT_NAME}" + + ; Remove registry keys + DetailPrint "Removing registry keys ..." + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" + DeleteRegKey HKLM "Software\${PRODUCT_NAME}" + + ; Remove auto-runs + DetailPrint "Removing application auto-runs ..." + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Tray Launcher" + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Translator" + DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Keyboard Input Relay" + +!ifdef DEBUG + SetAutoClose false +!else + SetAutoClose true +!endif + +SectionEnd + +;====================================== +;====================================== \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-22 01:53:19
|
Revision: 1496 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1496&view=rev Author: and-81 Date: 2008-03-21 18:53:17 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Program.cs trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Properties/ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.resx Property Changed: ---------------- trunk/plugins/IR Server Suite/Common/IrssScheduler/ Added: trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,47 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{58BFF250-541B-4AA4-A62D-ACB819AD317B}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LogTimeCodeExtractor</RootNamespace> + <AssemblyName>LogTimeCodeExtractor</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Program.cs 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace LogTimeCodeExtractor +{ + + class Program + { + + static void Main(string[] args) + { + if (args.Length != 1) + { + Console.WriteLine("Usage: LogTimeCodeExtractor <filename>"); + return; + } + + StreamReader reader = new StreamReader(args[0]); + + string line; + + List<int> times = new List<int>(); + while (!String.IsNullOrEmpty(line = reader.ReadLine())) + { + if (line.StartsWith("+") || line.StartsWith("-")) + { + string[] timesStrings = line.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); + + foreach (string time in timesStrings) + { + int intTime = int.Parse(time); + times.Add(intTime); + } + } + } + + foreach (int time in times) + { + Console.Write(time); + Console.Write(", "); + } + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/Properties/AssemblyInfo.cs 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LogTimeCodeExtractor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LogTimeCodeExtractor")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a20b9b41-55a2-454d-a461-9b4a77abdcf3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Property changes on: trunk/plugins/IR Server Suite/Common/IrssScheduler ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.Designer.cs 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,272 @@ +namespace IrssUtils.Forms +{ + + partial class WindowCommand + { + + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.buttonFindMsgTarget = new System.Windows.Forms.Button(); + this.textBoxMsgTarget = new System.Windows.Forms.TextBox(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.groupBoxTarget = new System.Windows.Forms.GroupBox(); + this.radioButtonWindowTitle = new System.Windows.Forms.RadioButton(); + this.radioButtonClass = new System.Windows.Forms.RadioButton(); + this.radioButtonApplication = new System.Windows.Forms.RadioButton(); + this.radioButtonActiveWindow = new System.Windows.Forms.RadioButton(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.groupBoxAction = new System.Windows.Forms.GroupBox(); + this.radioButtonRestore = new System.Windows.Forms.RadioButton(); + this.radioButtonMinimize = new System.Windows.Forms.RadioButton(); + this.radioButtonMaximize = new System.Windows.Forms.RadioButton(); + this.radioButtonHide = new System.Windows.Forms.RadioButton(); + this.radioButtonUnhide = new System.Windows.Forms.RadioButton(); + this.groupBoxTarget.SuspendLayout(); + this.groupBoxAction.SuspendLayout(); + this.SuspendLayout(); + // + // buttonFindMsgTarget + // + this.buttonFindMsgTarget.Location = new System.Drawing.Point(240, 80); + this.buttonFindMsgTarget.Name = "buttonFindMsgTarget"; + this.buttonFindMsgTarget.Size = new System.Drawing.Size(24, 20); + this.buttonFindMsgTarget.TabIndex = 5; + this.buttonFindMsgTarget.Text = "..."; + this.toolTip.SetToolTip(this.buttonFindMsgTarget, "Locate a target"); + this.buttonFindMsgTarget.UseVisualStyleBackColor = true; + this.buttonFindMsgTarget.Click += new System.EventHandler(this.buttonFindMsgApp_Click); + // + // textBoxMsgTarget + // + this.textBoxMsgTarget.Location = new System.Drawing.Point(8, 80); + this.textBoxMsgTarget.Name = "textBoxMsgTarget"; + this.textBoxMsgTarget.Size = new System.Drawing.Size(224, 20); + this.textBoxMsgTarget.TabIndex = 4; + this.toolTip.SetToolTip(this.textBoxMsgTarget, "Target"); + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(216, 256); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(64, 24); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // 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(144, 256); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(64, 24); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // groupBoxTarget + // + this.groupBoxTarget.Controls.Add(this.radioButtonWindowTitle); + this.groupBoxTarget.Controls.Add(this.radioButtonClass); + this.groupBoxTarget.Controls.Add(this.radioButtonApplication); + this.groupBoxTarget.Controls.Add(this.radioButtonActiveWindow); + this.groupBoxTarget.Controls.Add(this.textBoxMsgTarget); + this.groupBoxTarget.Controls.Add(this.buttonFindMsgTarget); + this.groupBoxTarget.Location = new System.Drawing.Point(8, 128); + this.groupBoxTarget.Name = "groupBoxTarget"; + this.groupBoxTarget.Size = new System.Drawing.Size(272, 112); + this.groupBoxTarget.TabIndex = 1; + this.groupBoxTarget.TabStop = false; + this.groupBoxTarget.Text = "Target"; + // + // radioButtonWindowTitle + // + this.radioButtonWindowTitle.Location = new System.Drawing.Point(152, 48); + this.radioButtonWindowTitle.Name = "radioButtonWindowTitle"; + this.radioButtonWindowTitle.Size = new System.Drawing.Size(112, 16); + this.radioButtonWindowTitle.TabIndex = 3; + this.radioButtonWindowTitle.TabStop = true; + this.radioButtonWindowTitle.Text = "Window title"; + this.toolTip.SetToolTip(this.radioButtonWindowTitle, "Target the specified window title"); + this.radioButtonWindowTitle.UseVisualStyleBackColor = true; + this.radioButtonWindowTitle.CheckedChanged += new System.EventHandler(this.radioButtonWindowTitle_CheckedChanged); + // + // radioButtonClass + // + this.radioButtonClass.Location = new System.Drawing.Point(8, 48); + this.radioButtonClass.Name = "radioButtonClass"; + this.radioButtonClass.Size = new System.Drawing.Size(112, 16); + this.radioButtonClass.TabIndex = 2; + this.radioButtonClass.TabStop = true; + this.radioButtonClass.Text = "Class"; + this.toolTip.SetToolTip(this.radioButtonClass, "Target a specific class"); + this.radioButtonClass.UseVisualStyleBackColor = true; + this.radioButtonClass.CheckedChanged += new System.EventHandler(this.radioButtonClass_CheckedChanged); + // + // radioButtonApplication + // + this.radioButtonApplication.Location = new System.Drawing.Point(152, 24); + this.radioButtonApplication.Name = "radioButtonApplication"; + this.radioButtonApplication.Size = new System.Drawing.Size(112, 16); + this.radioButtonApplication.TabIndex = 1; + this.radioButtonApplication.TabStop = true; + this.radioButtonApplication.Text = "Application"; + this.toolTip.SetToolTip(this.radioButtonApplication, "Target a specific application"); + this.radioButtonApplication.UseVisualStyleBackColor = true; + this.radioButtonApplication.CheckedChanged += new System.EventHandler(this.radioButtonApplication_CheckedChanged); + // + // radioButtonActiveWindow + // + this.radioButtonActiveWindow.Location = new System.Drawing.Point(8, 24); + this.radioButtonActiveWindow.Name = "radioButtonActiveWindow"; + this.radioButtonActiveWindow.Size = new System.Drawing.Size(112, 16); + this.radioButtonActiveWindow.TabIndex = 0; + this.radioButtonActiveWindow.Text = "Active window"; + this.toolTip.SetToolTip(this.radioButtonActiveWindow, "Target the active window"); + this.radioButtonActiveWindow.UseVisualStyleBackColor = true; + this.radioButtonActiveWindow.CheckedChanged += new System.EventHandler(this.radioButtonActiveWindow_CheckedChanged); + // + // groupBoxAction + // + this.groupBoxAction.Controls.Add(this.radioButtonUnhide); + this.groupBoxAction.Controls.Add(this.radioButtonHide); + this.groupBoxAction.Controls.Add(this.radioButtonMaximize); + this.groupBoxAction.Controls.Add(this.radioButtonMinimize); + this.groupBoxAction.Controls.Add(this.radioButtonRestore); + this.groupBoxAction.Location = new System.Drawing.Point(8, 8); + this.groupBoxAction.Name = "groupBoxAction"; + this.groupBoxAction.Size = new System.Drawing.Size(272, 104); + this.groupBoxAction.TabIndex = 0; + this.groupBoxAction.TabStop = false; + this.groupBoxAction.Text = "Action"; + // + // radioButtonRestore + // + this.radioButtonRestore.Location = new System.Drawing.Point(8, 24); + this.radioButtonRestore.Name = "radioButtonRestore"; + this.radioButtonRestore.Size = new System.Drawing.Size(112, 16); + this.radioButtonRestore.TabIndex = 0; + this.radioButtonRestore.TabStop = true; + this.radioButtonRestore.Text = "Restore"; + this.toolTip.SetToolTip(this.radioButtonRestore, "Restore a window to the foreground"); + this.radioButtonRestore.UseVisualStyleBackColor = true; + // + // radioButtonMinimize + // + this.radioButtonMinimize.Location = new System.Drawing.Point(8, 48); + this.radioButtonMinimize.Name = "radioButtonMinimize"; + this.radioButtonMinimize.Size = new System.Drawing.Size(112, 16); + this.radioButtonMinimize.TabIndex = 1; + this.radioButtonMinimize.TabStop = true; + this.radioButtonMinimize.Text = "Minimize"; + this.toolTip.SetToolTip(this.radioButtonMinimize, "Minimize a window"); + this.radioButtonMinimize.UseVisualStyleBackColor = true; + // + // radioButtonMaximize + // + this.radioButtonMaximize.Location = new System.Drawing.Point(152, 48); + this.radioButtonMaximize.Name = "radioButtonMaximize"; + this.radioButtonMaximize.Size = new System.Drawing.Size(112, 16); + this.radioButtonMaximize.TabIndex = 2; + this.radioButtonMaximize.TabStop = true; + this.radioButtonMaximize.Text = "Maximize"; + this.toolTip.SetToolTip(this.radioButtonMaximize, "Maximize a window"); + this.radioButtonMaximize.UseVisualStyleBackColor = true; + // + // radioButtonHide + // + this.radioButtonHide.Location = new System.Drawing.Point(8, 72); + this.radioButtonHide.Name = "radioButtonHide"; + this.radioButtonHide.Size = new System.Drawing.Size(112, 16); + this.radioButtonHide.TabIndex = 3; + this.radioButtonHide.TabStop = true; + this.radioButtonHide.Text = "Hide"; + this.toolTip.SetToolTip(this.radioButtonHide, "Maximize a window"); + this.radioButtonHide.UseVisualStyleBackColor = true; + // + // radioButtonUnhide + // + this.radioButtonUnhide.Location = new System.Drawing.Point(152, 72); + this.radioButtonUnhide.Name = "radioButtonUnhide"; + this.radioButtonUnhide.Size = new System.Drawing.Size(112, 16); + this.radioButtonUnhide.TabIndex = 4; + this.radioButtonUnhide.TabStop = true; + this.radioButtonUnhide.Text = "Unhide"; + this.toolTip.SetToolTip(this.radioButtonUnhide, "Maximize a window"); + this.radioButtonUnhide.UseVisualStyleBackColor = true; + // + // WindowCommand + // + 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(288, 288); + this.Controls.Add(this.groupBoxAction); + this.Controls.Add(this.groupBoxTarget); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(296, 322); + this.Name = "WindowCommand"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Window State Command"; + this.groupBoxTarget.ResumeLayout(false); + this.groupBoxTarget.PerformLayout(); + this.groupBoxAction.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonFindMsgTarget; + private System.Windows.Forms.TextBox textBoxMsgTarget; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.GroupBox groupBoxTarget; + private System.Windows.Forms.ToolTip toolTip; + private System.Windows.Forms.RadioButton radioButtonActiveWindow; + private System.Windows.Forms.RadioButton radioButtonWindowTitle; + private System.Windows.Forms.RadioButton radioButtonClass; + private System.Windows.Forms.RadioButton radioButtonApplication; + private System.Windows.Forms.GroupBox groupBoxAction; + private System.Windows.Forms.RadioButton radioButtonUnhide; + private System.Windows.Forms.RadioButton radioButtonHide; + private System.Windows.Forms.RadioButton radioButtonMaximize; + private System.Windows.Forms.RadioButton radioButtonMinimize; + private System.Windows.Forms.RadioButton radioButtonRestore; + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.cs (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.cs 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,169 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; + +namespace IrssUtils.Forms +{ + + /// <summary> + /// Window Command form. + /// </summary> + public partial class WindowCommand : Form + { + + #region Properties + + /// <summary> + /// Gets the command string. + /// </summary> + /// <value>The command string.</value> + public string CommandString + { + get + { + string action = "ERROR"; + string target = "ERROR"; + + if (radioButtonRestore.Checked) + action = "RESTORE"; + + if (radioButtonActiveWindow.Checked) + { + target = Common.TargetActive; + textBoxMsgTarget.Text = "*"; + } + else if (radioButtonApplication.Checked) + { + target = Common.TargetApplication; + } + else if (radioButtonClass.Checked) + { + target = Common.TargetClass; + } + else if (radioButtonWindowTitle.Checked) + { + target = Common.TargetWindow; + } + + return String.Format("{0}|{1}|{2}", + action, + target, + textBoxMsgTarget.Text); + } + } + + #endregion Properties + + #region Constructors + + /// <summary> + /// Initializes a new instance of the <see cref="WindowCommand"/> class. + /// </summary> + public WindowCommand() + { + InitializeComponent(); + + radioButtonRestore.Checked = true; + radioButtonActiveWindow.Checked = true; + } + /// <summary> + /// Initializes a new instance of the <see cref="WindowCommand"/> class. + /// </summary> + /// <param name="commands">The command elements.</param> + public WindowCommand(string[] commands) : this() + { + if (commands != null) + { + string action = commands[0].ToUpperInvariant(); + switch (action) + { + case "RESTORE": radioButtonRestore.Checked = true; break; + } + + string target = commands[1].ToUpperInvariant(); + switch (target) + { + case Common.TargetActive: radioButtonActiveWindow.Checked = true; break; + case Common.TargetApplication: radioButtonApplication.Checked = true; break; + case Common.TargetClass: radioButtonClass.Checked = true; break; + case Common.TargetWindow: radioButtonWindowTitle.Checked = true; break; + default: + throw new ArgumentOutOfRangeException("commands", commands[0], "Invalid window target"); + } + + textBoxMsgTarget.Text = commands[2]; + } + } + + #endregion Constructors + + #region Controls + + private void buttonFindMsgApp_Click(object sender, EventArgs e) + { + if (radioButtonApplication.Checked) + { + OpenFileDialog find = new OpenFileDialog(); + find.Filter = "All files|*.*"; + find.Multiselect = false; + find.Title = "Application to target"; + + if (find.ShowDialog(this) == DialogResult.OK) + textBoxMsgTarget.Text = find.FileName; + } + else if (radioButtonClass.Checked) + { + WindowList windowList = new WindowList(true); + if (windowList.ShowDialog(this) == DialogResult.OK) + textBoxMsgTarget.Text = windowList.SelectedItem; + } + else if (radioButtonWindowTitle.Checked) + { + WindowList windowList = new WindowList(false); + if (windowList.ShowDialog(this) == DialogResult.OK) + textBoxMsgTarget.Text = windowList.SelectedItem; + } + } + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void radioButtonActiveWindow_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = false; + textBoxMsgTarget.Enabled = false; + } + private void radioButtonApplication_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = true; + textBoxMsgTarget.Enabled = true; + } + private void radioButtonClass_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = true; + textBoxMsgTarget.Enabled = true; + } + private void radioButtonWindowTitle_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = true; + textBoxMsgTarget.Enabled = true; + } + + #endregion Controls + + } + +} Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.resx =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.resx (rev 0) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowCommand.resx 2008-03-22 01:53:17 UTC (rev 1496) @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>174, 17</value> + </metadata> + <metadata name="toolTip.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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2008-03-22 05:35:11
|
Revision: 1499 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1499&view=rev Author: and-81 Date: 2008-03-21 22:35:09 -0700 (Fri, 21 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Dbox Tuner.csproj trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj trunk/plugins/IR Server Suite/Applications/IR File Tool/IR File Tool.csproj trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj trunk/plugins/IR Server Suite/Commands/Command/Command.csproj trunk/plugins/IR Server Suite/Commands/CommandProcessor/CommandProcessor.csproj trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/MediaPortalCommands.csproj trunk/plugins/IR Server Suite/Commands/TestApp/TestApp.csproj trunk/plugins/IR Server Suite/Commands/VariableList/VariableList.csproj trunk/plugins/IR Server Suite/Common/IrssComms/IrssComms.csproj trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj trunk/plugins/IR Server Suite/Common/ShellLink/ShellLink.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Ads Tech PTV-335 Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/CoolCommand Receiver/CoolCommand Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.csproj trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/HCW Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IR501 Receiver/IR501 Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507 Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Ira Transceiver/Ira Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.csproj trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDrive Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/MacMini Receiver/MacMini Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/RC102 Receiver/RC102 Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/RedEye Blaster.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Serial IR Blaster.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Speech Receiver/Speech Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Tira Transceiver/Tira Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/Wiimote.cs trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/WiimoteLib.csproj trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10 Transceiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.csproj trunk/plugins/IR Server Suite/Input Service/Input Service/Input Service.csproj trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.Designer.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Dbox Tuner.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Dbox Tuner.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Dbox Tuner.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <UseVSHostingProcess>false</UseVSHostingProcess> Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -38,7 +38,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/HCW PVR Tuner.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -40,7 +40,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -40,7 +40,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/IR File Tool.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR File Tool/IR File Tool.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/IR File Tool/IR File Tool.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -40,7 +40,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -34,7 +34,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -59,7 +59,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-22 05:35:09 UTC (rev 1499) @@ -31,9 +31,6 @@ } catch (Exception ex) { -#if TRACE - Trace.WriteLine(ex.ToString()); -#endif MessageBox.Show(ex.ToString(), "Error detecting duplicate processes", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } Modified: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/LogTimeCodeExtractor/LogTimeCodeExtractor.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -15,7 +15,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> Modified: trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/Sage Setup.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -15,7 +15,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> @@ -32,7 +32,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> <ErrorReport>prompt</ErrorReport> Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -28,7 +28,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -50,7 +50,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -40,7 +40,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -28,7 +28,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -49,7 +49,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -39,7 +39,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> Modified: trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs 2008-03-22 05:35:09 UTC (rev 1499) @@ -1,9 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; -#if TRACE using System.Diagnostics; -#endif using System.Drawing; using System.IO; using System.Net; Modified: trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Commands/Command/Command.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/Command/Command.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/Command/Command.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/CommandProcessor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/CommandProcessor.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/CommandProcessor.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <UseVSHostingProcess>false</UseVSHostingProcess> Modified: trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/MediaPortalCommands.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/MediaPortalCommands.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/MediaPortalCommands.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Commands/TestApp/TestApp.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/TestApp/TestApp.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/TestApp/TestApp.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -15,7 +15,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <UseVSHostingProcess>false</UseVSHostingProcess> Modified: trunk/plugins/IR Server Suite/Commands/VariableList/VariableList.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/VariableList/VariableList.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Commands/VariableList/VariableList.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/Common/IrssComms/IrssComms.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssComms/IrssComms.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Common/IrssComms/IrssComms.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <PlatformTarget>AnyCPU</PlatformTarget> @@ -39,7 +39,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <UseVSHostingProcess>false</UseVSHostingProcess> Modified: trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Common/IrssScheduler/IrssScheduler.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -15,7 +15,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -40,7 +40,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> Modified: trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -39,7 +39,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> <ErrorReport>prompt</ErrorReport> Modified: trunk/plugins/IR Server Suite/Common/ShellLink/ShellLink.csproj =================================================================== --- trunk/plugins/IR Server Suite/Common/ShellLink/ShellLink.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/Common/ShellLink/ShellLink.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -33,7 +33,7 @@ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <ConfigurationOverrideFile> </ConfigurationOverrideFile> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DocumentationFile> </DocumentationFile> <DebugSymbols>true</DebugSymbols> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Ads Tech PTV-335 Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Ads Tech PTV-335 Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Ads Tech PTV-335 Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/CoolCommand Receiver/CoolCommand Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/CoolCommand Receiver/CoolCommand Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/CoolCommand Receiver/CoolCommand Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Direct Input Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <PlatformTarget>AnyCPU</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -38,7 +38,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -41,7 +41,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/HCW Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/HCW Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/HCW Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR501 Receiver/IR501 Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR501 Receiver/IR501 Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR501 Receiver/IR501 Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507 Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507 Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507 Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -37,7 +37,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -38,7 +38,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -37,7 +37,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Ira Transceiver/Ira Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Ira Transceiver/Ira Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Ira Transceiver/Ira Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -18,7 +18,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <UseVSHostingProcess>false</UseVSHostingProcess> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDrive Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDrive Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/LiveDrive Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MacMini Receiver/MacMini Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/MacMini Receiver/MacMini Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/MacMini Receiver/MacMini Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -40,7 +40,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/RC102 Receiver/RC102 Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/RC102 Receiver/RC102 Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/RC102 Receiver/RC102 Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/RedEye Blaster.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/RedEye Blaster.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/RedEye Blaster.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -37,7 +37,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Serial IR Blaster.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Serial IR Blaster.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Serial IR Blaster.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -37,7 +37,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Speech Receiver/Speech Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Speech Receiver/Speech Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Speech Receiver/Speech Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -15,7 +15,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -19,7 +19,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -41,7 +41,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Tira Transceiver/Tira Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Tira Transceiver/Tira Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Tira Transceiver/Tira Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -16,7 +16,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\Tira Transceiver.XML</DocumentationFile> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> @@ -37,7 +37,7 @@ </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <OutputPath>bin\x86\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> <DebugType>full</DebugType> <PlatformTarget>x86</PlatformTarget> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>TRACE;DEBUG</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/Wiimote.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/Wiimote.cs 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/Wiimote.cs 2008-03-22 05:35:09 UTC (rev 1499) @@ -169,7 +169,9 @@ // actually get the detail struct if(HIDImports.SetupDiGetDeviceInterfaceDetail(hDevInfo, ref diData, ref diDetail, size, out size, IntPtr.Zero)) { - Debug.WriteLine(index + " " + diDetail.DevicePath + " " + Marshal.GetLastWin32Error()); +#if TRACE + Trace.WriteLine(index + " " + diDetail.DevicePath + " " + Marshal.GetLastWin32Error()); +#endif // open a read/write handle to our device using the DevicePath returned mHandle = HIDImports.CreateFile(diDetail.DevicePath, FileAccess.ReadWrite, FileShare.ReadWrite, IntPtr.Zero, FileMode.Open, HIDImports.EFileAttributes.Overlapped, IntPtr.Zero); @@ -184,7 +186,9 @@ // if the vendor and product IDs match up if(attrib.VendorID == VID && attrib.ProductID == PID) { - Debug.WriteLine("Found it!"); +#if TRACE + Trace.WriteLine("Found it!"); +#endif found = true; // create a nice .NET FileStream wrapping the handle above @@ -289,7 +293,9 @@ } catch(OperationCanceledException) { - Debug.WriteLine("OperationCanceledException"); +#if TRACE + Trace.WriteLine("OperationCanceledException"); +#endif } } @@ -343,7 +349,9 @@ // extension connected? bool extension = (buff[3] & 0x02) != 0; - Debug.WriteLine("Extension: " + extension); +#if TRACE + Trace.WriteLine("Extension: " + extension); +#endif if(mWiimoteState.Extension != extension) { @@ -369,7 +377,9 @@ ParseReadData(buff); break; default: - Debug.WriteLine("Unknown report type: " + type.ToString("x")); +#if TRACE + Trace.WriteLine("Unknown report type: " + type.ToString("x")); +#endif return false; } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/WiimoteLib.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/WiimoteLib.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/WiimoteLib.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -26,7 +26,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>bin\Debug\WiimoteLib.XML</DocumentationFile> @@ -46,7 +46,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'MSRS Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\MSRS Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> + <DefineConstants>DEBUG</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> <CodeAnalysisRuleAssemblies>C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules</CodeAnalysisRuleAssemblies> Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.csproj =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.csproj 2008-03-22 04:16:04 UTC (rev 1498) +++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.csproj 2008-03-22 05:35:09 UTC (rev 1499) @@ -17,7 +17,7 @@ <DebugType>full</DebugType> <Optimize>false</Optimize> <... [truncated message content] |
From: <che...@us...> - 2008-03-23 16:10:09
|
Revision: 1502 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1502&view=rev Author: chef_koch Date: 2008-03-23 09:10:01 -0700 (Sun, 23 Mar 2008) Log Message: ----------- fixed so that build is able to succeed now -> changed code for directory pages to be compatible with MUI2 Modified Paths: -------------- trunk/plugins/IR Server Suite/setup-languages.nsh trunk/plugins/IR Server Suite/setup.nsi Modified: trunk/plugins/IR Server Suite/setup-languages.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-languages.nsh 2008-03-23 14:53:31 UTC (rev 1501) +++ trunk/plugins/IR Server Suite/setup-languages.nsh 2008-03-23 16:10:01 UTC (rev 1502) @@ -46,12 +46,12 @@ LangString DESC_SectionDebugClient ${LANG_ENGLISH} "Very simple testing tool for troubleshooting input and communications problems." -LangString ^UninstallLink ${LANG_ENGLISH ${LANG_ENGLISH} "Uninstall $(^Name)" +LangString ^UninstallLink ${LANG_ENGLISH} "Uninstall $(^Name)" -LangString TEXT_MSGBOX_REMOVE_ALL ${LANG_ENGLISH ${LANG_ENGLISH} "Do you want to remove your User settings?$\r$\nAttention: This will remove all your customised settings including Skins and Databases." +LangString TEXT_MSGBOX_REMOVE_ALL ${LANG_ENGLISH} "Do you want to remove your User settings?$\r$\nAttention: This will remove all your customised settings including Skins and Databases." -LangString TEXT_MSGBOX_ERROR_DOTNET ${LANG_ENGLISH ${LANG_ENGLISH} "Microsoft .Net Framework Runtime is a prerequisite. Please install first." -LangString TEXT_MSGBOX_ERROR_WIN ${LANG_ENGLISH ${LANG_ENGLISH} "MediaPortal requires at least Windows XP. Your Windows is not supported. Installation aborted" -LangString TEXT_MSGBOX_ERROR_IS_INSTALLED ${LANG_ENGLISH ${LANG_ENGLISH} "MediaPortal is already installed. You need to uninstall it, before you continue with the installation.$\r$\nUninstall will be lunched when pressing OK." -LangString TEXT_MSGBOX_ERROR_ON_UNINSTALL ${LANG_ENGLISH ${LANG_ENGLISH} "An error occured while trying to uninstall old version!$\r$\nDo you still want to continue the installation?" -LangString TEXT_MSGBOX_ERROR_REBOOT_REQUIRED ${LANG_ENGLISH ${LANG_ENGLISH} "REBOOT IS REQUIRED. DO THAT!!!!" +LangString TEXT_MSGBOX_ERROR_DOTNET ${LANG_ENGLISH} "Microsoft .Net Framework Runtime is a prerequisite. Please install first." +LangString TEXT_MSGBOX_ERROR_WIN ${LANG_ENGLISH} "MediaPortal requires at least Windows XP. Your Windows is not supported. Installation aborted" +LangString TEXT_MSGBOX_ERROR_IS_INSTALLED ${LANG_ENGLISH} "MediaPortal is already installed. You need to uninstall it, before you continue with the installation.$\r$\nUninstall will be lunched when pressing OK." +LangString TEXT_MSGBOX_ERROR_ON_UNINSTALL ${LANG_ENGLISH} "An error occured while trying to uninstall old version!$\r$\nDo you still want to continue the installation?" +LangString TEXT_MSGBOX_ERROR_REBOOT_REQUIRED ${LANG_ENGLISH} "REBOOT IS REQUIRED. DO THAT!!!!" Modified: trunk/plugins/IR Server Suite/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup.nsi 2008-03-23 14:53:31 UTC (rev 1501) +++ trunk/plugins/IR Server Suite/setup.nsi 2008-03-23 16:10:01 UTC (rev 1502) @@ -3,9 +3,9 @@ ; ; (C) Copyright Aaron Dinnage, 2008 ;====================================== -!define DEBUG +!define _DEBUG -!ifdef DEBUG +!ifdef _DEBUG !define BuildType "Debug" !else !define BuildType "Release" @@ -37,6 +37,8 @@ !define VERSION "debug build ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD}" !endif BrandingText "${PRODUCT_NAME} ${VERSION} by ${PRODUCT_PUBLISHER}" +BrandingText "${PRODUCT_NAME} by Aaron Dinnage" +SetCompressor /SOLID /FINAL lzma ;====================================== @@ -60,15 +62,13 @@ Name "${PRODUCT_NAME}" OutFile "${PRODUCT_NAME} - ${PRODUCT_VERSION}.exe" InstallDir "" -!ifdef DEBUG +!ifdef _DEBUG ShowInstDetails show ShowUninstDetails show !else ShowInstDetails hide ShowUninstDetails hide !endif -BrandingText "${PRODUCT_NAME} by Aaron Dinnage" -SetCompressor /SOLID /FINAL lzma CRCCheck On ; Variables @@ -86,20 +86,37 @@ !insertmacro MUI_PAGE_COMPONENTS ; Main app install path -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +!define MUI_PAGE_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" +!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install ${PRODUCT_NAME}." +!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." +!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "${PRODUCT_NAME} Folder" +!define MUI_DIRECTORYPAGE_VARIABLE "$DIR_INSTALL" +#!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowApp +#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp +#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveApp !insertmacro MUI_PAGE_DIRECTORY ; MediaPortal install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP +!define MUI_PAGE_HEADER_TEXT "Choose MediaPortal Location" +!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install MediaPortal plugins." +!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "MediaPortal Folder" +!define MUI_DIRECTORYPAGE_VARIABLE "$DIR_MEDIAPORTAL" +#!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreMP +#!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowMP +#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveMP !insertmacro MUI_PAGE_DIRECTORY ; TV Server install path -!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV -!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV -!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV + +!define MUI_PAGE_HEADER_TEXT "Choose TV Server Location" +!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which to install TV Server plugins." +!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." +!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "TV Server Folder" +!define MUI_DIRECTORYPAGE_VARIABLE "$DIR_TVSERVER" +#!define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPreTV +#!define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShowTV +#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeaveTV !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES @@ -271,27 +288,27 @@ Function DirectoryShowApp !insertmacro MUI_HEADER_TEXT "Choose ${PRODUCT_NAME} Location" "Choose the folder in which to install ${PRODUCT_NAME}." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." + #!insertmacro MUI_INNERDIALOG_TEXT 1041 "${PRODUCT_NAME} Folder" + #!insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_INSTALL" + #!insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${PRODUCT_NAME} in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Next to continue." FunctionEnd ;====================================== Function DirectoryShowMP !insertmacro MUI_HEADER_TEXT "Choose MediaPortal Location" "Choose the folder in which to install MediaPortal plugins." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." + #!insertmacro MUI_INNERDIALOG_TEXT 1041 "MediaPortal Folder" + #!insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_MEDIAPORTAL" + #!insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install MediaPortal plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." FunctionEnd ;====================================== Function DirectoryShowTV !insertmacro MUI_HEADER_TEXT "Choose TV Server Location" "Choose the folder in which to install TV Server plugins." - !insertmacro MUI_INNERDIALOG_TEXT 1041 "TV Server Folder" - !insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_TVSERVER" - !insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." + #!insertmacro MUI_INNERDIALOG_TEXT 1041 "TV Server Folder" + #!insertmacro MUI_INNERDIALOG_TEXT 1019 "$DIR_TVSERVER" + #!insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install TV Server plugins in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation." FunctionEnd ;====================================== @@ -407,7 +424,7 @@ WriteRegStr HKLM "Software\${PRODUCT_NAME}" "TVServer_Dir" "$DIR_TVSERVER" ; Write documentation -!ifdef DEBUG +!ifdef _DEBUG DetailPrint "Warning: Documentation is not included in debug builds" !else SetOutPath "$DIR_INSTALL" @@ -562,7 +579,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "MP Blast Zone Plugin" SectionMPBlastZonePlugin !else ${MementoUnselectedSection} "MP Blast Zone Plugin" SectionMPBlastZonePlugin @@ -610,7 +627,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "TV2 Blaster Plugin" SectionTV2BlasterPlugin !else ${MementoUnselectedSection} "TV2 Blaster Plugin" SectionTV2BlasterPlugin @@ -704,7 +721,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "Tray Launcher" SectionTrayLauncher !else ${MementoUnselectedSection} "Tray Launcher" SectionTrayLauncher @@ -800,7 +817,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "IR File Tool" SectionIRFileTool !else ${MementoUnselectedSection} "IR File Tool" SectionIRFileTool @@ -830,7 +847,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "Keyboard Relay" SectionKeyboardInputRelay !else ${MementoUnselectedSection} "Keyboard Relay" SectionKeyboardInputRelay @@ -860,7 +877,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "Dbox Tuner" SectionDboxTuner !else ${MementoUnselectedSection} "Dbox Tuner" SectionDboxTuner @@ -887,7 +904,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "HCW PVR Tuner" SectionHcwPvrTuner !else ${MementoUnselectedSection} "HCW PVR Tuner" SectionHcwPvrTuner @@ -911,7 +928,7 @@ ;====================================== -!ifdef DEBUG +!ifdef _DEBUG ${MementoSection} "Debug Client" SectionDebugClient !else ${MementoUnselectedSection} "Debug Client" SectionDebugClient @@ -985,7 +1002,7 @@ Call DumpLog ; Finish -!ifdef DEBUG +!ifdef _DEBUG SetAutoClose false !else SetAutoClose true @@ -1017,7 +1034,7 @@ ;====================================== ;====================================== -!ifndef DEBUG +!ifndef _DEBUG Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." @@ -1088,7 +1105,7 @@ DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Translator" DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Keyboard Input Relay" -!ifdef DEBUG +!ifdef _DEBUG SetAutoClose false !else SetAutoClose true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2008-03-25 09:14:37
|
Revision: 1517 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1517&view=rev Author: chef_koch Date: 2008-03-25 02:13:01 -0700 (Tue, 25 Mar 2008) Log Message: ----------- renamed header file with common macros Modified Paths: -------------- trunk/plugins/IR Server Suite/setup.nsi Added Paths: ----------- trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh Removed Paths: ------------- trunk/plugins/IR Server Suite/setup-RememberSections.nsh Copied: trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh (from rev 1508, trunk/plugins/IR Server Suite/setup-RememberSections.nsh) =================================================================== --- trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh (rev 0) +++ trunk/plugins/IR Server Suite/setup-CommonMPMacros.nsh 2008-03-25 09:13:01 UTC (rev 1517) @@ -0,0 +1,89 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +#**********************************************************************************************************# +# +# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality +# and modified for our needs. +# +#**********************************************************************************************************# + +#Var AR_SecFlags +#Var AR_RegFlags + +# registry +# ${MEMENTO_REGISTRY_ROOT} +# ${MEMENTO_REGISTRY_KEY} +# ${MEMENTO_REGISTRY_KEY} +#ReadRegDWORD $AR_RegFlags ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` + + /* not needed anymore ----- done by MementoSectionRestore +!macro InitSection SecName + ;This macro reads component installed flag from the registry and + ;changes checked state of the section on the components page. + ;Input: section index constant name specified in Section command. + + ClearErrors + ;Reading component status from registry + ReadRegDWORD $AR_RegFlags "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "${SecName}" + IfErrors "default_${SecName}" + + ;Status will stay default if registry value not found + ;(component was never installed) + IntOp $AR_RegFlags $AR_RegFlags & 0x0001 ;Turn off all other bits + SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags + IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off + IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit + + ;Writing modified flags + SectionSetFlags ${${SecName}} $AR_SecFlags + + "default_${SecName}:" +!macroend +*/ + +!macro FinishSection SecName + ;This macro reads section flag set by user and removes the section + ;if it is not selected. + ;Then it writes component installed flag to registry + ;Input: section index constant name specified in Section command. + + ${IfNot} ${SectionIsSelected} "${${SecName}}" + ClearErrors + ReadRegDWORD $R0 ${MEMENTO_REGISTRY_ROOT} '${MEMENTO_REGISTRY_KEY}' 'MementoSection_${SecName}' + + ${If} $R0 = 1 + !insertmacro "Remove_${${SecName}}" + ${EndIf} + ${EndIf} +!macroend + +!macro RemoveSection SecName + ;This macro is used to call section's Remove_... macro + ;from the uninstaller. + ;Input: section index constant name specified in Section command. + + !insertmacro "Remove_${${SecName}}" +!macroend \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/setup-RememberSections.nsh =================================================================== --- trunk/plugins/IR Server Suite/setup-RememberSections.nsh 2008-03-25 08:07:17 UTC (rev 1516) +++ trunk/plugins/IR Server Suite/setup-RememberSections.nsh 2008-03-25 09:13:01 UTC (rev 1517) @@ -1,89 +0,0 @@ -#region Copyright (C) 2005-2008 Team MediaPortal - -/* - * Copyright (C) 2005-2008 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#endregion - -#**********************************************************************************************************# -# -# This original header file is taken from: http://nsis.sourceforge.net/Add/Remove_Functionality -# and modified for our needs. -# -#**********************************************************************************************************# - -#Var AR_SecFlags -#Var AR_RegFlags - -# registry -# ${MEMENTO_REGISTRY_ROOT} -# ${MEMENTO_REGISTRY_KEY} -# ${MEMENTO_REGISTRY_KEY} -#ReadRegDWORD $AR_RegFlags ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` `MementoSection_${__MementoSectionLastSectionId}` - - /* not needed anymore ----- done by MementoSectionRestore -!macro InitSection SecName - ;This macro reads component installed flag from the registry and - ;changes checked state of the section on the components page. - ;Input: section index constant name specified in Section command. - - ClearErrors - ;Reading component status from registry - ReadRegDWORD $AR_RegFlags "${MEMENTO_REGISTRY_ROOT}" "${MEMENTO_REGISTRY_KEY}" "${SecName}" - IfErrors "default_${SecName}" - - ;Status will stay default if registry value not found - ;(component was never installed) - IntOp $AR_RegFlags $AR_RegFlags & 0x0001 ;Turn off all other bits - SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags - IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off - IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit - - ;Writing modified flags - SectionSetFlags ${${SecName}} $AR_SecFlags - - "default_${SecName}:" -!macroend -*/ - -!macro FinishSection SecName - ;This macro reads section flag set by user and removes the section - ;if it is not selected. - ;Then it writes component installed flag to registry - ;Input: section index constant name specified in Section command. - - ${IfNot} ${SectionIsSelected} "${${SecName}}" - ClearErrors - ReadRegDWORD $R0 ${MEMENTO_REGISTRY_ROOT} '${MEMENTO_REGISTRY_KEY}' 'MementoSection_${SecName}' - - ${If} $R0 = 1 - !insertmacro "Remove_${${SecName}}" - ${EndIf} - ${EndIf} -!macroend - -!macro RemoveSection SecName - ;This macro is used to call section's Remove_... macro - ;from the uninstaller. - ;Input: section index constant name specified in Section command. - - !insertmacro "Remove_${${SecName}}" -!macroend \ No newline at end of file Modified: trunk/plugins/IR Server Suite/setup.nsi =================================================================== --- trunk/plugins/IR Server Suite/setup.nsi 2008-03-25 08:07:17 UTC (rev 1516) +++ trunk/plugins/IR Server Suite/setup.nsi 2008-03-25 09:13:01 UTC (rev 1517) @@ -51,7 +51,7 @@ !include Memento.nsh !include setup-AddRemovePage.nsh -!include setup-RememberSections.nsh +!include setup-CommonMPMacros.nsh !include setup-languages.nsh ; FileFunc macros This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |