From: <an...@us...> - 2008-03-04 13:24:15
|
Revision: 1424 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1424&view=rev Author: and-81 Date: 2008-03-04 05:24:09 -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.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.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/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/FusionREMOTE/FusionHDTV.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/IgorPlug/Microsoft MCE.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Microsoft MCE/Microsoft MCE.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/USB-UIRT/Microsoft MCE.xml trunk/plugins/IR Server Suite/Input Service/Input Service/Abstract Remote Maps/Windows Messages/Virtual Remote.xml trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/PVRX2.exe.xml Removed Paths: ------------- trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.Designer.cs trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsc trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsd trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xss trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Default.xml trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Wii Remote.xml Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/Abstractor.csproj 2008-03-04 13:24:09 UTC (rev 1424) @@ -53,26 +53,6 @@ <SubType>Designer</SubType> <DependentUpon>MainForm.cs</DependentUpon> </EmbeddedResource> - <None Include="RemoteTable.xsc"> - <DependentUpon>RemoteTable.xsd</DependentUpon> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="RemoteTable.xsd"> - <Generator>MSDataSetGenerator</Generator> - <LastGenOutput>RemoteTable.Designer.cs</LastGenOutput> - <SubType>Designer</SubType> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <None Include="RemoteTable.xss"> - <DependentUpon>RemoteTable.xsd</DependentUpon> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </None> - <Compile Include="RemoteTable.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>RemoteTable.xsd</DependentUpon> - <CopyToOutputDirectory>Always</CopyToOutputDirectory> - </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Common\IrssComms\IrssComms.csproj"> Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-04 13:24:09 UTC (rev 1424) @@ -616,7 +616,10 @@ } string device = comboBoxDevice.Text; - + + if (!Directory.Exists(device)) + Directory.CreateDirectory(device); + string fileName = Path.ChangeExtension(textBoxRemoteName.Text, ".xml"); string path = Path.Combine(device, fileName); Deleted: trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.Designer.cs 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.Designer.cs 2008-03-04 13:24:09 UTC (rev 1424) @@ -1,528 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// This code was generated by a tool. -// Runtime Version:2.0.50727.832 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// </auto-generated> -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 - -namespace Abstractor { - using System; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - [Serializable()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.ComponentModel.ToolboxItem(true)] - [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] - [System.Xml.Serialization.XmlRootAttribute("AbstractRemoteButtons")] - [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] - public partial class AbstractRemoteButtons : System.Data.DataSet { - - private RemoteTableDataTable tableRemoteTable; - - private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public AbstractRemoteButtons() { - this.BeginInit(); - this.InitClass(); - System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - base.Relations.CollectionChanged += schemaChangedHandler; - this.EndInit(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected AbstractRemoteButtons(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : - base(info, context, false) { - if ((this.IsBinarySerialized(info, context) == true)) { - this.InitVars(false); - System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - this.Tables.CollectionChanged += schemaChangedHandler1; - this.Relations.CollectionChanged += schemaChangedHandler1; - return; - } - string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); - if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) { - System.Data.DataSet ds = new System.Data.DataSet(); - ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema))); - if ((ds.Tables["RemoteTable"] != null)) { - base.Tables.Add(new RemoteTableDataTable(ds.Tables["RemoteTable"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema))); - } - this.GetSerializationData(info, context); - System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); - base.Tables.CollectionChanged += schemaChangedHandler; - this.Relations.CollectionChanged += schemaChangedHandler; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.ComponentModel.Browsable(false)] - [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)] - public RemoteTableDataTable RemoteTable { - get { - return this.tableRemoteTable; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.ComponentModel.BrowsableAttribute(true)] - [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)] - public override System.Data.SchemaSerializationMode SchemaSerializationMode { - get { - return this._schemaSerializationMode; - } - set { - this._schemaSerializationMode = value; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new System.Data.DataTableCollection Tables { - get { - return base.Tables; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] - public new System.Data.DataRelationCollection Relations { - get { - return base.Relations; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void InitializeDerivedDataSet() { - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public override System.Data.DataSet Clone() { - AbstractRemoteButtons cln = ((AbstractRemoteButtons)(base.Clone())); - cln.InitVars(); - cln.SchemaSerializationMode = this.SchemaSerializationMode; - return cln; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override bool ShouldSerializeTables() { - return false; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override bool ShouldSerializeRelations() { - return false; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void ReadXmlSerializable(System.Xml.XmlReader reader) { - if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) { - this.Reset(); - System.Data.DataSet ds = new System.Data.DataSet(); - ds.ReadXml(reader); - if ((ds.Tables["RemoteTable"] != null)) { - base.Tables.Add(new RemoteTableDataTable(ds.Tables["RemoteTable"])); - } - this.DataSetName = ds.DataSetName; - this.Prefix = ds.Prefix; - this.Namespace = ds.Namespace; - this.Locale = ds.Locale; - this.CaseSensitive = ds.CaseSensitive; - this.EnforceConstraints = ds.EnforceConstraints; - this.Merge(ds, false, System.Data.MissingSchemaAction.Add); - this.InitVars(); - } - else { - this.ReadXml(reader); - this.InitVars(); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() { - System.IO.MemoryStream stream = new System.IO.MemoryStream(); - this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null)); - stream.Position = 0; - return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars() { - this.InitVars(true); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars(bool initTable) { - this.tableRemoteTable = ((RemoteTableDataTable)(base.Tables["RemoteTable"])); - if ((initTable == true)) { - if ((this.tableRemoteTable != null)) { - this.tableRemoteTable.InitVars(); - } - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void InitClass() { - this.DataSetName = "AbstractRemoteButtons"; - this.Prefix = ""; - this.Locale = new System.Globalization.CultureInfo("en"); - this.EnforceConstraints = true; - this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; - this.tableRemoteTable = new RemoteTableDataTable(); - base.Tables.Add(this.tableRemoteTable); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - private bool ShouldSerializeRemoteTable() { - return false; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { - if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) { - this.InitVars(); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) { - AbstractRemoteButtons ds = new AbstractRemoteButtons(); - System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); - System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); - xs.Add(ds.GetSchemaSerializable()); - System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny(); - any.Namespace = ds.Namespace; - sequence.Items.Add(any); - type.Particle = sequence; - return type; - } - - public delegate void RemoteTableRowChangeEventHandler(object sender, RemoteTableRowChangeEvent e); - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - [System.Serializable()] - [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] - public partial class RemoteTableDataTable : System.Data.DataTable, System.Collections.IEnumerable { - - private System.Data.DataColumn columnRawCode; - - private System.Data.DataColumn columnAbstractButton; - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableDataTable() { - this.TableName = "RemoteTable"; - this.BeginInit(); - this.InitClass(); - this.EndInit(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal RemoteTableDataTable(System.Data.DataTable table) { - this.TableName = table.TableName; - if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { - this.CaseSensitive = table.CaseSensitive; - } - if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { - this.Locale = table.Locale; - } - if ((table.Namespace != table.DataSet.Namespace)) { - this.Namespace = table.Namespace; - } - this.Prefix = table.Prefix; - this.MinimumCapacity = table.MinimumCapacity; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected RemoteTableDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : - base(info, context) { - this.InitVars(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public System.Data.DataColumn RawCodeColumn { - get { - return this.columnRawCode; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public System.Data.DataColumn AbstractButtonColumn { - get { - return this.columnAbstractButton; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - [System.ComponentModel.Browsable(false)] - public int Count { - get { - return this.Rows.Count; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableRow this[int index] { - get { - return ((RemoteTableRow)(this.Rows[index])); - } - } - - public event RemoteTableRowChangeEventHandler RemoteTableRowChanging; - - public event RemoteTableRowChangeEventHandler RemoteTableRowChanged; - - public event RemoteTableRowChangeEventHandler RemoteTableRowDeleting; - - public event RemoteTableRowChangeEventHandler RemoteTableRowDeleted; - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void AddRemoteTableRow(RemoteTableRow row) { - this.Rows.Add(row); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableRow AddRemoteTableRow(string RawCode, string AbstractButton) { - RemoteTableRow rowRemoteTableRow = ((RemoteTableRow)(this.NewRow())); - rowRemoteTableRow.ItemArray = new object[] { - RawCode, - AbstractButton}; - this.Rows.Add(rowRemoteTableRow); - return rowRemoteTableRow; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public virtual System.Collections.IEnumerator GetEnumerator() { - return this.Rows.GetEnumerator(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public override System.Data.DataTable Clone() { - RemoteTableDataTable cln = ((RemoteTableDataTable)(base.Clone())); - cln.InitVars(); - return cln; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override System.Data.DataTable CreateInstance() { - return new RemoteTableDataTable(); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal void InitVars() { - this.columnRawCode = base.Columns["RawCode"]; - this.columnAbstractButton = base.Columns["AbstractButton"]; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - private void InitClass() { - this.columnRawCode = new System.Data.DataColumn("RawCode", typeof(string), null, System.Data.MappingType.Attribute); - base.Columns.Add(this.columnRawCode); - this.columnAbstractButton = new System.Data.DataColumn("AbstractButton", typeof(string), null, System.Data.MappingType.Attribute); - base.Columns.Add(this.columnAbstractButton); - this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] { - this.columnRawCode}, false)); - this.columnRawCode.Unique = true; - this.columnRawCode.Namespace = ""; - this.columnRawCode.Caption = "Raw Code"; - this.columnRawCode.DefaultValue = ((string)("")); - this.columnAbstractButton.Namespace = ""; - this.columnAbstractButton.Caption = "Abstract Button"; - this.columnAbstractButton.DefaultValue = ((string)("")); - this.Locale = new System.Globalization.CultureInfo("en"); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableRow NewRemoteTableRow() { - return ((RemoteTableRow)(this.NewRow())); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { - return new RemoteTableRow(builder); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override System.Type GetRowType() { - return typeof(RemoteTableRow); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { - base.OnRowChanged(e); - if ((this.RemoteTableRowChanged != null)) { - this.RemoteTableRowChanged(this, new RemoteTableRowChangeEvent(((RemoteTableRow)(e.Row)), e.Action)); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { - base.OnRowChanging(e); - if ((this.RemoteTableRowChanging != null)) { - this.RemoteTableRowChanging(this, new RemoteTableRowChangeEvent(((RemoteTableRow)(e.Row)), e.Action)); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleted(e); - if ((this.RemoteTableRowDeleted != null)) { - this.RemoteTableRowDeleted(this, new RemoteTableRowChangeEvent(((RemoteTableRow)(e.Row)), e.Action)); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { - base.OnRowDeleting(e); - if ((this.RemoteTableRowDeleting != null)) { - this.RemoteTableRowDeleting(this, new RemoteTableRowChangeEvent(((RemoteTableRow)(e.Row)), e.Action)); - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void RemoveRemoteTableRow(RemoteTableRow row) { - this.Rows.Remove(row); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { - System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); - System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); - AbstractRemoteButtons ds = new AbstractRemoteButtons(); - xs.Add(ds.GetSchemaSerializable()); - System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); - any1.Namespace = "http://www.w3.org/2001/XMLSchema"; - any1.MinOccurs = new decimal(0); - any1.MaxOccurs = decimal.MaxValue; - any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any1); - System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); - any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; - any2.MinOccurs = new decimal(1); - any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; - sequence.Items.Add(any2); - System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); - attribute1.Name = "namespace"; - attribute1.FixedValue = ds.Namespace; - type.Attributes.Add(attribute1); - System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); - attribute2.Name = "tableTypeName"; - attribute2.FixedValue = "RemoteTableDataTable"; - type.Attributes.Add(attribute2); - type.Particle = sequence; - return type; - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public partial class RemoteTableRow : System.Data.DataRow { - - private RemoteTableDataTable tableRemoteTable; - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - internal RemoteTableRow(System.Data.DataRowBuilder rb) : - base(rb) { - this.tableRemoteTable = ((RemoteTableDataTable)(this.Table)); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string RawCode { - get { - try { - return ((string)(this[this.tableRemoteTable.RawCodeColumn])); - } - catch (System.InvalidCastException e) { - throw new System.Data.StrongTypingException("The value for column \'RawCode\' in table \'RemoteTable\' is DBNull.", e); - } - } - set { - this[this.tableRemoteTable.RawCodeColumn] = value; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public string AbstractButton { - get { - if (this.IsAbstractButtonNull()) { - return string.Empty; - } - else { - return ((string)(this[this.tableRemoteTable.AbstractButtonColumn])); - } - } - set { - this[this.tableRemoteTable.AbstractButtonColumn] = value; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public bool IsRawCodeNull() { - return this.IsNull(this.tableRemoteTable.RawCodeColumn); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void SetRawCodeNull() { - this[this.tableRemoteTable.RawCodeColumn] = System.Convert.DBNull; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public bool IsAbstractButtonNull() { - return this.IsNull(this.tableRemoteTable.AbstractButtonColumn); - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public void SetAbstractButtonNull() { - this[this.tableRemoteTable.AbstractButtonColumn] = System.Convert.DBNull; - } - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] - public class RemoteTableRowChangeEvent : System.EventArgs { - - private RemoteTableRow eventRow; - - private System.Data.DataRowAction eventAction; - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableRowChangeEvent(RemoteTableRow row, System.Data.DataRowAction action) { - this.eventRow = row; - this.eventAction = action; - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public RemoteTableRow Row { - get { - return this.eventRow; - } - } - - [System.Diagnostics.DebuggerNonUserCodeAttribute()] - public System.Data.DataRowAction Action { - get { - return this.eventAction; - } - } - } - } -} - -#pragma warning restore 1591 \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsc =================================================================== (Binary files differ) Deleted: trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsd =================================================================== --- trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsd 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xsd 2008-03-04 13:24:09 UTC (rev 1424) @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<xs:schema id="AbstractRemoteButtons" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop"> - <xs:annotation> - <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource"> - <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> - <Connections> - </Connections> - <Tables> - </Tables> - <Sources> - </Sources> - </DataSource> - </xs:appinfo> - </xs:annotation> - <xs:element name="AbstractRemoteButtons" msdata:IsDataSet="true" msdata:Locale="en" msprop:Generator_UserDSName="AbstractRemoteButtons" msprop:Generator_DataSetName="AbstractRemoteButtons"> - <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element name="RemoteTable" msdata:Locale="en" msprop:Generator_UserTableName="RemoteTable" msprop:Generator_RowDeletedName="RemoteTableRowDeleted" msprop:Generator_RowChangedName="RemoteTableRowChanged" msprop:Generator_RowClassName="RemoteTableRow" msprop:Generator_RowChangingName="RemoteTableRowChanging" msprop:Generator_RowEvArgName="RemoteTableRowChangeEvent" msprop:Generator_RowEvHandlerName="RemoteTableRowChangeEventHandler" msprop:Generator_TableClassName="RemoteTableDataTable" msprop:Generator_TableVarName="tableRemoteTable" msprop:Generator_RowDeletingName="RemoteTableRowDeleting" msprop:Generator_TablePropName="RemoteTable"> - <xs:complexType> - <xs:attribute name="RawCode" msdata:Caption="Raw Code" msprop:Generator_UserColumnName="RawCode" msprop:nullValue="_throw" msprop:Generator_ColumnPropNameInRow="RawCode" msprop:Generator_ColumnPropNameInTable="RawCodeColumn" msprop:Generator_ColumnVarNameInTable="columnRawCode" type="xs:string" default="" /> - <xs:attribute name="AbstractButton" msdata:Caption="Abstract Button" msprop:Generator_UserColumnName="AbstractButton" msprop:nullValue="_empty" msprop:Generator_ColumnPropNameInRow="AbstractButton" msprop:Generator_ColumnPropNameInTable="AbstractButtonColumn" msprop:Generator_ColumnVarNameInTable="columnAbstractButton" type="xs:string" default="" /> - </xs:complexType> - </xs:element> - </xs:choice> - </xs:complexType> - <xs:unique name="Constraint1"> - <xs:selector xpath=".//RemoteTable" /> - <xs:field xpath="@RawCode" /> - </xs:unique> - </xs:element> -</xs:schema> \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/Applications/Abstractor/RemoteTable.xss =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs 2008-03-04 13:24:09 UTC (rev 1424) @@ -235,17 +235,18 @@ { StatusMessage("Detected box type: {0}", _boxType); - DataTable bouquets = Program.GetData(url, UserName, Password, BoxType).Tables[0]; + DataSet dataSet = Program.GetData(url, UserName, Password, BoxType); + DataTable dataTable = dataSet.Tables[0]; - if (bouquets.Rows.Count != 0) - StatusMessage("{0} channels found", bouquets.Rows.Count); + if (dataTable.Rows.Count != 0) + StatusMessage("{0} channels found", dataTable.Rows.Count); else StatusMessage("ERROR - No channels found!"); if (File.Exists(Program.DataFile)) File.Delete(Program.DataFile); - bouquets.WriteXml(Program.DataFile, XmlWriteMode.WriteSchema); + dataTable.WriteXml(Program.DataFile, XmlWriteMode.WriteSchema); } } catch (Exception ex) Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-04 13:24:09 UTC (rev 1424) @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Data; using System.IO; using System.Net; using System.Net.Sockets; @@ -51,36 +52,42 @@ #region Constants - static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "IR Server\\IR Server.xml"); + static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "IR Server\\IR Server.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 #region Variables NotifyIcon _notifyIcon; + bool _inConfiguration; - List<ClientManager> _registeredClients; - List<ClientManager> _registeredRepeaters; - - Server _server; - Client _client; - + bool _abstractRemoteMode; IRServerMode _mode; string _hostComputer; - bool _registered; // Used for relay and repeater modes. - string[] _pluginNameReceive; List<PluginBase> _pluginReceive; string _pluginNameTransmit; PluginBase _pluginTransmit; - bool _inConfiguration; + Server _server; + Client _client; + List<ClientManager> _registeredClients; + List<ClientManager> _registeredRepeaters; + + bool _registered; // Used for relay and repeater modes. + + DataSet _abstractRemoteButtons; + #endregion Variables - #region Constructor / Destructor + #region Constructor /// <summary> /// Initializes a new instance of the <see cref="IRServer"/> class. @@ -106,7 +113,7 @@ } */ - #endregion Constructor / Destructor + #endregion Constructor #region IDisposable @@ -150,71 +157,82 @@ /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> internal bool Start() { - try - { - IrssLog.Info("Starting IR Server ..."); + IrssLog.Info("Starting IR Server ..."); - LoadSettings(); + LoadSettings(); - // Load IR Plugins ... - _pluginReceive = null; - _pluginTransmit = null; + #region Load plugin(s) - if (_pluginNameReceive == null && String.IsNullOrEmpty(_pluginNameTransmit)) + _pluginReceive = null; + _pluginTransmit = null; + + if (_pluginNameReceive == null && String.IsNullOrEmpty(_pluginNameTransmit)) + { + IrssLog.Warn("No transmit or receive plugins loaded"); + } + else + { + if (_pluginNameReceive == null) { - IrssLog.Warn("No transmit or receive plugins loaded"); + IrssLog.Warn("No receiver plugins loaded"); } else { - if (_pluginNameReceive == null) + _pluginReceive = new List<PluginBase>(_pluginNameReceive.Length); + + for (int index = 0; index < _pluginNameReceive.Length; index++) { - IrssLog.Warn("No receiver plugins loaded"); - } - else - { - _pluginReceive = new List<PluginBase>(_pluginNameReceive.Length); - - for (int index = 0; index < _pluginNameReceive.Length; index++) + try { - try - { - string pluginName = _pluginNameReceive[index]; + string pluginName = _pluginNameReceive[index]; - PluginBase plugin = Program.GetPlugin(pluginName); + PluginBase plugin = Program.GetPlugin(pluginName); - if (plugin == null) - { - IrssLog.Warn("Receiver plugin not found: {0}", pluginName); - } - else - { - _pluginReceive.Add(plugin); - - if (!String.IsNullOrEmpty(_pluginNameTransmit) && plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase)) - _pluginTransmit = plugin; - } + if (plugin == null) + { + IrssLog.Warn("Receiver plugin not found: {0}", pluginName); } - catch (Exception ex) + else { - IrssLog.Error(ex); + _pluginReceive.Add(plugin); + + if (!String.IsNullOrEmpty(_pluginNameTransmit) && plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase)) + _pluginTransmit = plugin; } } - - if (_pluginReceive.Count == 0) - _pluginReceive = null; + catch (Exception ex) + { + IrssLog.Error(ex); + } } - if (String.IsNullOrEmpty(_pluginNameTransmit)) + if (_pluginReceive.Count == 0) + _pluginReceive = null; + } + + if (String.IsNullOrEmpty(_pluginNameTransmit)) + { + IrssLog.Warn("No transmit plugin loaded"); + } + else if (_pluginTransmit == null) + { + try { - IrssLog.Info("No transmit plugin loaded"); + _pluginTransmit = Program.GetPlugin(_pluginNameTransmit); } - else if (_pluginTransmit == null) + catch (Exception ex) { - _pluginTransmit = Program.GetPlugin(_pluginNameTransmit); + IrssLog.Error(ex); } } + } + + #endregion Load plugin(s) - // Mode select ... + #region Mode select + + try + { switch (_mode) { case IRServerMode.ServerMode: @@ -236,89 +254,111 @@ IrssLog.Error("Failed to start in Repeater Mode"); break; } + } + catch (Exception ex) + { + IrssLog.Error("Failed to start Input Service Communications"); + IrssLog.Error(ex); + } - // Start plugin(s) ... + #endregion Mode select - bool startedTransmit = false; + #region Start plugin(s) - if (_pluginReceive != null) + bool startedTransmit = false; + + if (_pluginReceive != null) + { + List<PluginBase> removePlugins = new List<PluginBase>(); + + foreach (PluginBase plugin in _pluginReceive) { - List<PluginBase> removePlugins = new List<PluginBase>(); - - foreach (PluginBase plugin in _pluginReceive) + try { - try - { - plugin.Start(); + plugin.Start(); - IRemoteReceiver remoteReceiver = plugin as IRemoteReceiver; - if (remoteReceiver != null) - remoteReceiver.RemoteCallback += new RemoteHandler(RemoteHandlerCallback); + IRemoteReceiver remoteReceiver = plugin as IRemoteReceiver; + if (remoteReceiver != null) + remoteReceiver.RemoteCallback += new RemoteHandler(RemoteHandlerCallback); - IKeyboardReceiver keyboardReceiver = plugin as IKeyboardReceiver; - if (keyboardReceiver != null) - keyboardReceiver.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback); + IKeyboardReceiver keyboardReceiver = plugin as IKeyboardReceiver; + if (keyboardReceiver != null) + keyboardReceiver.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback); - IMouseReceiver mouseReceiver = plugin as IMouseReceiver; - if (mouseReceiver != null) - mouseReceiver.MouseCallback += new MouseHandler(MouseHandlerCallback); + IMouseReceiver mouseReceiver = plugin as IMouseReceiver; + if (mouseReceiver != null) + mouseReceiver.MouseCallback += new MouseHandler(MouseHandlerCallback); - if (plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase)) - { - startedTransmit = true; - IrssLog.Info("Transmit and Receive plugin started: \"{0}\"", plugin.Name); - } - else - { - IrssLog.Info("Receiver plugin started: \"{0}\"", plugin.Name); - } + if (plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase)) + { + startedTransmit = true; + IrssLog.Info("Transmit and Receive plugin started: \"{0}\"", plugin.Name); } - catch (Exception ex) + else { - IrssLog.Error("Failed to start receive plugin: \"{0}\"", plugin.Name); - IrssLog.Error(ex); - - removePlugins.Add(plugin); + IrssLog.Info("Receiver plugin started: \"{0}\"", plugin.Name); } } + catch (Exception ex) + { + IrssLog.Error("Failed to start receive plugin: \"{0}\"", plugin.Name); + IrssLog.Error(ex); + removePlugins.Add(plugin); + } + } + + if (removePlugins.Count > 0) foreach (PluginBase plugin in removePlugins) _pluginReceive.Remove(plugin); - if (_pluginReceive.Count == 0) - _pluginReceive = null; - } + if (_pluginReceive.Count == 0) + _pluginReceive = null; + } - if (_pluginTransmit != null && !startedTransmit) + if (_pluginTransmit != null && !startedTransmit) + { + try { - try - { - _pluginTransmit.Start(); + _pluginTransmit.Start(); - IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit); - } - catch (Exception ex) - { - IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit); - IrssLog.Error(ex); + IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit); + } + catch (Exception ex) + { + IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit); + IrssLog.Error(ex); - _pluginTransmit = null; - } + _pluginTransmit = null; } + } - _notifyIcon.Visible = true; + #endregion Start plugin(s) - SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); + #region Setup Abstract Remote Model processing - IrssLog.Info("IR Server started"); + if (_abstractRemoteMode) + { + IrssLog.Info("IR Server is running in Abstract Remote mode"); - return true; + _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); } - catch (Exception ex) - { - IrssLog.Error(ex); - return false; - } + + #endregion Setup Abstract Remote Model processing + + _notifyIcon.Visible = true; + + SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged); + + IrssLog.Info("IR Server started"); + + return true; } /// <summary> @@ -669,7 +709,7 @@ { if (_client == null) return; - + _client.Dispose(); _client = null; @@ -751,9 +791,41 @@ { IrssLog.Debug("{0} generated a remote event: {1}", deviceName, keyCode); - byte[] deviceNameBytes = Encoding.ASCII.GetBytes(deviceName); - byte[] keyCodeBytes = Encoding.ASCII.GetBytes(keyCode); + string messageDeviceName = deviceName; + string messageKeyCode = keyCode; + switch (_mode) + { + case IRServerMode.ServerMode: + if (_abstractRemoteMode) + { + string abstractButton = LookupAbstractButton(deviceName, keyCode); + if (!String.IsNullOrEmpty(abstractButton)) + { + messageDeviceName = "Abstract"; + messageKeyCode = abstractButton; + + IrssLog.Info("Abstract Remote Button mapped: {0}", abstractButton); + } + else + { + IrssLog.Info("Abstract Remote Button not found: {0} ({1})", deviceName, keyCode); + } + } + break; + + case IRServerMode.RelayMode: + // Don't do anything in relay mode, just pass it on. + break; + + case IRServerMode.RepeaterMode: + IrssLog.Debug("Remote event ignored, IR Server is in Repeater Mode."); + return; + } + + byte[] deviceNameBytes = Encoding.ASCII.GetBytes(messageDeviceName); + byte[] keyCodeBytes = Encoding.ASCII.GetBytes(messageKeyCode); + byte[] bytes = new byte[8 + deviceNameBytes.Length + keyCodeBytes.Length]; BitConverter.GetBytes(deviceNameBytes.Length).CopyTo(bytes, 0); @@ -776,15 +848,8 @@ _client.Send(message); break; } - - case IRServerMode.RepeaterMode: - { - IrssLog.Debug("Remote event ignored, IR Server is in Repeater Mode."); - break; - } } } - void KeyboardHandlerCallback(string deviceName, int vKey, bool keyUp) { IrssLog.Debug("{0} generated a keyboard event: {1}, keyUp: {2}", deviceName, vKey, keyUp); @@ -816,7 +881,6 @@ } } } - void MouseHandlerCallback(string deviceName, int deltaX, int deltaY, int buttons) { IrssLog.Debug("{0} generated a mouse Event - deltaX: {1}, deltaY: {2}, buttons: {3}", deviceName, deltaX, deltaY, buttons); @@ -1103,7 +1167,55 @@ } else { - IrssMessage forward = new IrssMessage(MessageType.RemoteEvent, MessageFlags.Notify, combo.Message.GetDataAsBytes()); + byte[] data = combo.Message.GetDataAsBytes(); + + if (_abstractRemoteMode) + { + // Decode message ... + int deviceNameSize = BitConverter.ToInt32(data, 0); + string deviceName = Encoding.ASCII.GetString(data, 4, deviceNameSize); + int keyCodeSize = BitConverter.ToInt32(data, 4 + deviceNameSize); + string keyCode = Encoding.ASCII.GetString(data, 8 + deviceNameSize, keyCodeSize); + + // Check that the device maps are loaded for the forwarded device + bool foundDevice = false; + foreach (PluginBase plugin in _pluginReceive) + { + if (plugin is IRemoteReceiver && plugin.Name.Equals(deviceName, StringComparison.OrdinalIgnoreCase)) + { + foundDevice = true; + break; + } + } + + // If the remote maps are not already loaded for this device then attempt to load them + if (!foundDevice) + LoadAbstractDeviceFiles(deviceName); + + // 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); + + 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); + } + 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); SendToAllExcept(combo.Manager, forward); } break; @@ -1509,6 +1621,7 @@ void LoadSettings() { + _abstractRemoteMode = false; _mode = IRServerMode.ServerMode; _hostComputer = String.Empty; _pluginNameReceive = null; @@ -1542,6 +1655,9 @@ return; } + try { _abstractRemoteMode = bool.Parse(doc.DocumentElement.Attributes["AbstractRemoteMode"].Value); } + catch (Exception ex) { IrssLog.Warn(ex.ToString()); } + try { _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value, true); } catch (Exception ex) { IrssLog.Warn(ex.ToString()); } @@ -1574,6 +1690,7 @@ writer.WriteStartDocument(true); writer.WriteStartElement("settings"); // <settings> + writer.WriteAttributeString("AbstractRemoteMode", _abstractRemoteMode.ToString()); writer.WriteAttributeString("Mode", Enum.GetName(typeof(IRServerMode), _mode)); writer.WriteAttributeString("HostComputer", _hostComputer); writer.WriteAttributeString("PluginTransmit", _pluginNameTransmit); @@ -1628,6 +1745,70 @@ } } + string LookupAbstractButton(string deviceName, string keyCode) + { + if (_abstractRemoteButtons == null || _abstractRemoteButtons.Tables.Count == 0) + return null; + + try + { + 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)) + { + IrssLog.Debug(button + ", remote: " + table.ExtendedProperties["Remote"] as string + ", device: " + deviceName); + return button; + } + } + } + } + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + + return null; + //return String.Format("{0} ({1})", deviceName, keyCode); + } + + void LoadAbstractDeviceFiles(string device) + { + string path = Path.Combine(AbstractRemoteMapFolder, device); + string[] files = Directory.GetFiles(path, "*.xml", SearchOption.TopDirectoryOnly); + foreach (string file in files) + { + 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); + + table.ExtendedProperties.Add("Device", device); + table.ExtendedProperties.Add("Remote", remote); + + table.TableName = tableName; + + IrssLog.Info("Abstract Remote Table ({0}) loaded", tableName); + } + } + #endregion Implementation } Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Default.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Default.xml 2008-03-04 13:23:12 UTC (rev 1423) +++ trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/Default.xml 2008-03-04 13:24:09 UTC (rev 1424) @@ -1,11 +0,0 @@ -<?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="MediaPortal" Filename="C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe" Folder="C:\Program Files\Team MediaPortal\MediaPortal" Arguments="" UseShellExecute="false" ForceWindowFocus="false" IgnoreSystemWide="true" WindowState="Normal"> - <ButtonMappings /> - </ProgramSettings> - </Programs> - <Events /> -</Configuration> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/GBPVR.exe.xml 2008-03-04 13:24:09 UTC (rev 1424) @@ -0,0 +1,44 @@ +<?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> +</Configuration> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/PVRX2.exe.xml =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/PVRX2.exe.xml (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Translator/Default Settings/PVRX2.exe.xml 2008-03-04 13:24:09 UTC (rev 1424) @@ -0,0 +1,44 @@ +<?xml version="1.0" ... [truncated message content] |