From: <an...@us...> - 2007-12-12 06:17:46
|
Revision: 1146 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1146&view=rev Author: and-81 Date: 2007-12-11 22:17:42 -0800 (Tue, 11 Dec 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/Input Service/Input Service/Icon.ico trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs trunk/plugins/IR Server Suite/Input Service/Input Service/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Icon.ico trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/AssemblyInfo.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Util Apps/ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.Designer.cs trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.cs trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.resx trunk/plugins/IR Server Suite/Util Apps/MacroConverter/MacroConverter.csproj trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Program.cs trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Util Apps/TestClient/ trunk/plugins/IR Server Suite/Util Apps/TestClient/Program.cs trunk/plugins/IR Server Suite/Util Apps/TestClient/Properties/ trunk/plugins/IR Server Suite/Util Apps/TestClient/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Util Apps/TestClient/TestClient.csproj trunk/plugins/IR Server Suite/Util Apps/TestServer/ trunk/plugins/IR Server Suite/Util Apps/TestServer/Program.cs trunk/plugins/IR Server Suite/Util Apps/TestServer/Properties/ trunk/plugins/IR Server Suite/Util Apps/TestServer/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Util Apps/TestServer/TestServer.csproj Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -460,6 +460,104 @@ _inConfiguration = false; } + void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) + { + switch (e.Mode) + { + + #region Suspend + case PowerModes.Suspend: + IrssLog.Info("Enter standby ..."); + + bool suspendedTransmit = false; + + if (_pluginReceive != null) + { + foreach (IRServerPluginBase plugin in _pluginReceive) + { + try + { + plugin.Suspend(); + + if (plugin == _pluginTransmit) + suspendedTransmit = true; + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } + } + } + + if (_pluginTransmit != null && !suspendedTransmit) + { + try + { + _pluginTransmit.Suspend(); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } + } + + // Inform clients ... + if (_mode == IRServerMode.ServerMode) + { + IrssMessage message = new IrssMessage(MessageType.ServerSuspend, MessageFlags.Notify); + SendToAll(message); + } + break; + #endregion Suspend + + #region Resume + case PowerModes.Resume: + IrssLog.Info("Resume from standby ..."); + + bool resumedTransmit = false; + + if (_pluginReceive != null) + { + foreach (IRServerPluginBase plugin in _pluginReceive) + { + try + { + if (plugin == _pluginTransmit) + resumedTransmit = true; + + plugin.Resume(); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } + } + } + + if (_pluginTransmit != null && !resumedTransmit) + { + try + { + _pluginTransmit.Resume(); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } + } + + // Inform clients ... + if (_mode == IRServerMode.ServerMode) + { + IrssMessage message = new IrssMessage(MessageType.ServerResume, MessageFlags.Notify); + SendToAll(message); + } + break; + #endregion Resume + + } + } + void StartServer() { if (_server != null) @@ -734,102 +832,6 @@ } } - void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) - { - switch (e.Mode) - { - case PowerModes.Resume: - { - IrssLog.Info("Resume from standby ..."); - - bool resumedTransmit = false; - - if (_pluginReceive != null) - { - foreach (IRServerPluginBase plugin in _pluginReceive) - { - try - { - if (plugin == _pluginTransmit) - resumedTransmit = true; - - plugin.Resume(); - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - } - } - } - - if (_pluginTransmit != null && !resumedTransmit) - { - try - { - _pluginTransmit.Resume(); - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - } - } - - // Inform clients ... - if (_mode == IRServerMode.ServerMode) - { - IrssMessage message = new IrssMessage(MessageType.ServerResume, MessageFlags.Notify); - SendToAll(message); - } - break; - } - - case PowerModes.Suspend: - { - IrssLog.Info("Enter standby ..."); - - bool suspendedTransmit = false; - - if (_pluginReceive != null) - { - foreach (IRServerPluginBase plugin in _pluginReceive) - { - try - { - plugin.Suspend(); - - if (plugin == _pluginTransmit) - suspendedTransmit = true; - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - } - } - } - - if (_pluginTransmit != null && !suspendedTransmit) - { - try - { - _pluginTransmit.Suspend(); - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - } - } - - // Inform clients ... - if (_mode == IRServerMode.ServerMode) - { - IrssMessage message = new IrssMessage(MessageType.ServerSuspend, MessageFlags.Notify); - SendToAll(message); - } - break; - } - } - } - void SendToAll(IrssMessage message) { IrssLog.Debug("SendToAll({0}, {1})", message.Type, message.Flags); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -8,7 +8,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("IR Server")] -[assembly: AssemblyDescription("Provides multiple connections for local and network access to a remote control transceiver")] +[assembly: AssemblyDescription("Provides multiple connections for local and network access to attached remote control transceivers")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("and-81")] [assembly: AssemblyProduct("IR Server")] Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-12-12 06:17:42 UTC (rev 1146) @@ -265,11 +265,16 @@ Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacroConverter", "Applications\MacroConverter\MacroConverter.csproj", "{6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Util Apps", "Util Apps", "{D4CDABD0-B82E-4DEE-A2A8-A2A52774FC2F}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection + ProjectSection(SolutionItems) = preProject + Util Apps\MacroConverter\MacroConverter.csproj = Util Apps\MacroConverter\MacroConverter.csproj + Util Apps\TestClient\TestClient.csproj = Util Apps\TestClient\TestClient.csproj + Util Apps\TestServer\TestServer.csproj = Util Apps\TestServer\TestServer.csproj + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -387,7 +392,8 @@ {B5E711A2-E6D0-4BEA-B66B-7A8B0BCA6A4D}.Release|Any CPU.Build.0 = Release|Any CPU {EE8F2C22-8BD3-4832-85F0-E6F67ED3AADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EE8F2C22-8BD3-4832-85F0-E6F67ED3AADB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE8F2C22-8BD3-4832-85F0-E6F67ED3AADB}.Release|Any CPU.ActiveCfg = Release|x86 + {EE8F2C22-8BD3-4832-85F0-E6F67ED3AADB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE8F2C22-8BD3-4832-85F0-E6F67ED3AADB}.Release|Any CPU.Build.0 = Release|Any CPU {E6A68244-8C31-44A9-9F85-B4A102B5F209}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E6A68244-8C31-44A9-9F85-B4A102B5F209}.Debug|Any CPU.Build.0 = Debug|Any CPU {E6A68244-8C31-44A9-9F85-B4A102B5F209}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -432,10 +438,6 @@ {37A555DF-7012-4B99-8A47-1C922A361E52}.Debug|Any CPU.Build.0 = Debug|Any CPU {37A555DF-7012-4B99-8A47-1C922A361E52}.Release|Any CPU.ActiveCfg = Release|Any CPU {37A555DF-7012-4B99-8A47-1C922A361E52}.Release|Any CPU.Build.0 = Release|Any CPU - {6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -452,7 +454,6 @@ {905131F8-F8AC-4A65-A722-37783902D7B8} = {0C209E91-5AD5-4662-AD0E-976A940D4806} {B5E711A2-E6D0-4BEA-B66B-7A8B0BCA6A4D} = {0C209E91-5AD5-4662-AD0E-976A940D4806} {CCDBA239-8E8E-4F5F-A098-7132EED5F160} = {0C209E91-5AD5-4662-AD0E-976A940D4806} - {6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6} = {0C209E91-5AD5-4662-AD0E-976A940D4806} {7C686499-7517-4338-8837-7E8617549D9A} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD} {BABC30EB-7D0F-4398-9FCB-E517EA8D2AA9} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD} {99B5CA78-3E0B-477F-A7D3-EE1B65E85DE4} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD} Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/Icon.ico =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -482,10 +482,10 @@ { try { - plugin.Resume(); - if (plugin == _pluginTransmit) resumedTransmit = true; + + plugin.Resume(); } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Input Service/Input Service/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service/Properties/AssemblyInfo.cs 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/Input Service/Input Service/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -7,11 +7,11 @@ // 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("MediaPortal Input Service")] -[assembly: AssemblyDescription("Provides access to input devices")] +[assembly: AssemblyTitle("Input Service")] +[assembly: AssemblyDescription("Provides multiple connections for local and network access to attached input devices")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("and-81")] -[assembly: AssemblyProduct("MediaPortal Input Service")] +[assembly: AssemblyProduct("Input Service")] [assembly: AssemblyCopyright("Aaron Dinnage")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Icon.ico =================================================================== (Binary files differ) Modified: trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/AssemblyInfo.cs 2007-12-11 14:47:41 UTC (rev 1145) +++ trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -5,11 +5,11 @@ // 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("MediaPortal Input Service Configuration")] -[assembly: AssemblyDescription("Configure the MediaPortal Input Service")] +[assembly: AssemblyTitle("Input Service Configuration")] +[assembly: AssemblyDescription("Configure the Input Service")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("and-81")] -[assembly: AssemblyProduct("MediaPortal Input Service Configuration")] +[assembly: AssemblyProduct("Input Service Configuration")] [assembly: AssemblyCopyright("Aaron Dinnage")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.Designer.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,91 @@ +namespace MacroConverter +{ + partial class FormMain + { + /// <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.buttonGO = new System.Windows.Forms.Button(); + this.listViewStatus = new System.Windows.Forms.ListView(); + this.columnHeaderText = new System.Windows.Forms.ColumnHeader(); + this.SuspendLayout(); + // + // buttonGO + // + this.buttonGO.Dock = System.Windows.Forms.DockStyle.Top; + this.buttonGO.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.buttonGO.Location = new System.Drawing.Point(0, 0); + this.buttonGO.Name = "buttonGO"; + this.buttonGO.Size = new System.Drawing.Size(506, 32); + this.buttonGO.TabIndex = 0; + this.buttonGO.Text = "GO !"; + this.buttonGO.UseVisualStyleBackColor = true; + this.buttonGO.Click += new System.EventHandler(this.buttonGO_Click); + // + // listViewStatus + // + this.listViewStatus.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeaderText}); + this.listViewStatus.Dock = System.Windows.Forms.DockStyle.Fill; + this.listViewStatus.Location = new System.Drawing.Point(0, 32); + this.listViewStatus.Name = "listViewStatus"; + this.listViewStatus.Size = new System.Drawing.Size(506, 455); + this.listViewStatus.TabIndex = 1; + this.listViewStatus.UseCompatibleStateImageBehavior = false; + this.listViewStatus.View = System.Windows.Forms.View.Details; + // + // columnHeaderText + // + this.columnHeaderText.Text = "Status"; + this.columnHeaderText.Width = 485; + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(506, 487); + this.Controls.Add(this.listViewStatus); + this.Controls.Add(this.buttonGO); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FormMain"; + this.ShowIcon = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Macro Converter"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonGO; + private System.Windows.Forms.ListView listViewStatus; + private System.Windows.Forms.ColumnHeader columnHeaderText; + } +} + Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,270 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; +using System.Xml; + +using IrssUtils; + +namespace MacroConverter +{ + + public partial class FormMain : Form + { + + public const string XmlTagMacro = "MACRO"; + public const string XmlTagBlast = "BLAST"; + public const string XmlTagPause = "PAUSE"; + public const string XmlTagRun = "RUN"; + public const string XmlTagSerial = "SERIAL"; + public const string XmlTagKeys = "KEYS"; + public const string XmlTagWindowMsg = "WINDOW_MESSAGE"; + public const string XmlTagTcpMsg = "TCP_MESSAGE"; + public const string XmlTagGoto = "GOTO"; + public const string XmlTagPopup = "POPUP"; + public const string XmlTagMultiMap = "MULTI_MAPPING"; + public const string XmlTagMouseMode = "MOUSE_MODE"; + public const string XmlTagInputLayer = "INPUT_LAYER"; + public const string XmlTagWindowState = "WINDOW_STATE"; + public const string XmlTagFocus = "GET_FOCUS"; + public const string XmlTagExit = "EXIT"; + + public const string XmlTagStandby = "STANDBY"; + public const string XmlTagHibernate = "HIBERNATE"; + public const string XmlTagReboot = "REBOOT"; + public const string XmlTagShutdown = "SHUTDOWN"; + public const string XmlTagLogOff = "LOG_OFF"; + + public const string XmlTagMouse = "MOUSE"; + public const string XmlTagEject = "EJECT"; + public const string XmlTagSound = "SOUND"; + public const string XmlTagBeep = "BEEP"; + public const string XmlTagDisplay = "DISPLAY"; + + public const string XmlTagTranslator = "TRANSLATOR"; + public const string XmlTagVirtualKB = "VIRTUAL_KEYBOARD"; + public const string XmlTagSmsKB = "SMS_KEYBOARD"; + + + + public FormMain() + { + InitializeComponent(); + } + + private void buttonGO_Click(object sender, EventArgs e) + { + listViewStatus.Items.Add("Translator Macros ..."); + ProcessFolder(Common.FolderAppData + "Translator\\Macro\\"); + + listViewStatus.Items.Add("MP Blast Zone Plugin Macros ..."); + ProcessFolder(Common.FolderAppData + "MP Blast Zone Plugin\\Macro\\"); + + listViewStatus.Items.Add("MP Control Plugin Macros ..."); + ProcessFolder(Common.FolderAppData + "MP Control Plugin\\Macro\\"); + + listViewStatus.Items.Add("TV2 Blaster Plugin Macros ..."); + ProcessFolder(Common.FolderAppData + "TV2 Blaster Plugin\\Macro\\"); + + listViewStatus.Items.Add("TV3 Blaster Plugin Macros ..."); + ProcessFolder(Common.FolderAppData + "TV3 Blaster Plugin\\Macro\\"); + + listViewStatus.Items.Add("MCE Replacement Plugin Macros ..."); + ProcessFolder(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\MediaPortal MCE Replacement Plugin\\Macro\\"); + + listViewStatus.Items.Add("Done."); + } + + void ProcessFolder(string folder) + { + try + { + string[] macros = Directory.GetFiles(folder, '*' + Common.FileExtensionMacro); + ProcessMacros(macros); + } + catch (Exception ex) + { + listViewStatus.Items.Add(ex.Message); + } + } + + void ProcessMacros(string[] macros) + { + string[] macroContents; + + foreach (string macro in macros) + { + try + { + listViewStatus.Items.Add(Path.GetFileName(macro)); + + macroContents = LoadMacro(macro); + SaveMacro(macro, macroContents); + } + catch (Exception ex) + { + listViewStatus.Items.Add(ex.Message); + } + } + } + + + string[] LoadMacro(string fileName) + { + List<string> macroContents = new List<string>(); + + XmlDocument doc = new XmlDocument(); + doc.Load(fileName); + + XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("action"); + + string commandProperty; + foreach (XmlNode item in commandSequence) + { + commandProperty = item.Attributes["cmdproperty"].Value; + + switch (item.Attributes["command"].Value) + { + case XmlTagMacro: + macroContents.Add(Common.CmdPrefixMacro + commandProperty); + break; + + case XmlTagBlast: + macroContents.Add(Common.CmdPrefixBlast + commandProperty); + break; + + case XmlTagPause: + macroContents.Add(Common.CmdPrefixPause + commandProperty); + break; + + case XmlTagRun: + macroContents.Add(Common.CmdPrefixRun + commandProperty); + break; + + case XmlTagSerial: + macroContents.Add(Common.CmdPrefixSerial + commandProperty); + break; + + case XmlTagWindowMsg: + macroContents.Add(Common.CmdPrefixWindowMsg + commandProperty); + break; + + case XmlTagTcpMsg: + macroContents.Add(Common.CmdPrefixTcpMsg + commandProperty); + break; + + case XmlTagKeys: + macroContents.Add(Common.CmdPrefixKeys + commandProperty); + break; + + case XmlTagMouse: + macroContents.Add(Common.CmdPrefixMouse + commandProperty); + break; + + case XmlTagEject: + macroContents.Add(Common.CmdPrefixEject + commandProperty); + break; + + case XmlTagGoto: + macroContents.Add(Common.CmdPrefixGoto + commandProperty); + break; + + case XmlTagPopup: + macroContents.Add(Common.CmdPrefixPopup + commandProperty); + break; + + case XmlTagMultiMap: + macroContents.Add(Common.CmdPrefixMultiMap + commandProperty); + break; + + case XmlTagMouseMode: + macroContents.Add(Common.CmdPrefixMouseMode + commandProperty); + break; + + case XmlTagInputLayer: + macroContents.Add(Common.CmdPrefixInputLayer); + break; + + case XmlTagFocus: + macroContents.Add(Common.CmdPrefixFocus); + break; + + case XmlTagExit: + macroContents.Add(Common.CmdPrefixExit); + break; + + case XmlTagStandby: + macroContents.Add(Common.CmdPrefixStandby); + break; + + case XmlTagHibernate: + macroContents.Add(Common.CmdPrefixHibernate); + break; + + case XmlTagReboot: + macroContents.Add(Common.CmdPrefixReboot); + break; + + case XmlTagShutdown: + macroContents.Add(Common.CmdPrefixShutdown); + break; + + case XmlTagBeep: + macroContents.Add(Common.CmdPrefixBeep + commandProperty); + break; + + case XmlTagDisplay: + macroContents.Add(Common.CmdPrefixDisplay + commandProperty); + break; + + case XmlTagSmsKB: + macroContents.Add(Common.CmdPrefixSmsKB); + break; + + case XmlTagSound: + macroContents.Add(Common.CmdPrefixSound + commandProperty); + break; + + case XmlTagTranslator: + macroContents.Add(Common.CmdPrefixTranslator); + break; + + case XmlTagVirtualKB: + macroContents.Add(Common.CmdPrefixVirtualKB); + break; + + default: + throw new Exception("Unrecognised Macro TAG: " + item.Attributes["command"].Value); + } + } + + return macroContents.ToArray(); + } + + void SaveMacro(string fileName, string[] contents) + { + using (XmlTextWriter writer = new XmlTextWriter(fileName, Encoding.UTF8)) + { + writer.Formatting = Formatting.Indented; + writer.WriteStartDocument(true); + writer.WriteStartElement("macro"); + + foreach (string item in contents) + { + writer.WriteStartElement("item"); + writer.WriteAttributeString("command", item); + writer.WriteEndElement(); + } + + writer.WriteEndElement(); + writer.WriteEndDocument(); + } + } + + } + +} Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.resx =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.resx (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/FormMain.resx 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,120 @@ +<?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> +</root> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/MacroConverter.csproj =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/MacroConverter.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/MacroConverter.csproj 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,68 @@ +<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>{6BF20ECD-A459-42B6-AFFE-6CA8CD308AC6}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MacroConverter</RootNamespace> + <AssemblyName>MacroConverter</AssemblyName> + <StartupObject>MacroConverter.Program</StartupObject> + </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> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <UseVSHostingProcess>false</UseVSHostingProcess> + </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.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="FormMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormMain.Designer.cs"> + <DependentUpon>FormMain.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="FormMain.resx"> + <SubType>Designer</SubType> + <DependentUpon>FormMain.cs</DependentUpon> + </EmbeddedResource> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Program.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace MacroConverter +{ + static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new FormMain()); + } + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -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("MacroConverter")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MacroConverter")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[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("f4aa7712-7298-4a5d-b114-087ad0fc4057")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.3.5")] +[assembly: AssemblyFileVersion("1.0.3.5")] Added: trunk/plugins/IR Server Suite/Util Apps/TestClient/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestClient/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestClient/Program.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,121 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; + +using IrssComms; + +namespace TestClient +{ + + class Program + { + + static int clientNumber = -1; + + static Client _client; + + static void Main(string[] args) + { + ClientMessageSink sink = new ClientMessageSink(Sink); + + IPAddress serverIP = Client.GetIPFromName("localhost"); + + IPEndPoint endPoint = new IPEndPoint(serverIP, Server.DefaultPort); + + _client = new Client(endPoint, sink); + _client.CommsFailureCallback = new WaitCallback(CommsFailure); + _client.ConnectCallback = new WaitCallback(Connected); + _client.DisconnectCallback = new WaitCallback(Disconnected); + + + if (_client.Start()) + { + Console.WriteLine("Client started"); + } + else + { + Console.WriteLine("Couldn't start communications"); + return; + } + + Console.ReadLine(); + + IrssMessage message = new IrssMessage(MessageType.ForwardRemoteEvent, MessageFlags.Request); + + try + { + for (int index = 0; index < 10000; index++) + { + message.SetDataAsString(index.ToString()); + _client.Send(message); + + Console.WriteLine("ForwardRemoteEvent: {0}", index); + + Thread.Sleep(10); + } + } + catch (Exception ex) + { + Console.WriteLine(ex.ToString()); + } + + Console.ReadLine(); + + _client.Send(new IrssMessage(MessageType.UnregisterClient, MessageFlags.Request, String.Format("Unregister {0}", clientNumber))); + + Thread.Sleep(1000); + + _client.Dispose(); + } + + + static void CommsFailure(object obj) + { + Exception ex = obj as Exception; + + if (ex != null) + Console.WriteLine("Communications failure: {0}", ex.Message); + else + Console.WriteLine("Communications failure"); + } + static void Connected(object obj) + { + Console.WriteLine("Connected to server"); + + IrssMessage message = new IrssMessage(MessageType.RegisterClient, MessageFlags.Request); + _client.Send(message); + } + static void Disconnected(object obj) + { + Console.WriteLine("Communications with server has been lost"); + + Thread.Sleep(1000); + } + + + + static void Sink(IrssMessage message) + { + switch (message.Type) + { + case MessageType.RegisterClient: + clientNumber = BitConverter.ToInt32(message.GetDataAsBytes(), 0); + Console.WriteLine("Registered: {0}, {1}, {2}", message.Type, message.Flags, clientNumber); + break; + + case MessageType.ForwardRemoteEvent: + Console.WriteLine("ForwardRemoteEvent: {0}", message.GetDataAsString()); + break; + + default: + Console.WriteLine("Message: {0}, {1}", message.Type, message.Flags); + break; + } + } + + } + +} Added: trunk/plugins/IR Server Suite/Util Apps/TestClient/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestClient/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestClient/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -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("TestClient")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestClient")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[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("9ae66d14-61cc-4b15-9d35-d8988a3d2afc")] + +// 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")] Added: trunk/plugins/IR Server Suite/Util Apps/TestClient/TestClient.csproj =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestClient/TestClient.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestClient/TestClient.csproj 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,72 @@ +<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>{DDB52A4D-A670-411A-8273-8B1707C67028}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>TestClient</RootNamespace> + <AssemblyName>TestClient</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> + <PlatformTarget>x86</PlatformTarget> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </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> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </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> + <ItemGroup> + <ProjectReference Include="..\Common\IrssComms\IrssComms.csproj"> + <Project>{BCAFDF45-70DD-46FD-8B98-880DDA585AD2}</Project> + <Name>IrssComms</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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Util Apps/TestServer/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestServer/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestServer/Program.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Net.Sockets; +using System.Text; +using System.Threading; + +using IrssComms; + +namespace TestServer +{ + + class Program + { + + static int count = 1; + + static Server server; + + static void Main(string[] args) + { + ServerMessageSink sink = new ServerMessageSink(MessageSink); + + server = new Server(Server.DefaultPort, sink); + try + { + if (server.Start()) + { + Console.WriteLine("Server Started"); + } + else + { + Console.WriteLine("Failed to start Server"); + } + + Console.ReadLine(); + + server.Dispose(); + + Console.WriteLine("Stopped"); + } + catch (SocketException socketException) + { + Console.WriteLine(socketException.ToString()); + Console.ReadLine(); + } + } + + static void MessageSink(MessageManagerCombo combo) + { + IrssMessage response = new IrssMessage(MessageType.Unknown, MessageFlags.None); + + switch (combo.Message.Type) + { + case MessageType.RegisterClient: + Console.WriteLine("Registered: {0}", count); + + response.Type = MessageType.RegisterClient; + response.Flags = MessageFlags.Success; + response.SetDataAsBytes(BitConverter.GetBytes(count)); + + count++; + break; + + default: + Console.WriteLine("Message: {0}, {1}", combo.Message.Type, combo.Message.Flags); + break; + } + + //Thread.Sleep(50); + + server.Send(combo.Manager, response); + } + + } + +} Added: trunk/plugins/IR Server Suite/Util Apps/TestServer/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestServer/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestServer/Properties/AssemblyInfo.cs 2007-12-12 06:17:42 UTC (rev 1146) @@ -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("TestServer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestServer")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[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("4ba77968-0dab-4ced-8eeb-6e0458426243")] + +// 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")] Added: trunk/plugins/IR Server Suite/Util Apps/TestServer/TestServer.csproj =================================================================== --- trunk/plugins/IR Server Suite/Util Apps/TestServer/TestServer.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Util Apps/TestServer/TestServer.csproj 2007-12-12 06:17:42 UTC (rev 1146) @@ -0,0 +1,70 @@ +<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>{327F54E5-D1DC-4297-BF2F-4283EB30FFB1}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>TestServer</RootNamespace> + <AssemblyName>TestServer</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> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>bin\x86\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </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> + <ItemGroup> + <ProjectReference Include="..\Common\IrssComms\IrssComms.csproj"> + <Project>{BCAFDF45-70DD-46FD-8B98-880DDA585AD2}</Project> + <Name>IrssComms</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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |