|
From: <an...@us...> - 2007-05-16 07:37:17
|
Revision: 403
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=403&view=rev
Author: and-81
Date: 2007-05-16 00:37:02 -0700 (Wed, 16 May 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Configuration.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/Tray Launcher/Program.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj
trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Common/IrssUtils/SystemRegistry.cs
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -10,8 +10,6 @@
using System.Text;
using System.Windows.Forms;
-using Microsoft.Win32;
-
using NamedPipes;
using IrssUtils;
@@ -97,7 +95,7 @@
#region Constants
- const string TempIRFile = "test.IR";
+ const string TempIRFile = "test.IR";
#endregion
@@ -190,10 +188,12 @@
{
_transceiverInfo = TransceiverInfo.FromBytes(received.Data);
- comboBoxPort.Items.Add(_transceiverInfo.Ports);
+ comboBoxPort.Items.Clear();
+ comboBoxPort.Items.AddRange(_transceiverInfo.Ports);
comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.Add(_transceiverInfo.Speeds);
+ comboBoxSpeed.Items.Clear();
+ comboBoxSpeed.Items.AddRange(_transceiverInfo.Speeds);
comboBoxSpeed.SelectedIndex = 0;
return;
}
@@ -574,12 +574,15 @@
private void buttonHelp_Click(object sender, EventArgs e)
{
- RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
- string installFolder = (string)registryKey.GetValue("Install_Dir", String.Empty);
- registryKey.Close();
-
- Help.ShowHelp(this, installFolder + "\\IR Server Suite.chm");
- // , HelpNavigator.Topic, "index.html"
+ try
+ {
+ Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm");
+ // , HelpNavigator.Topic, "index.html"
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, ex.Message, "Failed to load help", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
}
#endregion Controls
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -9,8 +9,6 @@
using System.Text;
using System.Windows.Forms;
-using Microsoft.Win32;
-
using IRServerPluginInterface;
using IrssUtils;
@@ -104,9 +102,7 @@
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
- checkBoxRunAtBoot.Checked = (key.GetValue("IR Server", null) != null);
- key.Close();
+ checkBoxRunAtBoot.Checked = SystemRegistry.GetAutoRun("IR Server");
}
catch
{
@@ -138,12 +134,10 @@
{
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
if (checkBoxRunAtBoot.Checked)
- key.SetValue("IR Server", Application.ExecutablePath);
+ SystemRegistry.SetAutoRun("IR Server", Application.ExecutablePath);
else
- key.DeleteValue("IR Server", false);
- key.Close();
+ SystemRegistry.RemoveAutoRun("IR Server");
}
catch (Exception ex)
{
@@ -181,12 +175,14 @@
private void buttonHelp_Click(object sender, EventArgs e)
{
- RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
- string installFolder = (string)registryKey.GetValue("Install_Dir", String.Empty);
- registryKey.Close();
-
- Help.ShowHelp(this, installFolder + "\\IR Server Suite.chm");
- // , HelpNavigator.Topic, "index.html"
+ try
+ {
+ Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "IR Server");
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, ex.Message, "Failed to load help", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
}
#endregion Controls
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-05-16 07:37:02 UTC (rev 403)
@@ -119,7 +119,6 @@
<ProjectReference Include="..\..\IR Server Plugins\IR Server Plugin Interface\IR Server Plugin Interface.csproj">
<Project>{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}</Project>
<Name>IR Server Plugin Interface</Name>
- <Private>True</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -6,6 +6,7 @@
using System.Text;
using System.Threading;
using System.Windows.Forms;
+using System.Xml;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
@@ -43,6 +44,12 @@
internal class IRServer
{
+ #region Constants
+
+ public static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml";
+
+ #endregion Constants
+
#region Variables
NotifyIcon _notifyIcon;
@@ -64,31 +71,23 @@
string _pluginName = String.Empty;
IIRServerPlugin _plugin = null;
+ bool _inConfiguration = false;
+
#endregion Variables
#region Constructor
public IRServer()
{
- try
- {
- // Load settings
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\IRServer");
+ // Setup taskbar icon
+ _notifyIcon = new NotifyIcon();
+ _notifyIcon.ContextMenuStrip = new ContextMenuStrip();
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup)));
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
+ _notifyIcon.Icon = Properties.Resources.Icon16;
+ _notifyIcon.Text = "IR Server";
- _mode = (IRServerMode)key.GetValue("Mode", (int)IRServerMode.ServerMode);
- _hostComputer = (string)key.GetValue("HostComputer", String.Empty);
- _pluginName = (string)key.GetValue("Plugin", String.Empty);
- key.Close();
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.Message);
-
- _mode = IRServerMode.ServerMode;
- _hostComputer = String.Empty;
- _pluginName = String.Empty;
- }
}
#endregion Constructor
@@ -103,66 +102,40 @@
{
try
{
- IrssLog.Debug("Starting IR Server");
+ IrssLog.Debug("Starting IR Server ...");
- if (String.IsNullOrEmpty(_pluginName))
+ LoadSettings();
+
+ // Try to load the IR Plugin, if it fails (for whatever reason) then run configuration.
+ _plugin = null;
+ while (_plugin == null)
{
- IrssLog.Error("No transceiver plugin specified, cannot start. Run Configuration.");
- return false;
- }
- else
- {
- IIRServerPlugin[] serverPlugins = Program.AvailablePlugins();
+ _plugin = Program.GetPlugin(_pluginName);
+ IrssLog.Warn("Failed to load plugin \"{0}\"", _pluginName);
- if (serverPlugins == null)
- {
- IrssLog.Error("No IR Server Plugins found, cannot start.");
- return false;
- }
-
- foreach (IIRServerPlugin plugin in serverPlugins)
- {
- if (plugin.Name == _pluginName)
- {
- _plugin = plugin;
- break;
- }
- }
-
if (_plugin == null)
{
- IrssLog.Error("Failed to start transceiver plugin \"{0}\", cannot start. Run Configuration.", _pluginName);
- return false;
+ if (Configure())
+ SaveSettings();
+ else
+ return false;
}
- else
- {
- IrssLog.Info("Loading transceiver plugin: \"{0}\"", _pluginName);
- }
}
- // Create a FIFO message queue
- _messageQueue = Queue.Synchronized(new Queue());
+ StartMessageQueue();
- // Start message queue handling thread
- _processMessageQueue = true;
- _messageHandlerThread = new Thread(new ThreadStart(MessageHandlerThread));
- _messageHandlerThread.IsBackground = true;
- _messageHandlerThread.Name = "IR Server Message Queue";
- _messageHandlerThread.Start();
-
- IrssLog.Debug("Message Queue thread started");
-
switch (_mode)
{
case IRServerMode.ServerMode:
{
- // Initialize registered clients list
+ // Initialize registered client lists ...
_registeredClients = new List<Client>();
+ _registeredRepeaters = new List<Client>();
// Start server pipe
PipeAccess.StartServer(Common.ServerPipeName, new PipeMessageHandler(QueueMessage));
- IrssLog.Debug("Server Mode: \\\\" + Environment.MachineName + "\\pipe\\" + Common.ServerPipeName);
+ IrssLog.Info("Server Mode: \\\\" + Environment.MachineName + "\\pipe\\" + Common.ServerPipeName);
break;
}
@@ -207,12 +180,6 @@
if (_plugin.CanReceive)
_plugin.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed);
- // Setup taskbar icon
- _notifyIcon = new NotifyIcon();
- _notifyIcon.ContextMenu = new ContextMenu();
- _notifyIcon.ContextMenu.MenuItems.Add(new MenuItem("&Quit", ClickQuit));
- _notifyIcon.Icon = Properties.Resources.Icon16;
- _notifyIcon.Text = "IR Server";
_notifyIcon.Visible = true;
IrssLog.Info("IR Server started");
@@ -233,13 +200,12 @@
{
IrssLog.Info("Stopping IR Server ...");
- _processMessageQueue = false;
-
_notifyIcon.Visible = false;
if (_plugin.CanReceive)
_plugin.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed);
-
+
+ // Stop Plugin
try
{
_plugin.Stop();
@@ -249,8 +215,19 @@
IrssLog.Error(ex.ToString());
}
+ // Stop Message Queue
try
{
+ StopMessageQueue();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ // Stop Server
+ try
+ {
switch (_mode)
{
case IRServerMode.ServerMode:
@@ -271,10 +248,68 @@
{
IrssLog.Error(ex.ToString());
}
+ }
- Application.Exit();
+ bool Configure()
+ {
+ _inConfiguration = true;
+
+ try
+ {
+ Config config = new Config();
+ config.Mode = _mode;
+ config.HostComputer = _hostComputer;
+ config.Plugin = _pluginName;
+
+ if (config.ShowDialog() == DialogResult.OK)
+ {
+ _mode = config.Mode;
+ _hostComputer = config.HostComputer;
+ _pluginName = config.Plugin;
+
+ _inConfiguration = false;
+
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ _inConfiguration = false;
+
+ return false;
}
+ void StartMessageQueue()
+ {
+ _processMessageQueue = true;
+
+ // Create a FIFO message queue
+ _messageQueue = Queue.Synchronized(new Queue());
+
+ // Start message queue handling thread
+ _messageHandlerThread = new Thread(new ThreadStart(MessageHandlerThread));
+ _messageHandlerThread.IsBackground = true;
+ _messageHandlerThread.Name = "IR Server Message Queue";
+ _messageHandlerThread.Start();
+ }
+ void StopMessageQueue()
+ {
+ _processMessageQueue = false;
+
+ try
+ {
+ if (_messageHandlerThread != null && _messageHandlerThread.IsAlive)
+ _messageHandlerThread.Abort();
+ }
+ catch { }
+
+ _messageQueue.Clear();
+ _messageQueue = null;
+ }
+
bool StartRelay()
{
bool retry = false;
@@ -344,8 +379,6 @@
bool StartRepeater()
{
- _registeredRepeaters = new List<Client>();
-
bool retry = false;
int pipeNumber = 1;
string localPipeTest;
@@ -530,7 +563,6 @@
UnregisterClient(pipe, server);
}
}
-
void SendToRepeaters(PipeMessage message)
{
IrssLog.Debug("SendToRepeaters({0})", message.ToString());
@@ -902,7 +934,9 @@
PipeMessage response = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Server Shutdown", null);
SendToAll(response);
}
+
Stop();
+ Application.Exit();
break;
}
@@ -1001,10 +1035,27 @@
catch { }
}
+ void ClickSetup(object sender, EventArgs e)
+ {
+ IrssLog.Info("Setup");
+
+ if (_inConfiguration)
+ return;
+
+ Stop();
+
+ if (Configure())
+ SaveSettings();
+
+ Start();
+ }
void ClickQuit(object sender, EventArgs e)
{
IrssLog.Info("Quit");
+ if (_inConfiguration)
+ return;
+
if (_mode == IRServerMode.ServerMode)
{
PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Server Shutdown", null);
@@ -1012,8 +1063,54 @@
}
Stop();
+ Application.Exit();
}
+ void LoadSettings()
+ {
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value);
+ _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value;
+ _pluginName = doc.DocumentElement.Attributes["Plugin"].Value;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _mode = IRServerMode.ServerMode;
+ _hostComputer = String.Empty;
+ _pluginName = String.Empty;
+ }
+ }
+ void SaveSettings()
+ {
+ try
+ {
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("Mode", Enum.GetName(typeof(IRServerMode), _mode));
+ writer.WriteAttributeString("HostComputer", _hostComputer);
+ writer.WriteAttributeString("Plugin", _pluginName);
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
#endregion Implementation
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -16,86 +16,22 @@
static class Program
{
- enum ErrorCode : int
- {
- None = 0,
- InvalidCommandLine = 1,
- MultipleInstances = 2,
- FailedToStart = 3,
- Other = 127
- }
-
- /// <summary>
- /// Entry point for IR Server
- /// </summary>
- /// <param name="args">Command line arguments
- /// /c = configure the IR Server
- /// /k = kill the server
- /// /? = show command line parameters
- /// </param>
- /// <returns>Exit code to show what happened
- /// 0 = Successful
- /// 1 = Invalid command line arguments
- /// 2 = Multiple instances
- /// 3 = Failed to start
- /// 4 = Other failure
- /// </returns>
[STAThread]
static int Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- // Process Command Line Arguments
- if (args.Length == 1)
- {
- switch(args[0])
- {
- case "--help":
- case "-help":
- case "/help":
- case "-?":
- case "/?":
- MessageBox.Show(
-@"Command Line Parameters:
-
-/c = configure the IR Server
-/k = kill the server
-/? = show command line parameters",
- "IR Server", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return (int)ErrorCode.None;
-
- case "-configure":
- case "/configure":
- case "-c":
- case "/c":
- return Configure();
-
- case "-kill":
- case "/kill":
- case "-k":
- case "/k":
- return Kill();
-
- default:
- return (int)ErrorCode.InvalidCommandLine;
- }
- }
- else if (args.Length > 1)
- {
- return (int)ErrorCode.InvalidCommandLine;
- }
-
// Check for multiple instances
try
{
- if (IsMultipleInstances())
- return (int)ErrorCode.MultipleInstances;
+ if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1)
+ return 1;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
- return (int)ErrorCode.Other;
+ return 1;
}
// Open log file
@@ -109,103 +45,41 @@
catch (Exception ex)
{
Console.WriteLine(ex.Message);
- return (int)ErrorCode.Other;
+ return 1;
}
// Start Server
- IRServer transceiverServer = new IRServer();
+ IRServer irServer = new IRServer();
- if (transceiverServer.Start())
+ if (irServer.Start())
{
Application.Run();
IrssLog.Close();
- return (int)ErrorCode.None;
+ return 0;
}
else
{
MessageBox.Show("Failed to start IR Server, refer to log file for more details.", "IR Server", MessageBoxButtons.OK, MessageBoxIcon.Error);
IrssLog.Close();
- return (int)ErrorCode.FailedToStart;
+ return 1;
}
}
- static bool IsMultipleInstances()
- {
- return (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1);
- }
-
- static int Configure()
- {
- RegistryKey key = null;
-
- try
- {
- key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\IRServer");
-
- Config config = new Config();
- config.Mode = (IRServerMode)key.GetValue("Mode", (int)IRServerMode.ServerMode);
- config.HostComputer = (string)key.GetValue("HostComputer", String.Empty);
- config.Plugin = (string)key.GetValue("Plugin", String.Empty);
-
- if (config.ShowDialog() == DialogResult.OK)
- {
- key.SetValue("Mode", (int)config.Mode);
- key.SetValue("HostComputer", config.HostComputer);
- key.SetValue("Plugin", config.Plugin);
-
- if (IsMultipleInstances())
- MessageBox.Show("You must restart the IR Server for any settings changes to take effect.", "IR Server", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
-
- key.Close();
- }
- catch (Exception ex)
- {
- if (key != null)
- key.Close();
-
- MessageBox.Show(ex.Message, "IR Server - Configuration Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return (int)ErrorCode.Other;
- }
-
- return (int)ErrorCode.None;
- }
- static int Kill()
- {
- try
- {
- Process[] processes = Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName);
- foreach (Process proc in processes)
- if (proc.Id != Process.GetCurrentProcess().Id)
- proc.Kill();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "IR Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- return (int)ErrorCode.Other;
- }
-
- return (int)ErrorCode.None;
- }
-
/// <summary>
- /// Retreives a list of available IR Server plugins
+ /// Retreives a list of available IR Server plugins.
/// </summary>
- /// <returns>Array of plugin instances</returns>
+ /// <returns>Array of plugin instances.</returns>
internal static IIRServerPlugin[] AvailablePlugins()
{
try
{
List<IIRServerPlugin> plugins = new List<IIRServerPlugin>();
- RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
- string installFolder = (string)registryKey.GetValue("Install_Dir", String.Empty);
- registryKey.Close();
-
- if (string.IsNullOrEmpty(installFolder))
+ string installFolder = SystemRegistry.GetInstallFolder();
+ if (String.IsNullOrEmpty(installFolder))
return null;
string[] files = Directory.GetFiles(installFolder + "\\IR Server Plugins\\", "*.dll", SearchOption.TopDirectoryOnly);
@@ -239,7 +113,7 @@
MessageBox.Show(ex.ToString(), "IR Server Unexpected Error");
}
}
-
+
return plugins.ToArray();
}
catch (Exception ex)
@@ -249,6 +123,31 @@
}
}
+ /// <summary>
+ /// Retreives a plugin instance given the plugin name.
+ /// </summary>
+ /// <param name="pluginName">Name of plugin to instantiate.</param>
+ /// <returns>Plugin instance.</returns>
+ internal static IIRServerPlugin GetPlugin(string pluginName)
+ {
+ if (String.IsNullOrEmpty(pluginName))
+ return null;
+
+ IIRServerPlugin[] serverPlugins = AvailablePlugins();
+ if (serverPlugins == null)
+ return null;
+
+ foreach (IIRServerPlugin plugin in serverPlugins)
+ {
+ if (plugin.Name == pluginName)
+ {
+ return plugin;
+ }
+ }
+
+ return null;
+ }
+
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -16,6 +16,8 @@
#region Variables
+ string _serverHost;
+
List<ButtonMapping> _systemWideMappings;
List<ProgramSettings> _programSettings;
List<MappedEvent> _mappedEvents;
@@ -24,6 +26,13 @@
#region Properties
+ [XmlElement]
+ public string ServerHost
+ {
+ get { return _serverHost; }
+ set { _serverHost = value; }
+ }
+
[XmlArray]
public List<ButtonMapping> SystemWideMappings
{
@@ -51,6 +60,8 @@
public Configuration()
{
+ _serverHost = String.Empty;
+
_systemWideMappings = new List<ButtonMapping>();
_programSettings = new List<ProgramSettings>();
_mappedEvents = new List<MappedEvent>();
@@ -78,7 +89,7 @@
}
catch (Exception ex)
{
- IrssLog.Error(ex.Message);
+ IrssLog.Error(ex.ToString());
return false;
}
}
@@ -98,7 +109,7 @@
}
catch (Exception ex)
{
- IrssLog.Error(ex.Message);
+ IrssLog.Error(ex.ToString());
return null;
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -8,8 +8,6 @@
using System.Text;
using System.Windows.Forms;
-using Microsoft.Win32;
-
using IrssUtils;
using IrssUtils.Forms;
@@ -99,9 +97,7 @@
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
- checkBoxAutoRun.Checked = (key.GetValue("Translator", null) != null);
- key.Close();
+ checkBoxAutoRun.Checked = SystemRegistry.GetAutoRun("Translator");
}
catch { }
}
@@ -652,12 +648,10 @@
private void checkBoxAutoRun_CheckedChanged(object sender, EventArgs e)
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
if (checkBoxAutoRun.Checked)
- key.SetValue("Translator", Application.ExecutablePath);
- else if (key.GetValue("Translator", null) != null)
- key.DeleteValue("Translator");
- key.Close();
+ SystemRegistry.SetAutoRun("Translator", Application.ExecutablePath);
+ else
+ SystemRegistry.RemoveAutoRun("Translator");
}
private void buttonAddEvent_Click(object sender, EventArgs e)
@@ -862,14 +856,12 @@
}
private void serverToolStripMenuItem_Click(object sender, EventArgs e)
{
- IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(Program.ServerHost);
+ IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(Program.Config.ServerHost);
if (serverAddress.ShowDialog(this) == DialogResult.OK)
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\Translator");
- key.SetValue("ServerHost", serverAddress.ServerHost);
- key.Close();
-
- MessageBox.Show(this, "Changes to the Server Host will not take effect until the program is restarted", "Note", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ Program.StopComms();
+ Program.Config.ServerHost = serverAddress.ServerHost;
+ Program.StartComms();
}
}
private void quitToolStripMenuItem_Click(object sender, EventArgs e)
@@ -878,12 +870,14 @@
}
private void translatorHelpToolStripMenuItem_Click(object sender, EventArgs e)
{
- RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
- string installFolder = (string)registryKey.GetValue("Install_Dir", String.Empty);
- registryKey.Close();
-
- Help.ShowHelp(this, installFolder + "\\IR Server Suite.chm");
- // , HelpNavigator.Topic, "index.html"
+ try
+ {
+ Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "Translator");
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(this, ex.Message, "Failed to load help", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -97,7 +97,6 @@
static Configuration _config;
- static string _serverHost = String.Empty;
static string _localPipeName = String.Empty;
static string _learnIRFilename = null;
@@ -116,12 +115,6 @@
#region Properties
- internal static string ServerHost
- {
- get { return _serverHost; }
- set { _serverHost = value; }
- }
-
internal static Configuration Config
{
get { return _config; }
@@ -165,25 +158,21 @@
IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\Translator");
- _serverHost = (string)key.GetValue("ServerHost", String.Empty);
- key.Close();
+ _config = Configuration.Load(ConfigFile);
+ if (_config == null)
+ _config = new Configuration();
- if (String.IsNullOrEmpty(_serverHost))
+ if (String.IsNullOrEmpty(_config.ServerHost))
{
- IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(_serverHost);
+ IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(_config.ServerHost);
if (serverAddress.ShowDialog() == DialogResult.OK)
{
- _serverHost = serverAddress.ServerHost;
- SaveOptions();
+ _config.ServerHost = serverAddress.ServerHost;
+ Configuration.Save(_config, ConfigFile);
}
}
- _config = Configuration.Load(ConfigFile);
- if (_config == null)
- _config = new Configuration();
-
// Setup notify icon ...
_notifyIcon = new NotifyIcon();
_notifyIcon.ContextMenuStrip = new ContextMenuStrip();
@@ -249,13 +238,6 @@
}
- internal static void SaveOptions()
- {
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\Translator");
- key.SetValue("ServerHost", _serverHost);
- key.Close();
- }
-
internal static void UpdateNotifyMenu()
{
_notifyIcon.ContextMenuStrip.Items.Clear();
@@ -333,7 +315,7 @@
Application.Exit();
}
- static bool StartComms()
+ internal static bool StartComms()
{
try
{
@@ -354,7 +336,7 @@
return false;
}
- static void StopComms()
+ internal static void StopComms()
{
_notifyIcon.Visible = false;
@@ -362,7 +344,7 @@
try
{
- if (_keepAliveThread != null)
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
_keepAliveThread.Abort();
}
catch { }
@@ -374,7 +356,7 @@
_registered = false;
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Unregister", null);
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ PipeAccess.SendMessage(Common.ServerPipeName, _config.ServerHost, message.ToString());
}
}
catch { }
@@ -430,7 +412,7 @@
try
{
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Register", null);
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ PipeAccess.SendMessage(Common.ServerPipeName, _config.ServerHost, message.ToString());
return true;
}
catch (AppModule.NamedPipes.NamedPipeIOException)
@@ -462,7 +444,7 @@
#region Connect to server
- IrssLog.Info("Connecting ({0}) ...", _serverHost);
+ IrssLog.Info("Connecting ({0}) ...", _config.ServerHost);
attempt = 0;
while (_keepAlive && reconnect)
{
@@ -511,7 +493,7 @@
if (_keepAlive && _registered && !reconnect)
{
- IrssLog.Info("Connected ({0})", _serverHost);
+ IrssLog.Info("Connected ({0})", _config.ServerHost);
_notifyIcon.Icon = Properties.Resources.Icon16;
_notifyIcon.Text = "Translator";
@@ -529,7 +511,7 @@
while (_keepAlive && _registered && !reconnect)
{
- IrssLog.Info("Ping ({0})", _serverHost);
+ IrssLog.Info("Ping ({0})", _config.ServerHost);
int pingID = random.Next();
long pingTime = DateTime.Now.Ticks;
@@ -537,7 +519,7 @@
try
{
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Ping", BitConverter.GetBytes(pingID));
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ PipeAccess.SendMessage(Common.ServerPipeName, _config.ServerHost, message.ToString());
}
catch
{
@@ -910,7 +892,7 @@
_learnIRFilename = fileName;
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Learn", null);
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ PipeAccess.SendMessage(Common.ServerPipeName, _config.ServerHost, message.ToString());
}
catch (Exception ex)
{
@@ -948,7 +930,7 @@
file.Close();
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Blast", outData);
- PipeAccess.SendMessage(Common.ServerPipeName, ServerHost, message.ToString());
+ PipeAccess.SendMessage(Common.ServerPipeName, _config.ServerHost, message.ToString());
}
/// <summary>
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -2,8 +2,6 @@
using System.Diagnostics;
using System.Windows.Forms;
-using Microsoft.Win32;
-
using IrssUtils;
namespace TrayLauncher
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -19,7 +19,7 @@
#region Variables
OpenFileDialog openFileDialog;
- string _launchButton;
+ string _launchKeyCode;
#endregion Variables
@@ -45,10 +45,10 @@
get { return checkBoxLaunchOnLoad.Checked; }
set { checkBoxLaunchOnLoad.Checked = value; }
}
- public string LaunchButton
+ public string LaunchKeyCode
{
- get { return _launchButton; }
- set { _launchButton = value; }
+ get { return _launchKeyCode; }
+ set { _launchKeyCode = value; }
}
#endregion Properties
@@ -108,7 +108,7 @@
if (String.IsNullOrEmpty(keyCode))
return;
- _launchButton = keyCode;
+ _launchKeyCode = keyCode;
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -7,9 +7,8 @@
using System.Text;
using System.Threading;
using System.Windows.Forms;
+using System.Xml;
-using Microsoft.Win32;
-
using NamedPipes;
using IrssUtils;
@@ -19,16 +18,14 @@
public class Tray : Form
{
- #region Properties
+ #region Constants
- internal static Common.MessageHandler HandleMessage
- {
- get { return _handleMessage; }
- set { _handleMessage = value; }
- }
+ const string DefaultKeyCode = "31730";
- #endregion Properties
-
+ public static readonly string ConfigurationFile = Common.FolderAppData + "Tray Launcher\\Tray Launcher.xml";
+
+ #endregion Constants
+
#region Variables
static Common.MessageHandler _handleMessage = null;
@@ -49,24 +46,28 @@
NotifyIcon _notifyIcon;
#endregion Variables
-
- #region Constants
- const string DefaultKeyCode = "31730";
+ #region Properties
- #endregion Constants
+ internal static Common.MessageHandler HandleMessage
+ {
+ get { return _handleMessage; }
+ set { _handleMessage = value; }
+ }
+ #endregion Properties
+
#region Constructor
public Tray()
{
- ContextMenu contextMenu = new ContextMenu();
- contextMenu.MenuItems.Add(new MenuItem("Launch", ClickLaunch));
- contextMenu.MenuItems.Add(new MenuItem("Setup", ClickSetup));
- contextMenu.MenuItems.Add(new MenuItem("Quit", ClickQuit));
+ ContextMenuStrip contextMenu = new ContextMenuStrip();
+ contextMenu.Items.Add(new ToolStripMenuItem("&Launch", null, new EventHandler(ClickLaunch)));
+ contextMenu.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup)));
+ contextMenu.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
_notifyIcon = new NotifyIcon();
- _notifyIcon.ContextMenu = contextMenu;
+ _notifyIcon.ContextMenuStrip = contextMenu;
_notifyIcon.Icon = Properties.Resources.Icon16Connecting;
_notifyIcon.Text = "Tray Launcher - Connecting ...";
_notifyIcon.DoubleClick += new EventHandler(ClickSetup);
@@ -80,7 +81,7 @@
{
try
{
- LoadSetup();
+ LoadSettings();
bool didSetup = false;
if (String.IsNullOrEmpty(_programFile) || String.IsNullOrEmpty(_serverHost))
@@ -118,7 +119,7 @@
try
{
- if (_keepAliveThread != null)
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
_keepAliveThread.Abort();
}
catch { }
@@ -143,51 +144,70 @@
catch { }
}
- void LoadSetup()
+ void LoadSettings()
{
- IrssLog.Info("Load Setup");
+ try
+ {
+ _autoRun = SystemRegistry.GetAutoRun("Tray Launcher");
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ _autoRun = false;
+ }
+
try
{
- RegistryKey key;
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
- key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
- _autoRun = (key.GetValue("Tray Launcher", null) != null);
- key.Close();
-
- key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\TrayLauncher");
- _serverHost = (string)key.GetValue("ServerHost", String.Empty);
- _programFile = (string)key.GetValue("Launch", String.Empty);
- _launchOnLoad = bool.Parse((string)key.GetValue("LaunchOnLoad", "False"));
- _launchKeyCode = (string)key.GetValue("LaunchButton", DefaultKeyCode);
- key.Close();
+ _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value;
+ _programFile = doc.DocumentElement.Attributes["ProgramFile"].Value;
+ _launchOnLoad = bool.Parse(doc.DocumentElement.Attributes["LaunchOnLoad"].Value);
+ _launchKeyCode = doc.DocumentElement.Attributes["LaunchKeyCode"].Value;
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
+
+ _serverHost = String.Empty;
+ _programFile = String.Empty;
+ _launchOnLoad = false;
+ _launchKeyCode = DefaultKeyCode;
}
}
- void SaveSetup()
+ void SaveSettings()
{
- IrssLog.Info("Save Setup");
+ try
+ {
+ if (_autoRun)
+ SystemRegistry.SetAutoRun("Tray Launcher", Application.ExecutablePath);
+ else
+ SystemRegistry.RemoveAutoRun("Tray Launcher");
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
try
{
- RegistryKey key;
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
- key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
- if (_autoRun)
- key.SetValue("Tray Launcher", Application.ExecutablePath);
- else if (key.GetValue("Tray Launcher", null) != null)
- key.DeleteValue("Tray Launcher");
- key.Close();
+ writer.WriteAttributeString("ServerHost", _serverHost);
+ writer.WriteAttributeString("ProgramFile", _programFile);
+ writer.WriteAttributeString("LaunchOnLoad", _launchOnLoad.ToString());
+ writer.WriteAttributeString("LaunchKeyCode", _launchKeyCode);
- key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\TrayLauncher");
- key.SetValue("ServerHost", _serverHost);
- key.SetValue("Launch", _programFile);
- key.SetValue("LaunchOnLoad", _launchOnLoad.ToString());
- key.SetValue("LaunchButton", _launchKeyCode);
- key.Close();
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
}
catch (Exception ex)
{
@@ -195,7 +215,6 @@
}
}
-
bool OpenLocalPipe()
{
try
@@ -388,7 +407,6 @@
}
-
void ReceivedMessage(string message)
{
PipeMessage received = PipeMessage.FromString(message);
@@ -457,7 +475,6 @@
}
}
-
void RemoteButtonPressed(string keyCode)
{
IrssLog.Info("Remote Button: {0}", keyCode);
@@ -471,24 +488,25 @@
IrssLog.Info("Setup");
Setup setup = new Setup();
- setup.ServerHost = _serverHost;
- setup.ProgramFile = _programFile;
- setup.AutoRun = _autoRun;
- setup.LaunchOnLoad = _launchOnLoad;
- setup.LaunchButton = _launchKeyCode;
+ setup.AutoRun = _autoRun;
+ setup.ServerHost = _serverHost;
+ setup.ProgramFile = _programFile;
+ setup.LaunchOnLoad = _launchOnLoad;
+ setup.LaunchKeyCode = _launchKeyCode;
+
if (setup.ShowDialog() == DialogResult.OK)
{
if (PipeAccess.ServerRunning && _serverHost != setup.ServerHost)
MessageBox.Show(this, "Changes to the server host address may not take effect until you restart Tray Launcher", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- _serverHost = setup.ServerHost;
- _programFile = setup.ProgramFile;
- _autoRun = setup.AutoRun;
- _launchOnLoad = setup.LaunchOnLoad;
- _launchKeyCode = setup.LaunchButton;
+ _autoRun = setup.AutoRun;
+ _serverHost = setup.ServerHost;
+ _programFile = setup.ProgramFile;
+ _launchOnLoad = setup.LaunchOnLoad;
+ _launchKeyCode = setup.LaunchKeyCode;
- SaveSetup();
+ SaveSettings();
}
}
void ClickLaunch(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -10,8 +10,6 @@
using System.Windows.Forms;
using System.Xml;
-using Microsoft.Win32;
-
using NamedPipes;
using IrssUtils;
@@ -21,76 +19,12 @@
public partial class MainForm : Form
{
- #region Enumerations
-
- /// <summary>
- /// A list of MCE remote buttons
- /// </summary>
- public enum MceButton
- {
- Custom = -1,
- None = 0,
- TV_Power = 0x7b9a,
- Blue = 0x7ba1,
- Yellow = 0x7ba2,
- Green = 0x7ba3,
- Red = 0x7ba4,
- Teletext = 0x7ba5,
- Radio = 0x7baf,
- Print = 0x7bb1,
- Videos = 0x7bb5,
- Pictures = 0x7bb6,
- Recorded_TV = 0x7bb7,
- Music = 0x7bb8,
- TV = 0x7bb9,
- Guide = 0x7bd9,
- Live_TV = 0x7bda,
- DVD_Menu = 0x7bdb,
- Back = 0x7bdc,
- OK = 0x7bdd,
- Right = 0x7bde,
- Left = 0x7bdf,
- Down = 0x7be0,
- Up = 0x7be1,
- Star = 0x7be2,
- Hash = 0x7be3,
- Replay = 0x7be4,
- Skip = 0x7be5,
- Stop = 0x7be6,
- Pause = 0x7be7,
- Record = 0x7be8,
- Play = 0x7be9,
- Rewind = 0x7bea,
- Forward = 0x7beb,
- Channel_Down = 0x7bec,
- Channel_Up = 0x7bed,
- Volume_Down = 0x7bee,
- Volume_Up = 0x7bef,
- Info = 0x7bf0,
- Mute = 0x7bf1,
- Start = 0x7bf2,
- PC_Power = 0x7bf3,
- Enter = 0x7bf4,
- Escape = 0x7bf5,
- Number_9 = 0x7bf6,
- Number_8 = 0x7bf7,
- Number_7 = 0x7bf8,
- Number_6 = 0x7bf9,
- Number_5 = 0x7bfa,
- Number_4 = 0x7bfb,
- Number_3 = 0x7bfc,
- Number_2 = 0x7bfd,
- Number_1 = 0x7bfe,
- Number_0 = 0x7bff,
- }
-
- #endregion Enumerations
-
#region Constants
const string DefaultSkin = "MCE";
- const string DefaultIntallFolder = ".";
+ public static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml";
+
#endregion Constants
#region Variables
@@ -197,34 +131,52 @@
{
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\VirtualRemote");
- _remoteSkin = (string)key.GetValue("Skin", DefaultSkin);
- _serverHost = (string)key.GetValue("ServerHost", String.Empty);
- key.Close();
+ _installFolder = SystemRegistry.GetInstallFolder();
+ if (String.IsNullOrEmpty(_installFolder))
+ _installFolder = ".";
+ else
+ _installFolder += "\\Virtual Remote";
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
- key = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
- _installFolder = (string)key.GetValue("Install_Dir", DefaultIntallFolder);
- key.Close();
+ _installFolder = ".";
+ }
- if (_installFolder != DefaultIntallFolder)
- _installFolder += "\\Virtual Remote";
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value;
+ _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value;
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
- _remoteSkin = DefaultSkin;
- _serverHost = String.Empty;
- _installFolder = DefaultIntallFolder;
+
+ _serverHost = String.Empty;
+ _remoteSkin = DefaultSkin;
}
}
void SaveSettings()
{
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\VirtualRemote");
- key.SetValue("Skin", _remoteSkin);
- key.SetValue("ServerHost", _serverHost);
- key.Close();
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerHost", _serverHost);
+ writer.WriteAttributeString("Skin", _remoteSkin);
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
}
catch (Exception ex)
{
@@ -250,14 +202,13 @@
return false;
}
-
void StopComms()
{
_keepAlive = false;
try
{
- if (_keepAliveThread != null)
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
_keepAliveThread.Abort();
}
catch { }
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -8,8 +8,6 @@
using System.Windows.Forms;
using System.Xml;
-using Microsoft.Win32;
-
using NamedPipes;
using IrssUtils;
@@ -19,6 +17,12 @@
public partial class MainForm : Form
{
+ #region Constants
+
+ public static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote Skin Editor\\Virtual Remote Skin Editor.xml";
+
+ #endregion Constants
+
#region Variables
//static bool _keepAlive = true;
@@ -238,13 +242,15 @@
{
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\VirtualRemoteSkinEditor");
- _serverHost = (string)key.GetValue("ServerHost", String.Empty);
- key.Close();
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value;
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
+
_serverHost = String.Empty;
}
}
@@ -252,13 +258,22 @@
{
try
{
- RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\and-81\VirtualRemoteSkinEditor");
- key.SetValue("ServerHost", _serverHost);
- key.Close();
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerHost", _serverHost);
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
}
catch (Exception ex)
{
- IrssLog.Error(ex.Message);
+ IrssLog.Error(ex.ToString());
}
}
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-05-16 07:37:02 UTC (rev 403)
@@ -86,6 +86,7 @@
</Compile>
<Compile Include="IrssLog.cs" />
<Compile Include="Mouse.cs" />
+ <Compile Include="SystemRegistry.cs" />
<Compile Include="TransceiverInfo.cs" />
<Compile Include="Win32.cs" />
<Compile Include="XML.cs" />
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/SystemRegistry.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/SystemRegistry.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/SystemRegistry.cs 2007-05-16 07:37:02 UTC (rev 403)
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+using Microsoft.Win32;
+
+namespace IrssUtils
+{
+
+ public static class SystemRegistry
+ {
+
+ const string AutoRunPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
+
+ /// <summary>
+ /// Get the install folder for IR Server Suite.
+ /// </summary>
+ /// <returns>String containing the Install Folder (no trailing slash).</returns>
+ public static string GetInstallFolder()
+ {
+ RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\IR Server Suite\\");
+ string installFolder = registryKey.GetValue("Install_Dir", null) as string;
+ registryKey.Close();
+
+ return installFolder;
+ }
+
+ /// <summary>
+ /// Returns a boolean value indicating if there is an auto-run in place for the specified name.
+ /// </summary>
+ /// <param name="name">Auto-run program name.</param>
+ /// <returns>If key of name exists return true else return false.</returns>
+ public static bool GetAutoRun(string name)
+ {
+ RegistryKey key = Registry.CurrentUser.CreateSubKey(AutoRunPath);
+ bool autoRun = (key.GetValue(name, null) != null);
+ key.Close();
+
+ return autoRun;
+ }
+
+ /// <summary>
+ /// Setup an auto-run in the system registry.
+ /// </summary>
+ /// <param name="name">Auto-run program name.</param>
+ /// <param name="executablePath">Executable Path for program.</param>
+ public static void SetAutoRun(string name, string executablePath)
+ {
+ RegistryKey key = Registry.CurrentUser.CreateSubKey(AutoRunPath);
+ key.SetValue(name, executablePath, RegistryValueKind.String);
+ key.Close();
+ }
+
+ /// <summary>
+ /// Remove an auto-run from the system registry.
+ /// </summary>
+ /// <param name="name">Auto-run program name.</param>
+ public static void RemoveAutoRun(string name)
+ {
+ RegistryKey key = Registry.CurrentUser.CreateSubKey(AutoRunPath);
+ key.DeleteValue(name, false);
+ key.Close();
+ }
+
+ }
+
+}
Modified: trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj 2007-05-16 07:37:02 UTC (rev 403)
@@ -35,7 +35,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG</DefineConstants>
- <DocumentationFile>AppModule.InterProcessComm.xml</DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
Modified: trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj 2007-05-16 07:37:02 UTC (rev 403)
@@ -35,7 +35,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>DEBUG</DefineConstants>
- <DocumentationFile>AppModule.NamedPipes.xml</DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
<DebugSymbols>false</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2007-05-16 07:37:02 UTC (rev 403)
@@ -32,7 +32,8 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
- <DocumentationFile>bin\Release\IRServerPluginInterface.xml</DocumentationFile>
+ <DocumentationFile>
+ </DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-05-15 06:15:21 UTC (rev 402)
+++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-05-16 07:37:02 UTC (rev 403)
@@ -33,8 +33,6 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TV3 Blaster Plugin", "MediaPortal Plugins\TV3 Blaster Plugin\TV3 Blaster Plugin.csproj", "{CD395FC2-70E2-42C4-8A20-5469A0C5EB50}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IR Server Plugin Interface", "IR Server Plugins\IR Server Plugin Interface\IR Server Plugin Interface.csproj", "{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IgorPlug USB Receiver", "IR Server Plugins\IgorPlug USB Receiver\IgorPlug USB Receiver.csproj", "{A4023992-CCD6-461E-8E14-219A496734C5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IRMan Receiver", "IR Server Plugins\IRMan Receiver\IRMan Receiver.csproj", "{7C686499-7517-4338-8837-7E8617549D9A}"
@@ -65,6 +63,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MPUtils", "Common\MPUtils\MPUtils.csproj", "{08F57DD7-2C6E-484E-9CC5-835F70C5BC64}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IR Server Plugin Interface", "IR Server Plugins\IR Server Plugin Interface\IR Server Plugin Interface.csproj", "{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -119,10 +119,6 @@
{CD395FC2-70E2-42C4-8A20-5469A0C5EB50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD395FC2-70E2-42C4-8A20-5469A0C5EB50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD395FC2-70E2-42C4-8A20-5469A0C5EB50}.Release|Any CPU.Build.0 = Release|Any CPU
...
[truncated message content] |
|
From: <an...@us...> - 2007-05-18 18:02:52
|
Revision: 406
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=406&view=rev
Author: and-81
Date: 2007-05-18 11:02:50 -0700 (Fri, 18 May 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -45,7 +45,10 @@
comboBoxCommands.Items.Add(Common.UITextSerial);
comboBoxCommands.Items.Add(Common.UITextMessage);
comboBoxCommands.Items.Add(Common.UITextKeys);
-
+ //TODO: Add Shutdown and Reboot
+ comboBoxCommands.Items.Add(Common.UITextStandby);
+ comboBoxCommands.Items.Add(Common.UITextHibernate);
+
string[] irList = Common.GetIRList(true);
if (irList != null && irList.Length > 0)
comboBoxCommands.Items.AddRange(irList);
@@ -96,6 +99,16 @@
writer.WriteAttributeString("command", Common.XmlTagKeys);
writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixKeys.Length));
}
+ else if (item.StartsWith(Common.CmdPrefixStandby))
+ {
+ writer.WriteAttributeString("command", Common.XmlTagStandby);
+ writer.WriteAttributeString("cmdproperty", String.Empty);
+ }
+ else if (item.StartsWith(Common.CmdPrefixHibernate))
+ {
+ writer.WriteAttributeString("command", Common.XmlTagHibernate);
+ writer.WriteAttributeString("cmdproperty", String.Empty);
+ }
writer.WriteEndElement();
}
@@ -148,6 +161,14 @@
case Common.XmlTagKeys:
listBoxMacro.Items.Add(Common.CmdPrefixKeys + commandProperty);
break;
+
+ case Common.XmlTagStandby:
+ listBoxMacro.Items.Add(Common.CmdPrefixStandby);
+ break;
+
+ case Common.XmlTagHibernate:
+ listBoxMacro.Items.Add(Common.CmdPrefixHibernate);
+ break;
}
}
}
@@ -211,6 +232,14 @@
listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString);
}
+ else if (selected == Common.UITextStandby)
+ {
+ listBoxMacro.Items.Add(Common.CmdPrefixStandby);
+ }
+ else if (selected == Common.UITextHibernate)
+ {
+ listBoxMacro.Items.Add(Common.CmdPrefixHibernate);
+ }
else
{
BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -858,6 +858,18 @@
Common.ProcessKeyCommand(commandProperty);
break;
}
+
+ case Common.XmlTagStandby:
+ {
+ Application.SetSuspendState(PowerState.Suspend, true, false);
+ break;
+ }
+
+ case Common.XmlTagHibernate:
+ {
+ Application.SetSuspendState(PowerState.Hibernate, true, false);
+ break;
+ }
}
}
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -247,15 +247,8 @@
InConfiguration = false;
- if (StartComms())
- {
- Log.Debug("MPBlastZonePlugin: Connected to IR Server host \"{0}\"", ServerHost);
- }
- else
- {
- Log.Error("MPBlastZonePlugin: Failed to start local comms");
- Log.Error("MPBlastZonePlugin: IR blasting is disabled for this session");
- }
+ if (!StartComms())
+ Log.Error("MPBlastZonePlugin: Failed to start local comms, IR blasting is disabled for this session");
if (LogVerbose)
Log.Info("MPBlastZonePlugin: Started");
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -231,17 +231,11 @@
if (MultiMappingEnabled)
LoadMultiMappings();
- if (StartComms())
- {
- Log.Debug("MPControlPlugin: Connected to IR Server host \"{0}\"", ServerHost);
- RemoteButtonListener = new RemoteButtonHandler(RemoteButtonPressed);
- }
- else
- {
- Log.Error("MPControlPlugin: Failed to connect to server on host \"{0}\"", ServerHost);
- Log.Error("MPControlPlugin: Remote button reception and IR blasting are disabled for this session");
- }
+ if (!StartComms())
+ Log.Error("MPControlPlugin: Failed to start local comms, IR input and IR blasting is disabled for this session");
+ RemoteButtonListener += new RemoteButtonHandler(RemoteButtonPressed);
+
// Load the event mapper mappings
if (EventMapperEnabled)
{
@@ -269,6 +263,8 @@
//SystemEvents.SessionEnding -= new SessionEndingEventHandler(SystemEvents_SessionEnding);
SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
+ RemoteButtonListener -= new RemoteButtonHandler(RemoteButtonPressed);
+
if (EventMapperEnabled)
MapEvent(MappedEvent.MappingEvent.MediaPortal_Stop);
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -129,15 +129,8 @@
LoadExternalConfigs();
- if (StartComms())
- {
- Log.Debug("TV2BlasterPlugin: Connected to IR Server host \"{0}\"", ServerHost);
- }
- else
- {
- Log.Error("TV2BlasterPlugin: Failed to connect to server on host \"{0}\"", ServerHost);
- Log.Error("TV2BlasterPlugin: IR blasting is disabled for this session");
- }
+ if (!StartComms())
+ Log.Error("TV2BlasterPlugin: Failed to start local comms, IR blasting is disabled for this session");
// Register with MediaPortal to receive GUI Messages ...
GUIWindowManager.Receivers += new SendMessageHandler(OnMessage);
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-05-16 16:18:40 UTC (rev 405)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-05-18 18:02:50 UTC (rev 406)
@@ -144,15 +144,8 @@
_eventHandler = new TvServerEventHandler(events_OnTvServerEvent);
events.OnTvServerEvent += _eventHandler;
- if (StartComms())
- {
- Log.Debug("TV3BlasterPlugin: Connected to IR Server host \"{0}\"", ServerHost);
- }
- else
- {
- Log.Error("TV3BlasterPlugin: Failed to connect to server on host \"{0}\"", ServerHost);
- Log.Error("TV3BlasterPlugin: IR blasting is disabled for this session");
- }
+ if (!StartComms())
+ Log.Error("TV3BlasterPlugin: Failed to start local comms, IR blasting is disabled for this session");
}
public void Stop()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-06 17:03:07
|
Revision: 489
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=489&view=rev
Author: and-81
Date: 2007-06-06 09:52:56 -0700 (Wed, 06 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs
trunk/plugins/IR Server Suite/Common/MPUtils/ExternalChannelConfig.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.resx
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -111,10 +111,11 @@
while (_plugin == null)
{
_plugin = Program.GetPlugin(_pluginName);
- IrssLog.Warn("Failed to load plugin \"{0}\"", _pluginName);
if (_plugin == null)
{
+ IrssLog.Warn("Failed to load plugin \"{0}\"", _pluginName);
+
if (Configure())
SaveSettings();
else
@@ -282,6 +283,7 @@
return false;
}
+ // Todo: Put in the proper retry system from other apps/plugins
void StartMessageQueue()
{
_processMessageQueue = true;
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -37,6 +37,7 @@
// Open log file
try
{
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "IR Server.log");
@@ -138,12 +139,8 @@
return null;
foreach (IIRServerPlugin plugin in serverPlugins)
- {
- if (plugin.Name == pluginName)
- {
+ if (plugin.Name.Equals(pluginName, StringComparison.InvariantCultureIgnoreCase))
return plugin;
- }
- }
return null;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -153,6 +153,7 @@
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Translator.log");
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2007-06-06 16:52:56 UTC (rev 489)
@@ -65,7 +65,6 @@
<DependentUpon>Setup.cs</DependentUpon>
</Compile>
<Compile Include="Tray.cs">
- <SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -15,7 +15,7 @@
namespace TrayLauncher
{
- public class Tray : Form
+ public class Tray
{
#region Constants
@@ -491,7 +491,7 @@
setup.LaunchOnLoad = _launchOnLoad;
setup.LaunchKeyCode = _launchKeyCode;
- if (setup.ShowDialog(this) == DialogResult.OK)
+ if (setup.ShowDialog() == DialogResult.OK)
{
_autoRun = setup.AutoRun;
_serverHost = setup.ServerHost;
@@ -547,7 +547,7 @@
catch (Exception ex)
{
IrssLog.Error(ex.Message);
- MessageBox.Show(this, ex.Message, "Tray Launcher", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show(ex.Message, "Tray Launcher", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
void ClickQuit(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -27,11 +27,20 @@
#region Static Methods
+ /// <summary>
+ /// Given a drive letter this function returns true if it is a CD-Rom.
+ /// </summary>
+ /// <param name="driveLetter">Drive letter to test.</param>
+ /// <returns>True if the drive is a CD-Rom, else false.</returns>
public static bool IsCDRom(string driveLetter)
{
return (GetDriveType(driveLetter) == DRIVE_CDROM);
}
+ /// <summary>
+ /// Open the tray on the given CD-Rom drive.
+ /// </summary>
+ /// <param name="driveLetter">Drive letter of CD-Rom to open.</param>
public static void Open(string driveLetter)
{
string returnString = "";
@@ -39,6 +48,10 @@
mciSendStringA(command, returnString, 0, 0);
}
+ /// <summary>
+ /// Close the tray on the given CD-Rom drive.
+ /// </summary>
+ /// <param name="driveLetter">Drive letter of CD-Rom to close.</param>
public static void Close(string driveLetter)
{
string returnString = "";
Modified: trunk/plugins/IR Server Suite/Common/MPUtils/ExternalChannelConfig.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/MPUtils/ExternalChannelConfig.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/Common/MPUtils/ExternalChannelConfig.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -12,7 +12,7 @@
#region Constants
- const int DefaultCardID = -1;
+ const int DefaultCardID = 0;
const int DefaultPauseTime = 250;
const bool DefaultSendSelect = false;
@@ -28,19 +28,19 @@
string _fileName;
- int _cardID = -1;
+ int _cardID;
- int _pauseTime = 250;
- bool _sendSelect = false;
- bool _doubleChannelSelect = false;
- int _repeatChannelCommands = 0;
- int _channelDigits = 0;
- int _repeatPauseTime = 1000;
- bool _usePreChangeCommand = false;
+ int _pauseTime;
+ bool _sendSelect;
+ bool _doubleChannelSelect;
+ int _repeatChannelCommands;
+ int _channelDigits;
+ int _repeatPauseTime;
+ bool _usePreChangeCommand;
- string _selectCommand = String.Empty;
- string _preChangeCommand = String.Empty;
- string[] _digits = new string[10];
+ string _selectCommand;
+ string _preChangeCommand;
+ string[] _digits;
#endregion Variables
@@ -212,7 +212,7 @@
ExternalChannelConfig newECC = new ExternalChannelConfig(fileName);
XmlDocument doc = new XmlDocument();
- doc.Load(newECC._fileName);
+ doc.Load(fileName);
newECC.PauseTime = GetInt(doc, "PauseTime", DefaultPauseTime);
newECC.UsePreChangeCommand = GetBool(doc, "UsePreChangeCommand", DefaultUsePreChangeCommand);
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.Designer.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,235 @@
+namespace WinLircReceiver
+{
+ partial class Configure
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.buttonCancel = new System.Windows.Forms.Button();
+ this.toolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.textBoxServerAddress = new System.Windows.Forms.TextBox();
+ this.numericUpDownServerPort = new System.Windows.Forms.NumericUpDown();
+ this.checkBoxStartServer = new System.Windows.Forms.CheckBox();
+ this.textBoxServerPath = new System.Windows.Forms.TextBox();
+ this.buttonLocate = new System.Windows.Forms.Button();
+ this.numericUpDownButtonReleaseTime = new System.Windows.Forms.NumericUpDown();
+ this.labelServerAddress = new System.Windows.Forms.Label();
+ this.labelServerPort = new System.Windows.Forms.Label();
+ this.groupBoxServerDetails = new System.Windows.Forms.GroupBox();
+ this.labelButtonReleaseTime = new System.Windows.Forms.Label();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownServerPort)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonReleaseTime)).BeginInit();
+ this.groupBoxServerDetails.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // buttonOK
+ //
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOK.Location = new System.Drawing.Point(104, 208);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(64, 24);
+ this.buttonOK.TabIndex = 3;
+ this.buttonOK.Text = "OK";
+ this.buttonOK.UseVisualStyleBackColor = true;
+ this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.Location = new System.Drawing.Point(176, 208);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.Size = new System.Drawing.Size(64, 24);
+ this.buttonCancel.TabIndex = 4;
+ this.buttonCancel.Text = "Cancel";
+ this.buttonCancel.UseVisualStyleBackColor = true;
+ this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+ //
+ // textBoxServerAddress
+ //
+ this.textBoxServerAddress.Location = new System.Drawing.Point(128, 24);
+ this.textBoxServerAddress.Name = "textBoxServerAddress";
+ this.textBoxServerAddress.Size = new System.Drawing.Size(96, 20);
+ this.textBoxServerAddress.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxServerAddress, "IP Address for WinLirc server");
+ //
+ // numericUpDownServerPort
+ //
+ this.numericUpDownServerPort.Location = new System.Drawing.Point(128, 56);
+ this.numericUpDownServerPort.Maximum = new decimal(new int[] {
+ 65535,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownServerPort.Name = "numericUpDownServerPort";
+ this.numericUpDownServerPort.Size = new System.Drawing.Size(96, 20);
+ this.numericUpDownServerPort.TabIndex = 3;
+ this.numericUpDownServerPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.toolTips.SetToolTip(this.numericUpDownServerPort, "TCP Port for WinLirc server");
+ //
+ // checkBoxStartServer
+ //
+ this.checkBoxStartServer.AutoSize = true;
+ this.checkBoxStartServer.Location = new System.Drawing.Point(8, 96);
+ this.checkBoxStartServer.Name = "checkBoxStartServer";
+ this.checkBoxStartServer.Size = new System.Drawing.Size(119, 17);
+ this.checkBoxStartServer.TabIndex = 4;
+ this.checkBoxStartServer.Text = "Start WinLirc server";
+ this.toolTips.SetToolTip(this.checkBoxStartServer, "Start the WinLirc server application?");
+ this.checkBoxStartServer.UseVisualStyleBackColor = true;
+ //
+ // textBoxServerPath
+ //
+ this.textBoxServerPath.Location = new System.Drawing.Point(8, 120);
+ this.textBoxServerPath.Name = "textBoxServerPath";
+ this.textBoxServerPath.Size = new System.Drawing.Size(184, 20);
+ this.textBoxServerPath.TabIndex = 5;
+ this.toolTips.SetToolTip(this.textBoxServerPath, "Path to WinLirc server application");
+ //
+ // buttonLocate
+ //
+ this.buttonLocate.AutoEllipsis = true;
+ this.buttonLocate.Location = new System.Drawing.Point(200, 120);
+ this.buttonLocate.Name = "buttonLocate";
+ this.buttonLocate.Size = new System.Drawing.Size(24, 20);
+ this.buttonLocate.TabIndex = 6;
+ this.buttonLocate.Text = "...";
+ this.toolTips.SetToolTip(this.buttonLocate, "Locate WinLirc server application");
+ this.buttonLocate.UseVisualStyleBackColor = true;
+ this.buttonLocate.Click += new System.EventHandler(this.buttonLocate_Click);
+ //
+ // numericUpDownButtonReleaseTime
+ //
+ this.numericUpDownButtonReleaseTime.Location = new System.Drawing.Point(144, 176);
+ this.numericUpDownButtonReleaseTime.Maximum = new decimal(new int[] {
+ 65535,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownButtonReleaseTime.Name = "numericUpDownButtonReleaseTime";
+ this.numericUpDownButtonReleaseTime.Size = new System.Drawing.Size(96, 20);
+ this.numericUpDownButtonReleaseTime.TabIndex = 2;
+ this.numericUpDownButtonReleaseTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.toolTips.SetToolTip(this.numericUpDownButtonReleaseTime, "Button release time");
+ //
+ // labelServerAddress
+ //
+ this.labelServerAddress.Location = new System.Drawing.Point(8, 24);
+ this.labelServerAddress.Name = "labelServerAddress";
+ this.labelServerAddress.Size = new System.Drawing.Size(112, 20);
+ this.labelServerAddress.TabIndex = 0;
+ this.labelServerAddress.Text = "Server address:";
+ this.labelServerAddress.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelServerPort
+ //
+ this.labelServerPort.Location = new System.Drawing.Point(8, 56);
+ this.labelServerPort.Name = "labelServerPort";
+ this.labelServerPort.Size = new System.Drawing.Size(112, 20);
+ this.labelServerPort.TabIndex = 2;
+ this.labelServerPort.Text = "Server port:";
+ this.labelServerPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // groupBoxServerDetails
+ //
+ this.groupBoxServerDetails.Controls.Add(this.buttonLocate);
+ this.groupBoxServerDetails.Controls.Add(this.textBoxServerPath);
+ this.groupBoxServerDetails.Controls.Add(this.checkBoxStartServer);
+ this.groupBoxServerDetails.Controls.Add(this.numericUpDownServerPort);
+ this.groupBoxServerDetails.Controls.Add(this.labelServerAddress);
+ this.groupBoxServerDetails.Controls.Add(this.labelServerPort);
+ this.groupBoxServerDetails.Controls.Add(this.textBoxServerAddress);
+ this.groupBoxServerDetails.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxServerDetails.Name = "groupBoxServerDetails";
+ this.groupBoxServerDetails.Size = new System.Drawing.Size(232, 152);
+ this.groupBoxServerDetails.TabIndex = 0;
+ this.groupBoxServerDetails.TabStop = false;
+ this.groupBoxServerDetails.Text = "WinLirc Server";
+ //
+ // labelButtonReleaseTime
+ //
+ this.labelButtonReleaseTime.Location = new System.Drawing.Point(8, 176);
+ this.labelButtonReleaseTime.Name = "labelButtonReleaseTime";
+ this.labelButtonReleaseTime.Size = new System.Drawing.Size(112, 20);
+ this.labelButtonReleaseTime.TabIndex = 1;
+ this.labelButtonReleaseTime.Text = "Button release time:";
+ this.labelButtonReleaseTime.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // openFileDialog
+ //
+ this.openFileDialog.FileName = "openFileDialog";
+ this.openFileDialog.Filter = "All Files|*.*";
+ this.openFileDialog.Title = "Locate WinLirc server application";
+ //
+ // Configure
+ //
+ this.AcceptButton = this.buttonOK;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.buttonCancel;
+ this.ClientSize = new System.Drawing.Size(248, 241);
+ this.Controls.Add(this.numericUpDownButtonReleaseTime);
+ this.Controls.Add(this.labelButtonReleaseTime);
+ this.Controls.Add(this.groupBoxServerDetails);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(256, 275);
+ this.Name = "Configure";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "WinLirc Configuration";
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownServerPort)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonReleaseTime)).EndInit();
+ this.groupBoxServerDetails.ResumeLayout(false);
+ this.groupBoxServerDetails.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.Button buttonCancel;
+ private System.Windows.Forms.ToolTip toolTips;
+ private System.Windows.Forms.Label labelServerAddress;
+ private System.Windows.Forms.TextBox textBoxServerAddress;
+ private System.Windows.Forms.Label labelServerPort;
+ private System.Windows.Forms.NumericUpDown numericUpDownServerPort;
+ private System.Windows.Forms.GroupBox groupBoxServerDetails;
+ private System.Windows.Forms.TextBox textBoxServerPath;
+ private System.Windows.Forms.CheckBox checkBoxStartServer;
+ private System.Windows.Forms.Button buttonLocate;
+ private System.Windows.Forms.Label labelButtonReleaseTime;
+ private System.Windows.Forms.NumericUpDown numericUpDownButtonReleaseTime;
+ private System.Windows.Forms.OpenFileDialog openFileDialog;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Net;
+using System.Windows.Forms;
+
+namespace WinLircReceiver
+{
+
+ public partial class Configure : Form
+ {
+
+ #region Properties
+
+ public IPAddress ServerIP
+ {
+ get { return IPAddress.Parse(textBoxServerAddress.Text); }
+ set { textBoxServerAddress.Text = value.ToString(); }
+ }
+ public int ServerPort
+ {
+ get { return Decimal.ToInt32(numericUpDownServerPort.Value); }
+ set { numericUpDownServerPort.Value = new Decimal(value); }
+ }
+ public bool StartServer
+ {
+ get { return checkBoxStartServer.Checked; }
+ set { checkBoxStartServer.Checked = value; }
+ }
+ public string ServerPath
+ {
+ get { return textBoxServerPath.Text; }
+ set { textBoxServerPath.Text = value; }
+ }
+ public int ButtonReleaseTime
+ {
+ get { return Decimal.ToInt32(numericUpDownButtonReleaseTime.Value); }
+ set { numericUpDownButtonReleaseTime.Value = new Decimal(value); }
+ }
+
+ #endregion Properties
+
+ #region Constructor
+
+ public Configure()
+ {
+ InitializeComponent();
+ }
+
+ #endregion Constructor
+
+ #region Buttons
+
+ private void buttonOK_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ private void buttonLocate_Click(object sender, EventArgs e)
+ {
+ if (openFileDialog.ShowDialog(this) == DialogResult.OK)
+ textBoxServerPath.Text = openFileDialog.FileName;
+ }
+
+ #endregion Buttons
+
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.resx
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.resx (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Configure.resx 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>107, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,35 @@
+using System;
+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("WinLirc Receiver")]
+[assembly: AssemblyDescription("IR Server plugin to support WinLirc")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("and-81")]
+[assembly: AssemblyProduct("WinLircReceiver")]
+[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)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.3.1")]
+[assembly: AssemblyFileVersion("1.0.3.1")]
+
+[assembly: CLSCompliant(true)]
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,183 @@
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Windows.Forms;
+using System.Xml;
+
+using IRServerPluginInterface;
+
+namespace WinLircReceiver
+{
+
+ public class WinLircReceiver : IIRServerPlugin
+ {
+
+ #region Constants
+
+ static readonly string ConfigurationFile =
+ Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
+ "\\IR Server Suite\\IR Server\\WinLirc Receiver.xml";
+
+ static readonly string[] Ports = new string[] { "None" };
+ static readonly string[] Speeds = new string[] { "None" };
+
+ #endregion Constants
+
+ #region Variables
+
+ RemoteButtonHandler _remoteButtonHandler = null;
+ WinLircServer _server;
+
+ IPAddress _serverIP;
+ int _serverPort;
+ bool _startServer;
+ string _serverPath;
+ int _buttonReleaseTime;
+
+ #endregion Variables
+
+ #region IIRServerPlugin Members
+
+ public string Name { get { return "WinLirc"; } }
+ public string Version { get { return "1.0.3.1"; } }
+ public string Author { get { return "and-81, original code for MediaPortal by Sven"; } }
+ public string Description { get { return "Supports WinLirc as a reciever"; } }
+ public bool CanReceive { get { return true; } }
+ public bool CanTransmit { get { return false; } }
+ public bool CanLearn { get { return false; } }
+ public bool CanConfigure { get { return true; } }
+
+ public RemoteButtonHandler RemoteButtonCallback
+ {
+ get { return _remoteButtonHandler; }
+ set { _remoteButtonHandler = value; }
+ }
+
+ public string[] AvailablePorts { get { return Ports; } }
+ public string[] AvailableSpeeds { get { return Speeds; } }
+
+ public void Configure()
+ {
+ LoadSettings();
+
+ Configure config = new Configure();
+
+ config.ServerIP = _serverIP;
+ config.ServerPort = _serverPort;
+ config.StartServer = _startServer;
+ config.ServerPath = _serverPath;
+ config.ButtonReleaseTime = _buttonReleaseTime;
+
+ if (config.ShowDialog() == DialogResult.OK)
+ {
+ _serverIP = config.ServerIP;
+ _serverPort = config.ServerPort;
+ _startServer = config.StartServer;
+ _serverPath = config.ServerPath;
+ _buttonReleaseTime = config.ButtonReleaseTime;
+
+ SaveSettings();
+ }
+ }
+ public bool Start()
+ {
+ LoadSettings();
+
+ if (_startServer)
+ {
+ if (!WinLircServer.StartServer(_serverPath))
+ return false;
+ }
+
+ _server = new WinLircServer(_serverIP, _serverPort, TimeSpan.FromMilliseconds(_buttonReleaseTime));
+ _server.CommandEvent += new WinLircServer.CommandEventHandler(CommandHandler);
+
+ return true;
+ }
+ public void Suspend() { }
+ public void Resume() { }
+ public void Stop()
+ {
+ _server.CommandEvent -= new WinLircServer.CommandEventHandler(CommandHandler);
+ }
+
+ public bool Transmit(string file) { return false; }
+ public LearnStatus Learn(string file) { return LearnStatus.Failure; }
+
+ public bool SetPort(string port) { return true; }
+ public bool SetSpeed(string speed) { return true; }
+
+ #endregion IIRServerPlugin Members
+
+ #region Implementation
+
+ void LoadSettings()
+ {
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _serverIP = IPAddress.Parse(doc.DocumentElement.Attributes["ServerIP"].Value);
+ _serverPort = int.Parse(doc.DocumentElement.Attributes["ServerPort"].Value);
+ _startServer = bool.Parse(doc.DocumentElement.Attributes["StartServer"].Value);
+ _serverPath = doc.DocumentElement.Attributes["ServerPath"].Value;
+ _buttonReleaseTime = int.Parse(doc.DocumentElement.Attributes["ButtonReleaseTime"].Value);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+
+ _serverIP = IPAddress.Parse("127.0.0.1");
+ _serverPort = 8765;
+ _startServer = false;
+ _serverPath = "winlirc.exe";
+ _buttonReleaseTime = 200;
+ }
+ }
+ void SaveSettings()
+ {
+ try
+ {
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerIP", _serverIP.ToString());
+ writer.WriteAttributeString("ServerPort", _serverPort.ToString());
+ writer.WriteAttributeString("StartServer", _startServer.ToString());
+ writer.WriteAttributeString("ServerPath", _serverPath);
+ writer.WriteAttributeString("ButtonReleaseTime", _buttonReleaseTime.ToString());
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ }
+ }
+
+ void CommandHandler(WinLircServer.Command cmd)
+ {
+ if (_remoteButtonHandler == null)
+ return;
+
+ string buttonCode = cmd.Remote + ": " + cmd.Button;
+
+ _remoteButtonHandler(buttonCode);
+ }
+
+ #endregion Implementation
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.csproj (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.csproj 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,78 @@
+<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>{E6A68244-8C31-44A9-9F85-B4A102B5F209}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WinLircReceiver</RootNamespace>
+ <AssemblyName>WinLirc Receiver</AssemblyName>
+ <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>
+ </DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </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="Configure.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Configure.Designer.cs">
+ <DependentUpon>Configure.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="WinLirc Receiver.cs" />
+ <Compile Include="WinLircServer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\IR Server Plugin Interface\IR Server Plugin Interface.csproj">
+ <Project>{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}</Project>
+ <Name>IR Server Plugin Interface</Name>
+ <Private>False</Private>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Configure.resx">
+ <DependentUpon>Configure.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </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>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>copy "$(TargetFileName)" "\MediaPortal Development\Plugin Releases\IR Server Suite\IR Server Plugins\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -0,0 +1,226 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Diagnostics;
+
+namespace WinLircReceiver
+{
+ /// <summary>
+ /// WinLIRC server class implementing communication with WinLIRC
+ /// all remotes are supported as long as WinLIRC supports them
+ /// </summary>
+ public class WinLircServer
+ {
+ #region Variables
+
+ public delegate void CommandEventHandler(Command cmd);
+ public event CommandEventHandler CommandEvent;
+ Socket _socket; // Socket for WinLIRC communication
+ TimeSpan _buttonReleaseTime; // Time span in which multiple receptions of the same command are ignored
+ AsyncCallback _dataCallback; // Callback function receiving data from WinLIRC
+ IAsyncResult _dataCallbackResult; // Result of the callback function
+ Command _lastCommand; // Last command actually sent to InputHandler
+
+ #endregion
+
+ #region Constructors + Initialization
+
+ public WinLircServer(IPAddress ip, int port, TimeSpan buttonReleaseTime)
+ {
+ _buttonReleaseTime = buttonReleaseTime;
+ _lastCommand = new Command();
+
+ _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+ _socket.Connect(ip, port); // Connect; error handling is done in SetupDataCallback()
+
+ SetupDataCallback(); // Setup callback function that will receive data
+ }
+
+ /// <summary>
+ /// Set up callback function receiving data from WinLIRC
+ /// </summary>
+ private void SetupDataCallback()
+ {
+ try
+ {
+ if (_dataCallback == null)
+ _dataCallback = new AsyncCallback(OnDataReceived);
+
+ SocketInfo info = new SocketInfo();
+ info._socket = _socket;
+ _dataCallbackResult = _socket.BeginReceive(info._dataBuffer, 0, info._dataBuffer.Length, SocketFlags.None, _dataCallback, info);
+ }
+ catch (SocketException se)
+ {
+ Console.WriteLine("WLirc: Error listening to socket: " + se.Message);
+ }
+
+ }
+ #endregion
+
+ #region Public Methods
+
+ public static bool StartServer(String path)
+ {
+ if (IsServerRunning())
+ Console.WriteLine("WLirc: WinLIRC server was not started (already running)");
+ else
+ {
+ Console.WriteLine("WLirc: Starting WinLIRC server...");
+ try
+ {
+ Process.Start(path);
+ }
+ catch (Exception)
+ {
+ Console.WriteLine("WLirc: WinLIRC server start failed");
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public static bool IsServerRunning()
+ {
+ Process[] processes = Process.GetProcessesByName("winlirc");
+ return (processes.Length > 0);
+ }
+
+ #endregion
+
+ #region Private Methods
+ /// <summary>
+ /// Callback function receiving data from WinLIRC
+ /// </summary>
+ private void OnDataReceived(IAsyncResult async)
+ {
+ try
+ {
+ SocketInfo info = (SocketInfo)async.AsyncState;
+ int receivedBytesCount = info._socket.EndReceive(async);
+
+ // Convert received bytes to string
+ char[] chars = new char[receivedBytesCount + 1];
+ System.Text.Decoder decoder = System.Text.Encoding.UTF8.GetDecoder();
+ decoder.GetChars(info._dataBuffer, 0, receivedBytesCount, chars, 0);
+ System.String data = new System.String(chars);
+
+ String[] commands = data.Split(new char[] { '\n', '\r', '\0' }, StringSplitOptions.RemoveEmptyEntries);
+ foreach (String cmd in commands)
+ ProcessData(cmd);
+
+ SetupDataCallback(); // Listen to new signals again
+ }
+ catch (ObjectDisposedException)
+ {
+ Console.WriteLine("WLirc: OnDataReceived: Socket has been closed");
+ }
+ catch (SocketException se)
+ {
+ Console.WriteLine("WLirc: OnDataReceived: Socket exception: " + se.Message);
+ }
+ }
+
+ /// <summary>
+ /// Process received data, i.e. send event to event handlers
+ /// </summary>
+ private void ProcessData(String data)
+ {
+ // Ignore commands we do not need (like the startup message)
+ if ((data == "BEGIN") || (data == "END") || (data == "SIGHUP"))
+ return;
+
+ Command command = new Command(data);
+
+ #region Time-based repeat filter
+ if (_lastCommand.IsSameCommand(command))
+ if ((command.Time - _lastCommand.Time) < _buttonReleaseTime)
+ {
+ Console.WriteLine("WLirc: Command '" + command.Button + "' ignored because of repeat filter");
+ return;
+ }
+ #endregion
+
+ Console.WriteLine("WLirc: Command '" + command.Button + "' accepted");
+ _lastCommand = command;
+
+ if (CommandEvent != null)
+ CommandEvent(command);
+ }
+ #endregion
+
+ #region Helper classes
+ /// <summary>
+ /// Class containing information for the data callback function
+ /// </summary>
+ private class SocketInfo
+ {
+ public Socket _socket;
+ public byte[] _dataBuffer = new byte[512];
+ }
+
+ /// <summary>
+ /// Class containing information on a WinLIRC command
+ /// </summary>
+ public class Command
+ {
+ String _remote;
+ String _button;
+ DateTime _time;
+
+ public Command()
+ {
+ _time = DateTime.Now;
+ }
+
+ public Command(string data)
+ {
+ String[] dataElements = data.Split(' ');
+ _button = dataElements[2];
+ _remote = dataElements[3];
+ _time = DateTime.Now;
+ }
+
+ public bool IsSameCommand(Command second)
+ {
+ if ((_button == second._button) && (_remote == second._remote))
+ return true;
+ return false;
+ }
+
+ public String Button { get { return _button; } }
+ public String Remote { get { return _remote; } }
+ public DateTime Time { get { return _time; } }
+ }
+ #endregion
+ }
+}
Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-06-06 16:52:56 UTC (rev 489)
@@ -65,6 +65,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IR Server Plugin Interface", "IR Server Plugins\IR Server Plugin Interface\IR Server Plugin Interface.csproj", "{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinLirc Receiver", "IR Server Plugins\WinLirc Receiver\WinLirc Receiver.csproj", "{E6A68244-8C31-44A9-9F85-B4A102B5F209}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -179,6 +181,10 @@
{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C}.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
+ {E6A68244-8C31-44A9-9F85-B4A102B5F209}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -202,6 +208,7 @@
{9FDD649E-0502-4FED-9AC1-AA0346394375} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
{8B3CC9D2-A673-4B1B-8BE4-7AA6C0210F84} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
{D8B3D28F-62CE-4CA7-86CE-B7EAD614A94C} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
+ {E6A68244-8C31-44A9-9F85-B4A102B5F209} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
{E98F1F7E-40B6-44C8-AC66-EC867B141FA1} = {0E9CCB69-CEF0-4680-816B-18E949DEA727}
{077B53BB-404A-4B2F-BA17-AAE98C5E9C66} = {0E9CCB69-CEF0-4680-816B-18E949DEA727}
{F4EA6055-7133-4F18-8971-E19ADEB482C1} = {0E9CCB69-CEF0-4680-816B-18E949DEA727}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-03 17:34:14 UTC (rev 488)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-06 16:52:56 UTC (rev 489)
@@ -547,7 +547,7 @@
string fileName;
for (int index = 0; index < cardCount; index++)
{
- fileName = String.Format("{0}ExternalChannelConfig{1}.xml", ExtCfgFolder, index + 1);
+ fileName = String.Format("{0}ExternalChannelConfig{1}.xml", ExtCfgFolder, Convert.ToString(index + 1));
try
{
ExternalChannelConfigs[index] = ExternalChannelConfig.Load(fileName);
@@ -557,6 +557,8 @@
ExternalChannelConfigs[index] = new ExternalChannelConfig(fileName);
Log.Error(ex);
}
+
+ ExternalChannelConfigs[index].CardId = index;
}
}
@@ -601,7 +603,7 @@
{
int card = int.Parse(tunerCard);
- // To fix a known bug in MediaPortal scheduled recording (Added: 25-Feb-2007)
+ // To work around a known bug in MediaPortal scheduled recording (Added: 25-Feb-2007)
if (card < 0)
card = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-08 13:33:16
|
Revision: 492
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=492&view=rev
Author: and-81
Date: 2007-06-08 06:33:09 -0700 (Fri, 08 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-06 23:20:39 UTC (rev 491)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-08 13:33:09 UTC (rev 492)
@@ -387,7 +387,7 @@
ServiceController[] services = ServiceController.GetServices();
foreach (ServiceController service in services)
{
- if (service.ServiceName == "ehRecvr")
+ if (service.ServiceName.Equals("ehRecvr", StringComparison.InvariantCultureIgnoreCase))
{
if (service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending)
{
@@ -395,13 +395,21 @@
}
}
- if (service.ServiceName == "ehSched")
+ if (service.ServiceName.Equals("ehSched", StringComparison.InvariantCultureIgnoreCase))
{
if (service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending)
{
service.Stop();
}
}
+
+ if (service.ServiceName.Equals("mcrdsvc", StringComparison.InvariantCultureIgnoreCase))
+ {
+ if (service.Status != ServiceControllerStatus.Stopped && service.Status != ServiceControllerStatus.StopPending)
+ {
+ service.Stop();
+ }
+ }
}
}
catch (Exception ex)
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs 2007-06-06 23:20:39 UTC (rev 491)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputMappingForm.cs 2007-06-08 13:33:09 UTC (rev 492)
@@ -291,8 +291,9 @@
// treeMapping
//
this.treeMapping.AllowDrop = true;
- this.treeMapping.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
+ this.treeMapping.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.treeMapping.FullRowSelect = true;
this.treeMapping.HideSelection = false;
this.treeMapping.Location = new System.Drawing.Point(16, 56);
@@ -303,6 +304,7 @@
//
// labelExpand
//
+ this.labelExpand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.labelExpand.AutoSize = true;
this.labelExpand.Location = new System.Drawing.Point(328, 374);
this.labelExpand.Name = "labelExpand";
@@ -313,7 +315,7 @@
//
// buttonDefault
//
- this.buttonDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.buttonDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonDefault.Location = new System.Drawing.Point(268, 442);
this.buttonDefault.Name = "buttonDefault";
this.buttonDefault.Size = new System.Drawing.Size(75, 23);
@@ -732,6 +734,7 @@
this.Controls.Add(this.groupBoxCondition);
this.Controls.Add(this.groupBoxLayer);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MinimumSize = new System.Drawing.Size(598, 509);
this.Name = "InputMappingForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-06 23:20:39 UTC (rev 491)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-08 13:33:09 UTC (rev 492)
@@ -1400,22 +1400,22 @@
break;
}
/*
- case Common.XmlTagWindowState:
- {
- if (InConfiguration)
- {
- MessageBox.Show("Command to toggle the window state cannot be processed in configuration.", "Window State Toggle Command", MessageBoxButtons.OK, MessageBoxIcon.Information);
- break;
- }
+ case Common.XmlTagWindowState:
+ {
+ if (InConfiguration)
+ {
+ MessageBox.Show("Command to toggle the window state cannot be processed in configuration.", "Window State Toggle Command", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ break;
+ }
- GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SWITCH_FULL_WINDOWED, 0, 0, 0, 0, 0, null);
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_SWITCH_FULL_WINDOWED, 0, 0, 0, 0, 0, null);
- if (GUIGraphicsContext.DX9Device.PresentationParameters.Windowed)
- msg.Param1 = 1;
+ if (GUIGraphicsContext.DX9Device.PresentationParameters.Windowed)
+ msg.Param1 = 1;
- GUIWindowManager.SendMessage(msg);
- break;
- }
+ GUIWindowManager.SendMessage(msg);
+ break;
+ }
*/
case Common.XmlTagFocus:
{
@@ -1539,34 +1539,34 @@
if (String.IsNullOrEmpty(command))
throw new ArgumentException("Null or empty argument", "command");
- if (command.StartsWith(Common.CmdPrefixMacro)) // Macro
+ if (command.StartsWith(Common.CmdPrefixMacro, StringComparison.InvariantCultureIgnoreCase)) // Macro
{
string fileName = FolderMacros + command.Substring(Common.CmdPrefixMacro.Length) + Common.FileExtensionMacro;
ProcessMacro(fileName);
}
- else if (command.StartsWith(Common.CmdPrefixBlast)) // IR Code
+ else if (command.StartsWith(Common.CmdPrefixBlast, StringComparison.InvariantCultureIgnoreCase)) // IR Code
{
string[] commands = Common.SplitBlastCommand(command.Substring(Common.CmdPrefixBlast.Length));
string fileName = Common.FolderIRCommands + commands[0] + Common.FileExtensionIR;
BlastIR(fileName, commands[1], commands[2]);
}
- else if (command.StartsWith(Common.CmdPrefixRun)) // External Program
+ else if (command.StartsWith(Common.CmdPrefixRun, StringComparison.InvariantCultureIgnoreCase)) // External Program
{
string[] commands = Common.SplitRunCommand(command.Substring(Common.CmdPrefixRun.Length));
Common.ProcessRunCommand(commands);
}
- else if (command.StartsWith(Common.CmdPrefixSerial)) // Serial Port Command
+ else if (command.StartsWith(Common.CmdPrefixSerial, StringComparison.InvariantCultureIgnoreCase)) // Serial Port Command
{
string[] commands = Common.SplitSerialCommand(command.Substring(Common.CmdPrefixSerial.Length));
Common.ProcessSerialCommand(commands);
}
- else if (command.StartsWith(Common.CmdPrefixMessage)) // Message Command
+ else if (command.StartsWith(Common.CmdPrefixMessage, StringComparison.InvariantCultureIgnoreCase)) // Message Command
{
string[] commands = Common.SplitMessageCommand(command.Substring(Common.CmdPrefixMessage.Length));
Common.ProcessMessageCommand(commands);
}
- else if (command.StartsWith(Common.CmdPrefixKeys)) // Keystroke Command
+ else if (command.StartsWith(Common.CmdPrefixKeys, StringComparison.InvariantCultureIgnoreCase)) // Keystroke Command
{
string keyCommand = command.Substring(Common.CmdPrefixKeys.Length);
if (InConfiguration)
@@ -1574,7 +1574,7 @@
else
Common.ProcessKeyCommand(keyCommand);
}
- else if (command.StartsWith(Common.CmdPrefixGoto)) // Go To Screen
+ else if (command.StartsWith(Common.CmdPrefixGoto, StringComparison.InvariantCultureIgnoreCase)) // Go To Screen
{
MPCommands.ProcessGoTo(command.Substring(Common.CmdPrefixGoto.Length), MP_BasicHome);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-09 11:11:15
|
Revision: 495
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=495&view=rev
Author: and-81
Date: 2007-06-09 04:11:13 -0700 (Sat, 09 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -29,20 +29,8 @@
#endregion Properties
- #region Constructors
+ #region Constructor
- public BlastCommand(string file)
- {
- InitializeComponent();
-
- labelIRCommandFile.Text = file;
-
- comboBoxPort.Items.AddRange(Program.TransceiverInformation.Ports);
- comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
- }
public BlastCommand(string[] commands)
{
InitializeComponent();
@@ -65,7 +53,7 @@
comboBoxSpeed.SelectedIndex = 0;
}
- #endregion Constructors
+ #endregion Constructor
#region Buttons
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -242,7 +242,9 @@
}
else
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -705,7 +705,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -29,20 +29,8 @@
#endregion Properties
- #region Constructors
+ #region Constructor
- public BlastCommand(string file)
- {
- InitializeComponent();
-
- labelIRCommandFile.Text = file;
-
- comboBoxPort.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Ports);
- comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
- }
public BlastCommand(string[] commands)
{
InitializeComponent();
@@ -65,7 +53,7 @@
comboBoxSpeed.SelectedIndex = 0;
}
- #endregion Constructors
+ #endregion Constructor
#region Buttons
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -324,7 +324,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.OK)
listBoxMacro.Items.Add(Common.CmdPrefixBlast + blastCommand.CommandString);
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -265,7 +265,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -29,20 +29,8 @@
#endregion Properties
- #region Constructors
+ #region Constructor
- public BlastCommand(string file)
- {
- InitializeComponent();
-
- labelIRCommandFile.Text = file;
-
- comboBoxPort.Items.AddRange(MPControlPlugin.TransceiverInformation.Ports);
- comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.AddRange(MPControlPlugin.TransceiverInformation.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
- }
public BlastCommand(string[] commands)
{
InitializeComponent();
@@ -65,7 +53,7 @@
comboBoxSpeed.SelectedIndex = 0;
}
- #endregion Constructors
+ #endregion Constructor
#region Buttons
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -404,7 +404,9 @@
}
else
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -537,7 +537,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
@@ -746,7 +748,9 @@
}
else if (command.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(command.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(command.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -233,7 +233,9 @@
}
else
{
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -366,7 +366,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -213,7 +213,9 @@
}
else
{
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 08:11:46 UTC (rev 494)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 11:11:13 UTC (rev 495)
@@ -390,7 +390,9 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
+ string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
+
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-09 16:50:18
|
Revision: 496
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=496&view=rev
Author: and-81
Date: 2007-06-09 09:50:16 -0700 (Sat, 09 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -29,32 +29,45 @@
#endregion Properties
- #region Constructor
+ #region Constructors
+ public BlastCommand(string file)
+ {
+ InitializeComponent();
+
+ SetupPortsAndSpeeds();
+
+ labelIRCommandFile.Text = file;
+ }
public BlastCommand(string[] commands)
{
InitializeComponent();
+ SetupPortsAndSpeeds();
+
if (commands == null)
return;
labelIRCommandFile.Text = commands[0];
- comboBoxPort.Items.AddRange(Program.TransceiverInformation.Ports);
if (comboBoxPort.Items.Contains(commands[1]))
comboBoxPort.SelectedItem = commands[1];
- else
- comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
if (comboBoxSpeed.Items.Contains(commands[2]))
comboBoxSpeed.SelectedItem = commands[2];
- else
- comboBoxSpeed.SelectedIndex = 0;
}
- #endregion Constructor
+ #endregion Constructors
+ void SetupPortsAndSpeeds()
+ {
+ comboBoxPort.Items.AddRange(Program.TransceiverInformation.Ports);
+ comboBoxPort.SelectedIndex = 0;
+
+ comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
+ comboBoxSpeed.SelectedIndex = 0;
+ }
+
#region Buttons
private void buttonOK_Click(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -242,9 +242,7 @@
}
else
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -705,9 +705,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -29,32 +29,45 @@
#endregion Properties
- #region Constructor
+ #region Constructors
+ public BlastCommand(string file)
+ {
+ InitializeComponent();
+
+ SetupPortsAndSpeeds();
+
+ labelIRCommandFile.Text = file;
+ }
public BlastCommand(string[] commands)
{
InitializeComponent();
+ SetupPortsAndSpeeds();
+
if (commands == null)
return;
labelIRCommandFile.Text = commands[0];
- comboBoxPort.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Ports);
if (comboBoxPort.Items.Contains(commands[1]))
comboBoxPort.SelectedItem = commands[1];
- else
- comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Speeds);
if (comboBoxSpeed.Items.Contains(commands[2]))
comboBoxSpeed.SelectedItem = commands[2];
- else
- comboBoxSpeed.SelectedIndex = 0;
}
- #endregion Constructor
+ #endregion Constructors
+ void SetupPortsAndSpeeds()
+ {
+ comboBoxPort.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Ports);
+ comboBoxPort.SelectedIndex = 0;
+
+ comboBoxSpeed.Items.AddRange(MPBlastZonePlugin.TransceiverInformation.Speeds);
+ comboBoxSpeed.SelectedIndex = 0;
+ }
+
#region Buttons
private void buttonOK_Click(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -324,9 +324,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.OK)
listBoxMacro.Items.Add(Common.CmdPrefixBlast + blastCommand.CommandString);
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -265,9 +265,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -29,32 +29,45 @@
#endregion Properties
- #region Constructor
+ #region Constructors
+ public BlastCommand(string file)
+ {
+ InitializeComponent();
+
+ SetupPortsAndSpeeds();
+
+ labelIRCommandFile.Text = file;
+ }
public BlastCommand(string[] commands)
{
InitializeComponent();
+ SetupPortsAndSpeeds();
+
if (commands == null)
return;
labelIRCommandFile.Text = commands[0];
-
- comboBoxPort.Items.AddRange(MPControlPlugin.TransceiverInformation.Ports);
+
if (comboBoxPort.Items.Contains(commands[1]))
comboBoxPort.SelectedItem = commands[1];
- else
- comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.AddRange(MPControlPlugin.TransceiverInformation.Speeds);
if (comboBoxSpeed.Items.Contains(commands[2]))
comboBoxSpeed.SelectedItem = commands[2];
- else
- comboBoxSpeed.SelectedIndex = 0;
}
#endregion Constructor
+ void SetupPortsAndSpeeds()
+ {
+ comboBoxPort.Items.AddRange(MPControlPlugin.TransceiverInformation.Ports);
+ comboBoxPort.SelectedIndex = 0;
+
+ comboBoxSpeed.Items.AddRange(MPControlPlugin.TransceiverInformation.Speeds);
+ comboBoxSpeed.SelectedIndex = 0;
+ }
+
#region Buttons
private void buttonOK_Click(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -537,9 +537,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -39,7 +39,7 @@
#region Constants
- internal const string PluginVersion = "MP Control Plugin 1.0.3.1 for IR Server";
+ internal const string PluginVersion = "MP Control Plugin 1.0.3.2 for IR Server";
internal static readonly string CustomInputDevice = Config.GetFolder(Config.Dir.CustomInputDevice) + "\\";
internal static readonly string CustomInputDefault = Config.GetFolder(Config.Dir.CustomInputDefault) + "\\";
@@ -975,7 +975,7 @@
ServerHost = xmlreader.GetValueAsString("MPControlPlugin", "ServerHost", String.Empty);
LogVerbose = xmlreader.GetValueAsBool("MPControlPlugin", "LogVerbose", false);
- RequireFocus = xmlreader.GetValueAsBool("MPControlPlugin", "RequireFocus", false);
+ RequireFocus = xmlreader.GetValueAsBool("MPControlPlugin", "RequireFocus", true);
MultiMappingEnabled = xmlreader.GetValueAsBool("MPControlPlugin", "MultiMappingEnabled", false);
MultiMappingButton = (RemoteButton)xmlreader.GetValueAsInt("MPControlPlugin", "MultiMappingButton", (int)RemoteButton.Start);
EventMapperEnabled = xmlreader.GetValueAsBool("MPControlPlugin", "EventMapperEnabled", false);
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersionAttribute("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersionAttribute("1.0.3.2")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -233,9 +233,7 @@
}
else
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -366,9 +366,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -213,9 +213,7 @@
}
else
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 11:11:13 UTC (rev 495)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs 2007-06-09 16:50:16 UTC (rev 496)
@@ -390,9 +390,7 @@
}
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, commands);
+ BlastCommand blastCommand = new BlastCommand(Common.FolderIRCommands, selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-10 08:33:14
|
Revision: 502
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=502&view=rev
Author: and-81
Date: 2007-06-10 01:33:09 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.Designer.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.dll
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.dll
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.License.txt
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.dll
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.xml
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-10 07:42:31 UTC (rev 501)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-10 08:33:09 UTC (rev 502)
@@ -577,7 +577,6 @@
try
{
Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm");
- // , HelpNavigator.Topic, "index.html"
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-06-10 07:42:31 UTC (rev 501)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-06-10 08:33:09 UTC (rev 502)
@@ -33,7 +33,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 07:42:31 UTC (rev 501)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 08:33:09 UTC (rev 502)
@@ -177,7 +177,7 @@
{
try
{
- Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "IR Server");
+ Help.ShowHelp(this, SystemRegistry.GetInstallFolder() + "\\IR Server Suite.chm", HelpNavigator.Topic, "IR Server\\index.html");
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-06-10 07:42:31 UTC (rev 501)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-06-10 08:33:09 UTC (rev 502)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Added: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 08:33:09 UTC (rev 502)
@@ -0,0 +1,1900 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>DevAge.Core</name>
+ </assembly>
+ <members>
+ <member name="T:DevAge.Text.FixedLength.LineParser">
+ <summary>
+ A class for parsing fixed length string and loading the fields into a class.
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.#ctor">
+ <summary>
+ Constructor. Fill the Fields list fot specify the columns.
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.#ctor(System.Type)">
+ <summary>
+ Load the parser fields with the properties specified in the type. You must use the FieldAttribute and ParseFormatAttribute to specify additional informations like the field length.
+ </summary>
+ <param name="lineClassType"></param>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.Reset">
+ <summary>
+ Reset the parser
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.LoadLine(System.String)">
+ <summary>
+ Load the specified line in the parser.
+ </summary>
+ <param name="line"></param>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.GetValue(System.String)">
+ <summary>
+ Get a specified field value.
+ </summary>
+ <param name="fieldName"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.LineParser.FillLineClass(System.Object)">
+ <summary>
+ Fill the properties of the specified class with the values of the line has defined by the Fields collection.
+ </summary>
+ <param name="schemaClass"></param>
+ <returns>Returns the same class specified in the schemaClass parameter, this is useful if you have struct or value types.</returns>
+ </member>
+ <member name="P:DevAge.Text.FixedLength.LineParser.Fields">
+ <summary>
+ Gets a collection of fields.
+ </summary>
+ </member>
+ <member name="T:DevAge.Data.SqlClient.SqlCommandBuilder">
+ <summary>
+ This class is similar to the System.Data.SqlClient.SqlCommandBuilder, but use only the DataTable to create the required commands.
+ Don't support identity (autoincrement) column and only the base data type. This class don't use the data source to explore the data but only the DataTable informations.
+ So you must populate the PrimaryKeys of the DataSet. I suggest to use GUID column (uniqueidentifier) to replace the identity column.
+ Remember to set the Connection of the generated command.
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.SqlClient.SqlCommandBuilder.#ctor(System.Data.DataTable)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="dataTable">table used to create commands</param>
+ </member>
+ <member name="P:DevAge.Data.SqlClient.SqlCommandBuilder.DataTable">
+ <summary>
+ Table used to create commands
+ </summary>
+ </member>
+ <member name="T:DevAge.DateTimeHelper">
+ <summary>
+ Summary description for DateTimeHelper.
+ </summary>
+ </member>
+ <member name="M:DevAge.DateTimeHelper.YearsDifference(System.DateTime,System.DateTime)">
+ <summary>
+ Calculate the difference in years of 2 dates. Usually used for age calculations. dateA - dateB
+ </summary>
+ <param name="dateA"></param>
+ <param name="dateB"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.DateTimeHelper.MonthsDifference(System.DateTime,System.DateTime)">
+ <summary>
+ Calculate the difference in months of 2 dates. dateA - dateB
+ </summary>
+ <param name="dateA"></param>
+ <param name="dateB"></param>
+ <returns></returns>
+ </member>
+ <member name="T:DevAge.Data.FileDataSet">
+ <summary>
+ Summary description for Manager.
+ </summary>
+ </member>
+ <member name="P:DevAge.Data.FileDataSet.SaveDataFormat">
+ <summary>
+ Gets or Sets the format used to save the DataSet
+ </summary>
+ </member>
+ <member name="P:DevAge.Data.FileDataSet.FileDataFormat">
+ <summary>
+ Gets the current format of the File where the data are loaded.
+ </summary>
+ </member>
+ <member name="P:DevAge.Data.FileDataSet.MergeReadedSchema">
+ <summary>
+ Gets or Sets if merge the schema of the file with the schema of the DataSet specified. Use true if the DataSet doesn't have a schema definition. Default is false.
+ </summary>
+ </member>
+ <member name="T:DevAge.DevAgeApplicationException">
+ <summary>
+ Generic DevAge Exception
+ </summary>
+ </member>
+ <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="p_strErrDescription"></param>
+ </member>
+ <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String,System.Exception)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="p_strErrDescription"></param>
+ <param name="p_InnerException"></param>
+ </member>
+ <member name="M:DevAge.DevAgeApplicationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="p_Info"></param>
+ <param name="p_StreamingContext"></param>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.FieldAttribute">
+ <summary>
+ Required attribute to specify the field position and length
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldAttribute.#ctor(System.Int32,System.Int32)">
+ <summary>
+ Constructor.
+ </summary>
+ <param name="fieldIndex">Index of the field, 0 based. Each field must have a unique progressive index</param>
+ <param name="length">Lenght of the field when readed and writed to the string.</param>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.ParseFormatAttribute">
+ <summary>
+ Attribute used to specify additional parse options
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.ParseFormatAttribute.#ctor">
+ <summary>
+ Constructor. Use one of these properties to customize the format: CultureInfo, DateTimeFormat, NumberFormat, TrimBeforeParse.
+ Default is Invariant culture format.
+ </summary>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.ValueMappingAttribute">
+ <summary>
+ Attribute used to convert a specific value to another value
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.ValueMappingAttribute.#ctor(System.String,System.Object)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="stringValue">String value</param>
+ <param name="fieldValue">Field typed value</param>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.StandardValueAttribute">
+ <summary>
+ Attribute used to specify the standard value (mandatory value) for a specific field.
+ You can use this attribute for example when you want a particular field to only accept one or more standard values.
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.StandardValueAttribute.#ctor(System.Object)">
+ <summary>
+ Construcotr
+ </summary>
+ <param name="standardValue">Required value</param>
+ </member>
+ <member name="T:DevAge.Patterns.IActivity">
+ <summary>
+ An interface to represents a basic activity.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.IActivity.Start(DevAge.Patterns.IActivityEvents)">
+ <summary>
+ Start the activity and all sub activities.
+ </summary>
+ <param name="events">Interface class that receive the events, can be null if no event class is needed.</param>
+ </member>
+ <member name="M:DevAge.Patterns.IActivity.Cancel">
+ <summary>
+ Cancel the current activity and all sub activities throwing a ActivityCanceledException.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.SubActivities">
+ <summary>
+ Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped.
+ Note that the sub activities can be async and so can be executed in a parellel mode.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.Status">
+ <summary>
+ Activity status
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.Name">
+ <summary>
+ Name of the activity used to describe the class.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.WaitHandle">
+ <summary>
+ Gets the WaitHandle class used to wait for the completition of the activity.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.Exception">
+ <summary>
+ Gets the exception throwed when the activity fail. Null if no exception.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.Parent">
+ <summary>
+ Gets or sets the Activity parent. Null when it is a root activity.
+ Do not set manually the parent activity, but simply add the activity to the SubActivities collection.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.IActivity.FullName">
+ <summary>
+ Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character
+ </summary>
+ </member>
+ <member name="F:DevAge.Patterns.SubActivityWaitMode.DoNotWait">
+ <summary>
+ Don't wait the sub activities to finish (parallel processing, asyncronous)
+ </summary>
+ </member>
+ <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitOnEach">
+ <summary>
+ Wait for each sub activities (syncronous)
+ </summary>
+ </member>
+ <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitAtTheEnd">
+ <summary>
+ Wait all the sub activities at the end (parallel processing but syncronized with the parent)
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.ActivityBase">
+ <summary>
+ Base activity class. Override the OnWork method to customize the activity.
+ </summary>
+ </member>
+ <member name="F:DevAge.Patterns.ActivityBase.mActivityCount">
+ <summary>
+ An activity count used only to generate a seguential name
+ </summary>
+ </member>
+ <member name="F:DevAge.Patterns.ActivityBase.mWaitHandle">
+ <summary>
+ Initially set to signaled=true=completed, nonsignaled=false=notcompleted,
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.ResetRunningStatus">
+ <summary>
+ Reset the status property to the original values. If the activity is still running an exception is throw.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.OnWork">
+ <summary>
+ Working method. Abstract. Override this method to provide a specific work for the activity.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.DoWork">
+ <summary>
+ Internal work method. Call the OnWork method and Start the SubActivities.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.WaitActivities(DevAge.Patterns.ActivityCollection,System.Int32)">
+ <summary>
+ Wait until or SubActivities are completed. Throw an exception on timeout.
+ </summary>
+ <param name="activities"></param>
+ <param name="timeout"></param>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.WaitActivity(DevAge.Patterns.IActivity,System.Int32)">
+ <summary>
+ Wait until or SubActivities are completed. Throw an exception on timeout.
+ </summary>
+ <param name="activity"></param>
+ <param name="timeout"></param>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.CheckActivitiesException(DevAge.Patterns.ActivityCollection)">
+ <summary>
+ Throw an exception if one of the activities has an exception.
+ </summary>
+ <param name="activities"></param>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.CheckActivityException(DevAge.Patterns.IActivity)">
+ <summary>
+ Throw an exception if one of the activities has an exception.
+ </summary>
+ <param name="activity"></param>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.StartActivity">
+ <summary>
+ Start the activity. NOTE: Usually don't override this method but override the OnWork method to implement the specific activity work.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.Start(DevAge.Patterns.IActivityEvents)">
+ <summary>
+ Start the activity. If the activity is already running an exception is throw.
+ To override the common working code use the OnWork abstract method.
+ </summary>
+ <param name="events">Interface class that receive the events, can be null if no event class is needed.</param>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityBase.Cancel">
+ <summary>
+ Cancel the current activity and all sub activities throwing a ActivityCanceledException.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.SubActivitiesTimeOut">
+ <summary>
+ Gets or sets the time to wait for the sub activities. If the operation is still executing then a TimeOutException is fired. Default is System.Threading.Timeout.Infinite. Default is true.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.PropagateException">
+ <summary>
+ Gets or sets if propagate an exception from sub activities to the current activities. Default is true.
+ Only valid SubActivitiesTimeOut is WaitOnEach or WaitAtTheEnd
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.SubActivityWaitMode">
+ <summary>
+ Gets or sets how the current activity wait the completition of the sub activities.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.SubActivities">
+ <summary>
+ Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped.
+ Note that the sub activities can be async and so can be executed in a parellel mode.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.Status">
+ <summary>
+ Activity status
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.Name">
+ <summary>
+ Name of the activity used to describe the class.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.WaitHandle">
+ <summary>
+ Gets the WaitHandle class used to wait for the completition of the activity.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.Exception">
+ <summary>
+ Gets the exception throwed when the activity fail. Null if no exception.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.Parent">
+ <summary>
+ Gets or sets the Activity parent. Null when it is a root activity.
+ Do not set manually the parent activity, but simply add the activity to the SubActivities collection.
+ </summary>
+ </member>
+ <member name="P:DevAge.Patterns.ActivityBase.FullName">
+ <summary>
+ Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.Activity">
+ <summary>
+ An activity used as a container for other activities using a syncronized code.
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.AsynchronousActivity">
+ <summary>
+ An activity used as a container for other activities using an asynchronous code.
+ Override the OnAsyncWork method for custom asynchronous work.
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.AsyncActivityBase">
+ <summary>
+ Base activity class. Override the OnBeginWork and OnEndWork method to customize the activity.
+ This class support an asyncronous activity.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.AsyncActivityBase.OnBeginWork(System.AsyncCallback)">
+ <summary>
+ Begind working method. Called to start the asyncronous activity. Abstract.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.AsyncActivityBase.OnEndWork(System.IAsyncResult)">
+ <summary>
+ End working method. Called when the asyncronous operation is finished
+ </summary>
+ <param name="asyncResult">AsyncResult</param>
+ </member>
+ <member name="M:DevAge.Patterns.AsyncActivityBase.OnWork">
+ <summary>
+ Working method.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.AsyncActivityBase.StartActivity">
+ <summary>
+ Start the activity. NOTE: Usually don't override this method but override the OnBeginWork method to implement the specific activity work.
+ </summary>
+ </member>
+ <member name="T:DevAge.Data.StreamDataSet">
+ <summary>
+ A static class used to serialize a DataSet to and from a stream using a binary or xml format.
+ The xml format use the standard DataSet xml serialization, the binary format use a custom format.
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.StreamDataSet.Write(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat)">
+ <summary>
+ Write the dataset to the stream using the specified format.
+ </summary>
+ <param name="destination"></param>
+ <param name="source"></param>
+ <param name="format"></param>
+ </member>
+ <member name="M:DevAge.Data.StreamDataSet.Read(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat,System.Boolean)">
+ <summary>
+ Read from the stream and populate the dataset using the specified format.
+ </summary>
+ <param name="source"></param>
+ <param name="destination"></param>
+ <param name="format"></param>
+ <param name="mergeSchema">True to merge the schema, otherwise it is used the schema of the dataset</param>
+ </member>
+ <member name="T:DevAge.Data.StreamDataSetFormat">
+ <summary>
+ Enum to control the serialization format
+ </summary>
+ </member>
+ <member name="F:DevAge.Data.StreamDataSetFormat.XML">
+ <summary>
+ Standard xml format used by the ReadXml and WriteXml of the DataSet
+ </summary>
+ </member>
+ <member name="F:DevAge.Data.StreamDataSetFormat.Binary">
+ <summary>
+ Custom binary format. More compact of the xml but not human readable
+ </summary>
+ </member>
+ <member name="T:DevAge.Data.BinaryDataSetInvalidException">
+ <summary>
+ Binary data not valid exception
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor(System.Exception)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="p_InnerException"></param>
+ </member>
+ <member name="T:DevAge.Data.BinaryDataSetVersionException">
+ <summary>
+ Version not valid exception
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor(System.Exception)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="p_InnerException"></param>
+ </member>
+ <member name="T:DevAge.Configuration.CommandLineArgs">
+ <summary>
+ Description résumée de Arguments.
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.Converter.PercentTypeConverter">
+ <summary>
+ A TypeConverter that support string conversion from and to string with the percent symbol.
+ Support Conversion for Float, Double and Decimal
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Converter.PercentTypeConverter.ConsiderAllStringAsPercent">
+ <summary>
+ If true and the user insert a string with no percent symbel the value is divided by 100, otherwise not.
+ </summary>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.LineWriter">
+ <summary>
+ A class used to create fixed lenght string.
+ </summary>
+ </member>
+ <member name="T:DevAge.IO.StreamPersistence">
+ <summary>
+ A static class to help save and read stream data
+ </summary>
+ </member>
+ <member name="T:DevAge.Configuration.PersistableItemDictionary">
+ <summary>
+ A dictionary with keys of type String and values of type PersistableItem
+ </summary>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.#ctor">
+ <summary>
+ Initializes a new empty instance of the PersistableItemDictionary class
+ </summary>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.Add(System.String,DevAge.Configuration.PersistableItem)">
+ <summary>
+ Adds an element with the specified key and value to this PersistableItemDictionary.
+ </summary>
+ <param name="key">
+ The String key of the element to add.
+ </param>
+ <param name="value">
+ The PersistableItem value of the element to add.
+ </param>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.Contains(System.String)">
+ <summary>
+ Determines whether this PersistableItemDictionary contains a specific key.
+ </summary>
+ <param name="key">
+ The String key to locate in this PersistableItemDictionary.
+ </param>
+ <returns>
+ true if this PersistableItemDictionary contains an element with the specified key;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsKey(System.String)">
+ <summary>
+ Determines whether this PersistableItemDictionary contains a specific key.
+ </summary>
+ <param name="key">
+ The String key to locate in this PersistableItemDictionary.
+ </param>
+ <returns>
+ true if this PersistableItemDictionary contains an element with the specified key;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsValue(DevAge.Configuration.PersistableItem)">
+ <summary>
+ Determines whether this PersistableItemDictionary contains a specific value.
+ </summary>
+ <param name="value">
+ The PersistableItem value to locate in this PersistableItemDictionary.
+ </param>
+ <returns>
+ true if this PersistableItemDictionary contains an element with the specified value;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Configuration.PersistableItemDictionary.Remove(System.String)">
+ <summary>
+ Removes the element with the specified key from this PersistableItemDictionary.
+ </summary>
+ <param name="key">
+ The String key of the element to remove.
+ </param>
+ </member>
+ <member name="P:DevAge.Configuration.PersistableItemDictionary.Item(System.String)">
+ <summary>
+ Gets or sets the PersistableItem associated with the given String
+ </summary>
+ <param name="key">
+ The String whose value to get or set.
+ </param>
+ </member>
+ <member name="P:DevAge.Configuration.PersistableItemDictionary.Keys">
+ <summary>
+ Gets a collection containing the keys in this PersistableItemDictionary.
+ </summary>
+ </member>
+ <member name="P:DevAge.Configuration.PersistableItemDictionary.Values">
+ <summary>
+ Gets a collection containing the values in this PersistableItemDictionary.
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.Converter.CurrencyTypeConverter">
+ <summary>
+ A TypeConverter that support string conversion from and to string with the currency symbol.
+ Support Conversion for Float, Double and Decimal, Int
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.Converter.NumberTypeConverter">
+ <summary>
+ A TypeConverter that support string conversion from and to string with a custom format number.
+ Support Conversion for Float, Double and Decimal, Int
+ </summary>
+ </member>
+ <member name="T:DevAge.Text.FixedLength.FieldList">
+ <summary>
+ A dictionary with keys of type string and values of type IField
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.#ctor">
+ <summary>
+ Initializes a new empty instance of the FieldList class
+ </summary>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.Add(DevAge.Text.FixedLength.IField)">
+ <summary>
+ Adds an element with the specified key and value to this FieldList.
+ </summary>
+ <param name="key">
+ The string key of the element to add.
+ </param>
+ <param name="value">
+ The IField value of the element to add.
+ </param>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.Contains(System.String)">
+ <summary>
+ Determines whether this FieldList contains a specific key.
+ </summary>
+ <param name="fieldName">
+ The string key to locate in this FieldList.
+ </param>
+ <returns>
+ true if this FieldList contains an element with the specified key;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.ContainsKey(System.String)">
+ <summary>
+ Determines whether this FieldList contains a specific key.
+ </summary>
+ <param name="key">
+ The string key to locate in this FieldList.
+ </param>
+ <returns>
+ true if this FieldList contains an element with the specified key;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.ContainsValue(DevAge.Text.FixedLength.IField)">
+ <summary>
+ Determines whether this FieldList contains a specific value.
+ </summary>
+ <param name="value">
+ The IField value to locate in this FieldList.
+ </param>
+ <returns>
+ true if this FieldList contains an element with the specified value;
+ otherwise, false.
+ </returns>
+ </member>
+ <member name="M:DevAge.Text.FixedLength.FieldList.Remove(System.String)">
+ <summary>
+ Removes the element with the specified key from this FieldList.
+ </summary>
+ <param name="fieldName">
+ The string key of the element to remove.
+ </param>
+ </member>
+ <member name="P:DevAge.Text.FixedLength.FieldList.Item(System.String)">
+ <summary>
+ Gets or sets the IField associated with the given string
+ </summary>
+ <param name="key">
+ The string whose value to get or set.
+ </param>
+ </member>
+ <member name="P:DevAge.Text.FixedLength.FieldList.Keys">
+ <summary>
+ Gets a collection containing the keys in this FieldList.
+ </summary>
+ </member>
+ <member name="P:DevAge.Text.FixedLength.FieldList.Values">
+ <summary>
+ Gets a collection containing the values in this FieldList.
+ </summary>
+ </member>
+ <member name="T:DevAge.Shell.Utilities">
+ <summary>
+ Shell utilities
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.ActivityCanceledException">
+ <summary>
+ Exception fired when canceling an activity with the Cancel method.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityCanceledException.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.ActivityStatusNotValidException">
+ <summary>
+ Exception fired when canceling an activity with the Cancel method.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.ActivityStatusNotValidException.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.TimeOutActivityException">
+ <summary>
+ Exception fired when a time out is encountered.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.TimeOutActivityException.#ctor">
+ <summary>
+ Constructor
+ </summary>
+ </member>
+ <member name="T:DevAge.Patterns.SubActivityException">
+ <summary>
+ Exception fired when a time out is encountered.
+ </summary>
+ </member>
+ <member name="M:DevAge.Patterns.SubActivityException.#ctor(System.String,System.Exception)">
+ <summary>
+ Constructor
+ </summary>
+ <param name="activityName"></param>
+ <param name="innerException"></param>
+ </member>
+ <member name="T:DevAge.IO.IsolatedStorage.IsolatedStorageSettingBase">
+ <summary>
+ Abstract class that help to save settings in the isolated storage
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.Validator.ValidatorTypeConverter">
+ <summary>
+ A string editor that use a TypeConverter for conversion.
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.Validator.ValidatorBase">
+ <summary>
+ A base class to support value conversion and validation. This class is used if no conversion is required or as a base class for specialized validator.
+ Naming Legend:
+ Object = an object not yet converted for the current validator,
+ Value = an object already converted and valid for the current validator,
+ String = a string that can be used for conversion to and from Value,
+ DisplayString = a string representation of the Value
+ </summary>
+ </member>
+ <member name="T:DevAge.ComponentModel.ComponentLight">
+ <summary>
+ A IComponent implementation, used as a base class for component derived class. It is similar to the System Component class but doesn't derive from MarshalByRef class, for this reason it is faster and consume less resources.
+ Can be serialized.
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.ComponentLight.#ctor">
+ <summary>
+ Default constructor
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.ComponentLight.#ctor(DevAge.ComponentModel.ComponentLight)">
+ <summary>
+ Copy constructor
+ </summary>
+ <param name="other"></param>
+ </member>
+ <member name="T:DevAge.ComponentModel.Validator.IValidator">
+ <summary>
+ An interface to support value conversion and validation.
+ Naming Legend:
+ Object = an object not yet converted for the current validator,
+ Value = an object already converted and valid for the current validator,
+ String = a string that can be used for conversion to and from Value,
+ DisplayString = a string representation of the Value
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsNullString(System.String)">
+ <summary>
+ Returns true if the string is null or if is equals to the NullString
+ </summary>
+ <param name="p_str"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.ObjectToValue(System.Object)">
+ <summary>
+ Convert an object according to the current ValueType of the validator
+ </summary>
+ <param name="p_Object"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToObject(System.Object,System.Type)">
+ <summary>
+ Convert a value valid for the current validator ValueType to an object with the Type specified. Throw an exception on error.
+ </summary>
+ <param name="p_Value"></param>
+ <param name="p_ReturnObjectType"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToString(System.Object)">
+ <summary>
+ Convert a value valid for the current validator ValueType to a string that can be used for other conversions, for example StringToValue method.
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.StringToValue(System.String)">
+ <summary>
+ Converts a string to an object according to the type of the string editor
+ </summary>
+ <param name="p_str"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsStringConversionSupported">
+ <summary>
+ Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion.
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToDisplayString(System.Object)">
+ <summary>
+ Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion.
+ If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString()
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidValue(System.Object)">
+ <summary>
+ Returns true if the value is valid for this type of editor without any conversion.
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object)">
+ <summary>
+ Returns true if the object is valid for this type of validator, using conversion functions.
+ </summary>
+ <param name="p_Object"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object,System.Object@)">
+ <summary>
+ Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted.
+ </summary>
+ <param name="p_Object"></param>
+ <param name="p_ValueConverted"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String)">
+ <summary>
+ Returns true if the string is valid for this type of editor, using string conversion function.
+ </summary>
+ <param name="p_strValue"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String,System.Object@)">
+ <summary>
+ Returns true if the string is valid for this type of editor, using string conversion function. An returns the object converted.
+ </summary>
+ <param name="p_strValue"></param>
+ <param name="p_ValueConverted"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.IsInStandardValues(System.Object)">
+ <summary>
+ Returns true if the value specified is presents in the list StandardValues.
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValueAtIndex(System.Int32)">
+ <summary>
+ Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
+ </summary>
+ <param name="p_Index"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValuesIndexOf(System.Object)">
+ <summary>
+ Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
+ </summary>
+ <param name="p_StandardValue"></param>
+ <returns></returns>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowNull">
+ <summary>
+ True to allow null object value or NullString string Value
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.NullString">
+ <summary>
+ Null string representation. A string is null when is null or when is equals to this string. Default is empty string.
+ Used by ValueToString and StringToValue
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.NullDisplayString">
+ <summary>
+ Null string representation. A string is null when is null or when is equals to this string. Default is empty string.
+ Used by ValueToDisplayString
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowStringConversion">
+ <summary>
+ Gets or Sets if the string conversion is allowed.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.MinimumValue">
+ <summary>
+ Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.MaximumValue">
+ <summary>
+ Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.ValueType">
+ <summary>
+ Type allowed for the current editor. Cannot be null.
+ </summary>
+ </member>
+ <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingObjectToValue">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ </member>
+ <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToObject">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ </member>
+ <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToDisplayString">
+ <summary>
+ Fired when converting a value to a display string. Called from method ValueToDisplayString
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.DefaultValue">
+ <summary>
+ Default value for this editor, usually is the default value for the specified type.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValues">
+ <summary>
+ A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValuesExclusive">
+ <summary>
+ If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues.
+ </summary>
+ </member>
+ <member name="P:DevAge.ComponentModel.Validator.IValidator.CultureInfo">
+ <summary>
+ Culture for conversion. If null the default user culture is used. Default is null.
+ </summary>
+ </member>
+ <member name="E:DevAge.ComponentModel.Validator.IValidator.Changed">
+ <summary>
+ Fired when one of the properties of the Validator change.
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor">
+ <summary>
+ Constructor. Initialize the class using a null type.
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor(System.Type)">
+ <summary>
+ Constructor.
+ </summary>
+ <param name="type">The type used to validate the values. If null no validation is made.</param>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsNullString(System.String)">
+ <summary>
+ Returns true if the string is null or if is equals to the NullString
+ </summary>
+ <param name="p_str"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToStringForError(System.Object)">
+ <summary>
+ Returns a string used for error description for a specified object. Usually used when printing the object for the error message when there is a conversion error.
+ </summary>
+ <param name="val"></param>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToValue(System.Object)">
+ <summary>
+ Convert an object according to the current ValueType of the validator
+ </summary>
+ <param name="p_Object"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToObject(System.Object,System.Type)">
+ <summary>
+ Convert a value according to the current ValueType to an object with the Type specified. Throw an exception on error.
+ </summary>
+ <param name="p_Value"></param>
+ <param name="p_ReturnObjectType"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToString(System.Object)">
+ <summary>
+ Converts a value object to a string representation
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StringToValue(System.String)">
+ <summary>
+ Converts a string to an object according to the type of the string editor
+ </summary>
+ <param name="p_str"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsStringConversionSupported">
+ <summary>
+ Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion.
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToDisplayString(System.Object)">
+ <summary>
+ Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion.
+ If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString()
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingObjectToValue">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ </member>
+ <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToObject">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ </member>
+ <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToDisplayString">
+ <summary>
+ Fired when converting a value to a display string. Called from method ValueToDisplayString
+ </summary>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingObjectToValue(DevAge.ComponentModel.ConvertingObjectEventArgs)">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ <param name="e"></param>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToObject(DevAge.ComponentModel.ConvertingObjectEventArgs)">
+ <summary>
+ Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
+ </summary>
+ <param name="e"></param>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToDisplayString(DevAge.ComponentModel.ConvertingObjectEventArgs)">
+ <summary>
+ Fired when converting a value to a display string. Called from method ValueToDisplayString
+ </summary>
+ <param name="e"></param>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidValue(System.Object)">
+ <summary>
+ Returns true if the value is valid for this type of editor without any conversion.
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object)">
+ <summary>
+ Returns true if the object is valid for this type of validator, using conversion functions.
+ </summary>
+ <param name="p_Object"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object,System.Object@)">
+ <summary>
+ Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted.
+ </summary>
+ <param name="p_Object"></param>
+ <param name="p_ValueConverted"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String)">
+ <summary>
+ Returns true if the string is valid for this type of editor, using string conversion function.
+ </summary>
+ <param name="p_strValue"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String,System.Object@)">
+ <summary>
+ Returns true if the string is valid for this type of editor, using string conversion function. Returns as out parameter the object converted.
+ </summary>
+ <param name="p_strValue"></param>
+ <param name="p_ValueConverted"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsInStandardValues(System.Object)">
+ <summary>
+ Returns true if the value specified is presents in the list StandardValues.
+ </summary>
+ <param name="p_Value"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValueAtIndex(System.Int32)">
+ <summary>
+ Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
+ </summary>
+ <param name="p_Index"></param>
+ <returns></returns>
+ </member>
+ <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesIndexOf(System.Object)">
+ <summary>
+ Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
+ </summary>
+ ...
[truncated message content] |
|
From: <an...@us...> - 2007-06-10 17:28:50
|
Revision: 504
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=504&view=rev
Author: and-81
Date: 2007-06-10 10:28:47 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -33,22 +33,16 @@
this.buttonOK = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.buttonConfigureTransceiver = new System.Windows.Forms.Button();
- this.textBoxPlugin = new System.Windows.Forms.TextBox();
this.checkBoxRunAtBoot = new System.Windows.Forms.CheckBox();
this.radioButtonServer = new System.Windows.Forms.RadioButton();
this.radioButtonRelay = new System.Windows.Forms.RadioButton();
this.radioButtonRepeater = new System.Windows.Forms.RadioButton();
- this.listViewTransceiver = new System.Windows.Forms.ListView();
- this.columnHeaderTransceiver = new System.Windows.Forms.ColumnHeader();
- this.columnHeaderCanReceive = new System.Windows.Forms.ColumnHeader();
- this.columnHeaderCanTransmit = new System.Windows.Forms.ColumnHeader();
this.groupBoxTransceiver = new System.Windows.Forms.GroupBox();
+ this.gridPlugins = new SourceGrid.Grid();
this.groupBoxMode = new System.Windows.Forms.GroupBox();
this.labelComputer = new System.Windows.Forms.Label();
this.comboBoxComputer = new System.Windows.Forms.ComboBox();
this.buttonHelp = new System.Windows.Forms.Button();
- this.labelCurrentPlugin = new System.Windows.Forms.Label();
this.groupBoxTransceiver.SuspendLayout();
this.groupBoxMode.SuspendLayout();
this.SuspendLayout();
@@ -76,34 +70,6 @@
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
- // buttonConfigureTransceiver
- //
- this.buttonConfigureTransceiver.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonConfigureTransceiver.Enabled = false;
- this.buttonConfigureTransceiver.Location = new System.Drawing.Point(344, 224);
- this.buttonConfigureTransceiver.Name = "buttonConfigureTransceiver";
- this.buttonConfigureTransceiver.Size = new System.Drawing.Size(72, 24);
- this.buttonConfigureTransceiver.TabIndex = 2;
- this.buttonConfigureTransceiver.Text = "Configure";
- this.toolTips.SetToolTip(this.buttonConfigureTransceiver, "Configure the remote control transceiver");
- this.buttonConfigureTransceiver.UseVisualStyleBackColor = true;
- this.buttonConfigureTransceiver.Click += new System.EventHandler(this.buttonConfigureTransceiver_Click);
- //
- // textBoxPlugin
- //
- this.textBoxPlugin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxPlugin.BackColor = System.Drawing.SystemColors.ControlLight;
- this.textBoxPlugin.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.textBoxPlugin.Location = new System.Drawing.Point(104, 224);
- this.textBoxPlugin.Name = "textBoxPlugin";
- this.textBoxPlugin.ReadOnly = true;
- this.textBoxPlugin.Size = new System.Drawing.Size(232, 24);
- this.textBoxPlugin.TabIndex = 1;
- this.textBoxPlugin.Text = "None set";
- this.textBoxPlugin.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.toolTips.SetToolTip(this.textBoxPlugin, "Currently selected Remote Transceiver");
- //
// checkBoxRunAtBoot
//
this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
@@ -151,56 +117,12 @@
this.radioButtonRepeater.UseVisualStyleBackColor = true;
this.radioButtonRepeater.CheckedChanged += new System.EventHandler(this.radioButtonRepeater_CheckedChanged);
//
- // listViewTransceiver
- //
- this.listViewTransceiver.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.listViewTransceiver.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.columnHeaderTransceiver,
- this.columnHeaderCanReceive,
- this.columnHeaderCanTransmit});
- this.listViewTransceiver.FullRowSelect = true;
- this.listViewTransceiver.GridLines = true;
- this.listViewTransceiver.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.listViewTransceiver.HideSelection = false;
- this.listViewTransceiver.Location = new System.Drawing.Point(8, 24);
- this.listViewTransceiver.MultiSelect = false;
- this.listViewTransceiver.Name = "listViewTransceiver";
- this.listViewTransceiver.ShowGroups = false;
- this.listViewTransceiver.ShowItemToolTips = true;
- this.listViewTransceiver.Size = new System.Drawing.Size(408, 192);
- this.listViewTransceiver.TabIndex = 0;
- this.listViewTransceiver.UseCompatibleStateImageBehavior = false;
- this.listViewTransceiver.View = System.Windows.Forms.View.Details;
- this.listViewTransceiver.DoubleClick += new System.EventHandler(this.listViewTransceiver_DoubleClick);
- //
- // columnHeaderTransceiver
- //
- this.columnHeaderTransceiver.Text = "Name";
- this.columnHeaderTransceiver.Width = 240;
- //
- // columnHeaderCanReceive
- //
- this.columnHeaderCanReceive.Text = "Receiver";
- this.columnHeaderCanReceive.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.columnHeaderCanReceive.Width = 70;
- //
- // columnHeaderCanTransmit
- //
- this.columnHeaderCanTransmit.Text = "Blaster";
- this.columnHeaderCanTransmit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.columnHeaderCanTransmit.Width = 70;
- //
// groupBoxTransceiver
//
this.groupBoxTransceiver.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxTransceiver.Controls.Add(this.labelCurrentPlugin);
- this.groupBoxTransceiver.Controls.Add(this.textBoxPlugin);
- this.groupBoxTransceiver.Controls.Add(this.listViewTransceiver);
- this.groupBoxTransceiver.Controls.Add(this.buttonConfigureTransceiver);
+ this.groupBoxTransceiver.Controls.Add(this.gridPlugins);
this.groupBoxTransceiver.Location = new System.Drawing.Point(8, 8);
this.groupBoxTransceiver.Name = "groupBoxTransceiver";
this.groupBoxTransceiver.Size = new System.Drawing.Size(424, 256);
@@ -208,6 +130,22 @@
this.groupBoxTransceiver.TabStop = false;
this.groupBoxTransceiver.Text = "Device plugin";
//
+ // gridPlugins
+ //
+ this.gridPlugins.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.gridPlugins.BackColor = System.Drawing.SystemColors.Window;
+ this.gridPlugins.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.gridPlugins.Location = new System.Drawing.Point(16, 24);
+ this.gridPlugins.Name = "gridPlugins";
+ this.gridPlugins.OptimizeMode = SourceGrid.CellOptimizeMode.ForRows;
+ this.gridPlugins.SelectionMode = SourceGrid.GridSelectionMode.Row;
+ this.gridPlugins.Size = new System.Drawing.Size(392, 216);
+ this.gridPlugins.TabIndex = 0;
+ this.gridPlugins.TabStop = true;
+ this.gridPlugins.ToolTipText = "";
+ //
// groupBoxMode
//
this.groupBoxMode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
@@ -230,7 +168,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.labelComputer.Location = new System.Drawing.Point(160, 24);
this.labelComputer.Name = "labelComputer";
- this.labelComputer.Size = new System.Drawing.Size(256, 64);
+ this.labelComputer.Size = new System.Drawing.Size(248, 64);
this.labelComputer.TabIndex = 3;
this.labelComputer.Text = "Button Relay / IR Repeater mode host computer:";
this.labelComputer.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
@@ -245,7 +183,7 @@
this.comboBoxComputer.FormattingEnabled = true;
this.comboBoxComputer.Location = new System.Drawing.Point(160, 88);
this.comboBoxComputer.Name = "comboBoxComputer";
- this.comboBoxComputer.Size = new System.Drawing.Size(256, 21);
+ this.comboBoxComputer.Size = new System.Drawing.Size(248, 21);
this.comboBoxComputer.TabIndex = 4;
//
// buttonHelp
@@ -259,16 +197,6 @@
this.buttonHelp.UseVisualStyleBackColor = true;
this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
//
- // labelCurrentPlugin
- //
- this.labelCurrentPlugin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.labelCurrentPlugin.Location = new System.Drawing.Point(8, 224);
- this.labelCurrentPlugin.Name = "labelCurrentPlugin";
- this.labelCurrentPlugin.Size = new System.Drawing.Size(96, 24);
- this.labelCurrentPlugin.TabIndex = 3;
- this.labelCurrentPlugin.Text = "Current plugin:";
- this.labelCurrentPlugin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// Config
//
this.AcceptButton = this.buttonOK;
@@ -287,9 +215,7 @@
this.Name = "Config";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "IR Server - Configuration";
- this.Load += new System.EventHandler(this.Config_Load);
this.groupBoxTransceiver.ResumeLayout(false);
- this.groupBoxTransceiver.PerformLayout();
this.groupBoxMode.ResumeLayout(false);
this.ResumeLayout(false);
@@ -301,12 +227,6 @@
private System.Windows.Forms.Button buttonCancel;
private System.Windows.Forms.ToolTip toolTips;
private System.Windows.Forms.GroupBox groupBoxTransceiver;
- private System.Windows.Forms.Button buttonConfigureTransceiver;
- private System.Windows.Forms.ListView listViewTransceiver;
- private System.Windows.Forms.ColumnHeader columnHeaderTransceiver;
- private System.Windows.Forms.ColumnHeader columnHeaderCanReceive;
- private System.Windows.Forms.ColumnHeader columnHeaderCanTransmit;
- private System.Windows.Forms.TextBox textBoxPlugin;
private System.Windows.Forms.GroupBox groupBoxMode;
private System.Windows.Forms.CheckBox checkBoxRunAtBoot;
private System.Windows.Forms.ComboBox comboBoxComputer;
@@ -315,6 +235,6 @@
private System.Windows.Forms.RadioButton radioButtonServer;
private System.Windows.Forms.RadioButton radioButtonRepeater;
private System.Windows.Forms.Label labelComputer;
- private System.Windows.Forms.Label labelCurrentPlugin;
+ private SourceGrid.Grid gridPlugins;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -60,12 +60,67 @@
get { return comboBoxComputer.Text; }
set { comboBoxComputer.Text = value; }
}
- public string Plugin
+ public string PluginReceive
{
- get { return textBoxPlugin.Text; }
- set { textBoxPlugin.Text = value; }
+ get
+ {
+ SourceGrid.Cells.CheckBox checkBox;
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null && checkBox.Checked)
+ return gridPlugins[row, 0].DisplayText;
+ }
+
+ return String.Empty;
+ }
+ set
+ {
+ SourceGrid.Cells.CheckBox checkBox;
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox;
+ if (checkBox == null)
+ continue;
+
+ if (gridPlugins[row, 0].DisplayText.Equals(value, StringComparison.InvariantCultureIgnoreCase))
+ checkBox.Checked = true;
+ else
+ checkBox.Checked = false;
+ }
+ }
}
+ public string PluginTransmit
+ {
+ get
+ {
+ SourceGrid.Cells.CheckBox checkBox;
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null && checkBox.Checked)
+ return gridPlugins[row, 0].DisplayText;
+ }
+ return String.Empty;
+ }
+ set
+ {
+ SourceGrid.Cells.CheckBox checkBox;
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox;
+ if (checkBox == null)
+ continue;
+
+ if (gridPlugins[row, 0].DisplayText.Equals(value, StringComparison.InvariantCultureIgnoreCase))
+ checkBox.Checked = true;
+ else
+ checkBox.Checked = false;
+ }
+ }
+ }
+
#endregion Properties
#region Constructor
@@ -76,28 +131,13 @@
// Add transceivers to list ...
_transceivers = Program.AvailablePlugins();
-
- listViewTransceiver.Items.Clear();
-
if (_transceivers == null || _transceivers.Length == 0)
{
MessageBox.Show(this, "No IR Server Plugins found!", "IR Server Configuration", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
- foreach (IIRServerPlugin transceiver in _transceivers)
- {
- ListViewItem listViewItem = new ListViewItem(
- new string[] {
- transceiver.Name,
- transceiver.CanReceive.ToString(),
- transceiver.CanTransmit.ToString()
- });
-
- listViewItem.ToolTipText = String.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description);
-
- listViewTransceiver.Items.Add(listViewItem);
- }
+ CreateGrid();
}
try
@@ -115,17 +155,98 @@
if (computer != Environment.MachineName)
comboBoxComputer.Items.Add(computer);
}
-
}
#endregion Constructor
- private void Config_Load(object sender, EventArgs e)
+ void CreateGrid()
{
- if (_transceivers != null && !String.IsNullOrEmpty(textBoxPlugin.Text))
- foreach (IIRServerPlugin tx in _transceivers)
- if (tx.Name == textBoxPlugin.Text)
- buttonConfigureTransceiver.Enabled = tx.CanConfigure;
+ int row = 0;
+ gridPlugins.Rows.Clear();
+
+ gridPlugins.Columns.SetCount(4);
+
+ gridPlugins.Rows.Insert(row);
+ SourceGrid.Cells.ColumnHeader headerCell;
+
+ headerCell = new SourceGrid.Cells.ColumnHeader("Name");
+ gridPlugins[row, 0] = headerCell;
+
+ headerCell = new SourceGrid.Cells.ColumnHeader("Receive");
+ gridPlugins[row, 1] = headerCell;
+
+ headerCell = new SourceGrid.Cells.ColumnHeader("Transmit");
+ gridPlugins[row, 2] = headerCell;
+
+ headerCell = new SourceGrid.Cells.ColumnHeader("Configure");
+ gridPlugins[row, 3] = headerCell;
+
+ gridPlugins.FixedRows = 1;
+
+ row++;
+
+ foreach (IIRServerPlugin transceiver in _transceivers)
+ {
+ gridPlugins.Rows.Insert(row);
+
+ SourceGrid.Cells.Cell nameCell = new SourceGrid.Cells.Cell(transceiver.Name);
+
+ SourceGrid.Cells.Controllers.CustomEvents nameCellController = new SourceGrid.Cells.Controllers.CustomEvents();
+ nameCellController.DoubleClick += new EventHandler(PluginDoubleClick);
+ nameCell.AddController(nameCellController);
+
+ nameCell.ToolTipText = string.Format("{0}\nVersion: {1}\nAuthor: {2}\n{3}", transceiver.Name, transceiver.Version, transceiver.Author, transceiver.Description);
+
+ gridPlugins[row, 0] = nameCell;
+
+ if (transceiver.CanReceive)
+ {
+ SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox();
+
+ SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents();
+ checkboxcontroller.ValueChanged += new EventHandler(ReceiveChanged);
+ checkbox.Controller.AddController(checkboxcontroller);
+
+ gridPlugins[row, 1] = checkbox;
+ }
+ else
+ gridPlugins[row, 1] = new SourceGrid.Cells.Cell();
+
+ if (transceiver.CanTransmit)
+ {
+ SourceGrid.Cells.CheckBox checkbox = new SourceGrid.Cells.CheckBox();
+
+ SourceGrid.Cells.Controllers.CustomEvents checkboxcontroller = new SourceGrid.Cells.Controllers.CustomEvents();
+ checkboxcontroller.ValueChanged += new EventHandler(TransmitChanged);
+ checkbox.Controller.AddController(checkboxcontroller);
+
+ gridPlugins[row, 2] = checkbox;
+ }
+ else
+ gridPlugins[row, 2] = new SourceGrid.Cells.Cell();
+
+ if (transceiver.CanConfigure)
+ {
+ SourceGrid.Cells.Button button = new SourceGrid.Cells.Button("Configure");
+
+ SourceGrid.Cells.Controllers.Button buttonClickEvent = new SourceGrid.Cells.Controllers.Button();
+ buttonClickEvent.Executed += new EventHandler(buttonClickEvent_Executed);
+ button.Controller.AddController(buttonClickEvent);
+
+ gridPlugins[row, 3] = button;
+ }
+ else
+ gridPlugins[row, 3] = new SourceGrid.Cells.Cell();
+
+ row++;
+ }
+
+ gridPlugins.Columns[0].AutoSizeMode = SourceGrid.AutoSizeMode.Default;
+ gridPlugins.Columns[1].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize;
+ gridPlugins.Columns[2].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize;
+ gridPlugins.Columns[3].AutoSizeMode = SourceGrid.AutoSizeMode.EnableAutoSize;
+ gridPlugins.AutoStretchColumnsToFitWidth = true;
+ gridPlugins.AutoSizeCells();
}
#region Controls
@@ -153,24 +274,64 @@
this.Close();
}
- private void buttonConfigureTransceiver_Click(object sender, EventArgs e)
+ private void buttonClickEvent_Executed(object sender, EventArgs e)
{
- if (String.IsNullOrEmpty(textBoxPlugin.Text))
+ SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
+ SourceGrid.Cells.Button cell = (SourceGrid.Cells.Button)context.Cell;
+
+ string plugin = gridPlugins[cell.Row.Index, 0].DisplayText;
+
+ foreach (IIRServerPlugin transceiver in _transceivers)
+ if (transceiver.Name == plugin)
+ transceiver.Configure();
+ }
+
+ private void ReceiveChanged(object sender, EventArgs e)
+ {
+ SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
+ SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell;
+
+ if (!cell.Checked)
return;
- foreach (IIRServerPlugin tx in _transceivers)
- if (tx.Name == textBoxPlugin.Text)
- if (tx.CanConfigure)
- tx.Configure();
+ string plugin = gridPlugins[cell.Row.Index, 0].DisplayText;
+
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.InvariantCultureIgnoreCase))
+ checkBox.Checked = false;
+ }
}
+ private void TransmitChanged(object sender, EventArgs e)
+ {
+ SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
+ SourceGrid.Cells.CheckBox cell = (SourceGrid.Cells.CheckBox)context.Cell;
- private void listViewTransceiver_DoubleClick(object sender, EventArgs e)
+ if (!cell.Checked)
+ return;
+
+ string plugin = gridPlugins[cell.Row.Index, 0].DisplayText;
+
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ SourceGrid.Cells.CheckBox checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null && checkBox.Checked && !gridPlugins[row, 0].DisplayText.Equals(plugin, StringComparison.InvariantCultureIgnoreCase))
+ checkBox.Checked = false;
+ }
+ }
+ private void PluginDoubleClick(object sender, EventArgs e)
{
- textBoxPlugin.Text = (sender as ListView).FocusedItem.Text;
+ SourceGrid.CellContext context = (SourceGrid.CellContext)sender;
+ SourceGrid.Cells.Cell cell = (SourceGrid.Cells.Cell)context.Cell;
- foreach (IIRServerPlugin tx in _transceivers)
- if (tx.Name == textBoxPlugin.Text)
- buttonConfigureTransceiver.Enabled = tx.CanConfigure;
+ SourceGrid.Cells.CheckBox checkBoxReceive = gridPlugins[cell.Row.Index, 1] as SourceGrid.Cells.CheckBox;
+ if (checkBoxReceive != null)
+ checkBoxReceive.Checked = true;
+
+ SourceGrid.Cells.CheckBox checkBoxTransmit = gridPlugins[cell.Row.Index, 2] as SourceGrid.Cells.CheckBox;
+ if (checkBoxTransmit != null)
+ checkBoxTransmit.Checked = true;
}
private void buttonHelp_Click(object sender, EventArgs e)
@@ -185,23 +346,21 @@
}
}
- #endregion Controls
-
private void radioButtonServer_CheckedChanged(object sender, EventArgs e)
{
comboBoxComputer.Enabled = false;
}
-
private void radioButtonRelay_CheckedChanged(object sender, EventArgs e)
{
comboBoxComputer.Enabled = true;
}
-
private void radioButtonRepeater_CheckedChanged(object sender, EventArgs e)
{
comboBoxComputer.Enabled = true;
}
+ #endregion Controls
+
}
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-06-10 17:28:47 UTC (rev 504)
@@ -57,6 +57,18 @@
</DocumentationFile>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="DevAge.Core, Version=4.6.2660.128, Culture=neutral, PublicKeyToken=faad465d84242dbf, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>SourceGrid\DevAge.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="DevAge.Windows.Forms, Version=4.6.2660.128, Culture=neutral, PublicKeyToken=faad465d84242dbf, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>SourceGrid\DevAge.Windows.Forms.dll</HintPath>
+ </Reference>
+ <Reference Include="SourceGrid, Version=4.7.2662.1973, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>SourceGrid\SourceGrid.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -68,9 +68,12 @@
string _localPipeName = String.Empty;
bool _registered = false;
- string _pluginName = String.Empty;
- IIRServerPlugin _plugin = null;
+ string _pluginNameReceive = String.Empty;
+ IIRServerPlugin _pluginReceive = null;
+ string _pluginNameTransmit = String.Empty;
+ IIRServerPlugin _pluginTransmit = null;
+
bool _inConfiguration = false;
#endregion Variables
@@ -86,8 +89,6 @@
_notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
_notifyIcon.Icon = Properties.Resources.Icon16;
_notifyIcon.Text = "IR Server";
-
-
}
#endregion Constructor
@@ -97,30 +98,36 @@
/// <summary>
/// Start the server
/// </summary>
- /// <returns>returns true if successful</returns>
+ /// <returns>success</returns>
internal bool Start()
{
try
{
- IrssLog.Debug("Starting IR Server ...");
+ IrssLog.Info("Starting IR Server ...");
LoadSettings();
- // Try to load the IR Plugin, if it fails (for whatever reason) then run configuration.
- _plugin = null;
- while (_plugin == null)
+ // Load IR Plugins ...
+ _pluginReceive = null;
+ _pluginTransmit = null;
+
+ if (String.IsNullOrEmpty(_pluginNameReceive) && String.IsNullOrEmpty(_pluginNameTransmit))
{
- _plugin = Program.GetPlugin(_pluginName);
+ IrssLog.Warn("No transmit/receive plugin loaded");
+ }
+ else
+ {
+ if (!String.IsNullOrEmpty(_pluginNameReceive))
+ _pluginReceive = Program.GetPlugin(_pluginNameReceive);
+ else
+ IrssLog.Warn("No receiver plugin loaded");
- if (_plugin == null)
- {
- IrssLog.Warn("Failed to load plugin \"{0}\"", _pluginName);
-
- if (Configure())
- SaveSettings();
- else
- return false;
- }
+ if (_pluginNameTransmit.Equals(_pluginNameReceive, StringComparison.InvariantCultureIgnoreCase))
+ _pluginTransmit = _pluginReceive;
+ else if (!String.IsNullOrEmpty(_pluginNameTransmit))
+ _pluginTransmit = Program.GetPlugin(_pluginNameTransmit);
+ else
+ IrssLog.Warn("No transmit plugin loaded");
}
StartMessageQueue();
@@ -166,32 +173,39 @@
}
}
- // Start transceiver ...
- if (!_plugin.Start())
+ // Start plugin(s) ...
+ if (_pluginReceive != null)
{
- IrssLog.Error("Failed to start transceiver plugin: \"{0}\"", _pluginName);
-
- if (PipeAccess.ServerRunning)
- PipeAccess.StopServer();
- return false;
+ if (_pluginReceive.Start())
+ IrssLog.Info("Receiver plugin started: \"{0}\"", _pluginNameReceive);
+ else
+ IrssLog.Error("Failed to start receive plugin: \"{0}\"", _pluginNameReceive);
}
+ if (!_pluginNameTransmit.Equals(_pluginNameReceive, StringComparison.InvariantCultureIgnoreCase))
+ {
+ if (_pluginTransmit != null)
+ {
+ if (_pluginTransmit.Start())
+ IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit);
+ else
+ IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit);
+ }
+ }
- IrssLog.Info("Transceiver plugin started: \"{0}\"", _pluginName);
+ if (_pluginReceive != null && _pluginReceive.CanReceive)
+ _pluginReceive.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed);
- if (_plugin.CanReceive)
- _plugin.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed);
-
_notifyIcon.Visible = true;
IrssLog.Info("IR Server started");
+
+ return true;
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
return false;
}
-
- return true;
}
/// <summary>
@@ -203,18 +217,28 @@
_notifyIcon.Visible = false;
- if (_plugin.CanReceive)
- _plugin.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed);
+ if (_pluginReceive != null && _pluginReceive.CanReceive)
+ _pluginReceive.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed);
- // Stop Plugin
+ // Stop Plugin(s)
try
{
- _plugin.Stop();
+ if (_pluginReceive != null)
+ _pluginReceive.Stop();
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
}
+ try
+ {
+ if (_pluginTransmit != null)
+ _pluginTransmit.Stop();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
// Stop Message Queue
try
@@ -257,18 +281,20 @@
try
{
- Config config = new Config();
- config.Mode = _mode;
- config.HostComputer = _hostComputer;
- config.Plugin = _pluginName;
+ Config config = new Config();
+ config.Mode = _mode;
+ config.HostComputer = _hostComputer;
+ config.PluginReceive = _pluginNameReceive;
+ config.PluginTransmit = _pluginNameTransmit;
if (config.ShowDialog() == DialogResult.OK)
{
- _mode = config.Mode;
- _hostComputer = config.HostComputer;
- _pluginName = config.Plugin;
+ _mode = config.Mode;
+ _hostComputer = config.HostComputer;
+ _pluginNameReceive = config.PluginReceive;
+ _pluginNameTransmit = config.PluginTransmit;
- _inConfiguration = false;
+ _inConfiguration = false;
return true;
}
@@ -726,16 +752,16 @@
{
IrssLog.Debug("Blast IR");
- if (!_plugin.CanTransmit)
+ if (_pluginTransmit == null || !_pluginTransmit.CanTransmit)
return false;
int portLen = BitConverter.ToInt32(data, 0);
if (portLen > 0)
- _plugin.SetPort(Encoding.ASCII.GetString(data, 4, portLen));
+ _pluginTransmit.SetPort(Encoding.ASCII.GetString(data, 4, portLen));
int speedLen = BitConverter.ToInt32(data, 4 + portLen);
if (speedLen > 0)
- _plugin.SetSpeed(Encoding.ASCII.GetString(data, 4 + portLen + 4, speedLen));
+ _pluginTransmit.SetSpeed(Encoding.ASCII.GetString(data, 4 + portLen + 4, speedLen));
byte[] fileData = new byte[data.Length - (4 + portLen + 4 + speedLen)];
for (int index = (4 + portLen + 4 + speedLen); index < data.Length; index++)
@@ -748,7 +774,7 @@
fileStream.Flush();
fileStream.Close();
- bool result = _plugin.Transmit(tempFile);
+ bool result = _pluginTransmit.Transmit(tempFile);
File.Delete(tempFile);
@@ -767,7 +793,7 @@
Thread.Sleep(500);
- if (!_plugin.CanLearn)
+ if (_pluginTransmit == null || !_pluginTransmit.CanLearn)
{
IrssLog.Debug("Active transceiver doesn't support learn");
return null;
@@ -780,7 +806,7 @@
{
string tempFile = Path.GetTempFileName();
- LearnStatus status = _plugin.Learn(tempFile);
+ LearnStatus status = _pluginTransmit.Learn(tempFile);
switch (status)
{
case LearnStatus.Success:
@@ -948,16 +974,25 @@
{
response.Name = received.Name + " Success";
- // Transceiver Info ...
TransceiverInfo transceiverInfo = new TransceiverInfo();
- transceiverInfo.Name = _plugin.Name;
- transceiverInfo.Ports = _plugin.AvailablePorts;
- transceiverInfo.Speeds = _plugin.AvailableSpeeds;
- transceiverInfo.CanConfigure = _plugin.CanConfigure;
- transceiverInfo.CanLearn = _plugin.CanLearn;
- transceiverInfo.CanReceive = _plugin.CanReceive;
- transceiverInfo.CanTransmit = _plugin.CanTransmit;
+ if (_pluginReceive != null)
+ {
+ transceiverInfo.Name = _pluginReceive.Name;
+ transceiverInfo.CanReceive = _pluginReceive.CanReceive;
+ }
+
+ if (_pluginTransmit != null)
+ {
+ if (String.IsNullOrEmpty(transceiverInfo.Name))
+ transceiverInfo.Name = _pluginTransmit.Name;
+
+ transceiverInfo.Ports = _pluginTransmit.AvailablePorts;
+ transceiverInfo.Speeds = _pluginTransmit.AvailableSpeeds;
+ transceiverInfo.CanLearn = _pluginTransmit.CanLearn;
+ transceiverInfo.CanTransmit = _pluginTransmit.CanTransmit;
+ }
+
response.Data = TransceiverInfo.ToBytes(transceiverInfo);
}
@@ -1032,13 +1067,13 @@
void ClickSetup(object sender, EventArgs e)
{
- IrssLog.Info("Setup");
-
if (_inConfiguration)
return;
Stop();
+ IrssLog.Info("Setup");
+
if (Configure())
SaveSettings();
@@ -1046,11 +1081,11 @@
}
void ClickQuit(object sender, EventArgs e)
{
- IrssLog.Info("Quit");
-
if (_inConfiguration)
return;
+ IrssLog.Info("Quit");
+
if (_mode == IRServerMode.ServerMode)
{
PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Server Shutdown", null);
@@ -1068,17 +1103,19 @@
XmlDocument doc = new XmlDocument();
doc.Load(ConfigurationFile);
- _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value);
- _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value;
- _pluginName = doc.DocumentElement.Attributes["Plugin"].Value;
+ _mode = (IRServerMode)Enum.Parse(typeof(IRServerMode), doc.DocumentElement.Attributes["Mode"].Value);
+ _hostComputer = doc.DocumentElement.Attributes["HostComputer"].Value;
+ _pluginNameReceive = doc.DocumentElement.Attributes["PluginReceive"].Value;
+ _pluginNameTransmit = doc.DocumentElement.Attributes["PluginTransmit"].Value;
}
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
- _mode = IRServerMode.ServerMode;
- _hostComputer = String.Empty;
- _pluginName = String.Empty;
+ _mode = IRServerMode.ServerMode;
+ _hostComputer = String.Empty;
+ _pluginNameReceive = String.Empty;
+ _pluginNameTransmit = String.Empty;
}
}
void SaveSettings()
@@ -1094,7 +1131,8 @@
writer.WriteAttributeString("Mode", Enum.GetName(typeof(IRServerMode), _mode));
writer.WriteAttributeString("HostComputer", _hostComputer);
- writer.WriteAttributeString("Plugin", _pluginName);
+ writer.WriteAttributeString("PluginReceive", _pluginNameReceive);
+ writer.WriteAttributeString("PluginTransmit", _pluginNameTransmit);
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -17,7 +17,7 @@
{
[STAThread]
- static int Main()
+ static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
@@ -26,12 +26,12 @@
try
{
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1)
- return 1;
+ return;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
- return 1;
+ return;
}
// Open log file
@@ -46,27 +46,17 @@
catch (Exception ex)
{
Console.WriteLine(ex.Message);
- return 1;
+ return;
}
// Start Server
IRServer irServer = new IRServer();
if (irServer.Start())
- {
Application.Run();
- IrssLog.Close();
- return 0;
- }
- else
- {
- MessageBox.Show("Failed to start IR Server, refer to log file for more details.", "IR Server", MessageBoxButtons.OK, MessageBoxIcon.Error);
-
- IrssLog.Close();
- return 1;
- }
-
+ IrssLog.Close();
+ return;
}
/// <summary>
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -17,7 +17,6 @@
string[] _speeds;
string _name;
- bool _canConfigure;
bool _canLearn;
bool _canReceive;
bool _canTransmit;
@@ -54,15 +53,6 @@
}
/// <summary>
- /// Can this transceiver be configured.
- /// </summary>
- public bool CanConfigure
- {
- get { return _canConfigure; }
- set { _canConfigure = value; }
- }
-
- /// <summary>
/// Can this transceiver learn IR Commands.
/// </summary>
public bool CanLearn
@@ -98,8 +88,7 @@
_ports = new string[] { "None" };
_speeds = new string[] { "None" };
- _name = "Unknown";
- _canConfigure = false;
+ _name = String.Empty;
_canLearn = false;
_canReceive = false;
_canTransmit = false;
@@ -136,16 +125,15 @@
speeds.Append(',');
}
- string data = String.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8}",
+ string data = String.Format("{0},{1},{2},{3},{4},{5},{6},{7}",
transceiverInfo.Name, // 0
- transceiverInfo.CanConfigure, // 1
- transceiverInfo.CanLearn, // 2
- transceiverInfo.CanReceive, // 3
- transceiverInfo.CanTransmit, // 4
- transceiverInfo.Ports.Length, // 5
- ports.ToString(), // 6
- transceiverInfo.Speeds.Length, // 7
- speeds.ToString() // 8
+ transceiverInfo.CanLearn, // 1
+ transceiverInfo.CanReceive, // 2
+ transceiverInfo.CanTransmit, // 3
+ transceiverInfo.Ports.Length, // 4
+ ports.ToString(), // 5
+ transceiverInfo.Speeds.Length, // 6
+ speeds.ToString() // 7
);
return Encoding.ASCII.GetBytes(data);
@@ -171,14 +159,13 @@
TransceiverInfo transceiverInfo = new TransceiverInfo();
transceiverInfo.Name = data[0];
- transceiverInfo.CanConfigure = bool.Parse(data[1]);
- transceiverInfo.CanLearn = bool.Parse(data[2]);
- transceiverInfo.CanReceive = bool.Parse(data[3]);
- transceiverInfo.CanTransmit = bool.Parse(data[4]);
+ transceiverInfo.CanLearn = bool.Parse(data[1]);
+ transceiverInfo.CanReceive = bool.Parse(data[2]);
+ transceiverInfo.CanTransmit = bool.Parse(data[3]);
int index;
- int portIndex = 5;
+ int portIndex = 4;
int portCount = int.Parse(data[portIndex]);
transceiverInfo.Ports = new string[portCount];
for (index = portIndex + 1; index <= portIndex + portCount; index++)
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -105,9 +105,35 @@
_server.CommandEvent -= new WinLircServer.CommandEventHandler(CommandHandler);
}
- public bool Transmit(string file) { return false; }
- public LearnStatus Learn(string file) { return LearnStatus.Failure; }
+ public bool Transmit(string file)
+ {
+ string password, remoteName, buttonName, repeats;
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(file);
+
+ password = doc.DocumentElement.Attributes["Password"].Value;
+ remoteName = doc.DocumentElement.Attributes["RemoteName"].Value;
+ buttonName = doc.DocumentElement.Attributes["ButtonName"].Value;
+ repeats = doc.DocumentElement.Attributes["Repeats"].Value;
+
+ string output = String.Format("{0} {1} {2} {3}\n", password, remoteName, buttonName, repeats);
+ _server.Transmit(output);
+
+ return true;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+ public LearnStatus Learn(string file)
+ {
+ return LearnStatus.Failure;
+ }
+
public bool SetPort(string port) { return true; }
public bool SetSpeed(string speed) { return true; }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs 2007-06-10 08:51:02 UTC (rev 503)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLircServer.cs 2007-06-10 17:28:47 UTC (rev 504)
@@ -33,6 +33,7 @@
namespace WinLircReceiver
{
+
/// <summary>
/// WinLIRC server class implementing communication with WinLIRC
/// all remotes are supported as long as WinLIRC supports them
@@ -115,6 +116,11 @@
return (processes.Length > 0);
}
+ public void Transmit(string transmit)
+ {
+ _socket.Send(Encoding.ASCII.GetBytes(transmit));
+ }
+
#endregion
#region Private Methods
@@ -223,4 +229,5 @@
}
#endregion
}
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-10 17:39:20
|
Revision: 507
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=507&view=rev
Author: and-81
Date: 2007-06-10 10:39:18 -0700 (Sun, 10 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/IR Server Suite.sln
Removed Paths:
-------------
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Windows.Forms.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.dll
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.Extensions.xml
trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/SourceGrid.xml
trunk/plugins/IR Server Suite/IR Server Plugins/Dummy Transceiver/
Deleted: trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 17:38:13 UTC (rev 506)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/SourceGrid/DevAge.Core.xml 2007-06-10 17:39:18 UTC (rev 507)
@@ -1,1900 +0,0 @@
-<?xml version="1.0"?>
-<doc>
- <assembly>
- <name>DevAge.Core</name>
- </assembly>
- <members>
- <member name="T:DevAge.Text.FixedLength.LineParser">
- <summary>
- A class for parsing fixed length string and loading the fields into a class.
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.#ctor">
- <summary>
- Constructor. Fill the Fields list fot specify the columns.
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.#ctor(System.Type)">
- <summary>
- Load the parser fields with the properties specified in the type. You must use the FieldAttribute and ParseFormatAttribute to specify additional informations like the field length.
- </summary>
- <param name="lineClassType"></param>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.Reset">
- <summary>
- Reset the parser
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.LoadLine(System.String)">
- <summary>
- Load the specified line in the parser.
- </summary>
- <param name="line"></param>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.GetValue(System.String)">
- <summary>
- Get a specified field value.
- </summary>
- <param name="fieldName"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.Text.FixedLength.LineParser.FillLineClass(System.Object)">
- <summary>
- Fill the properties of the specified class with the values of the line has defined by the Fields collection.
- </summary>
- <param name="schemaClass"></param>
- <returns>Returns the same class specified in the schemaClass parameter, this is useful if you have struct or value types.</returns>
- </member>
- <member name="P:DevAge.Text.FixedLength.LineParser.Fields">
- <summary>
- Gets a collection of fields.
- </summary>
- </member>
- <member name="T:DevAge.Data.SqlClient.SqlCommandBuilder">
- <summary>
- This class is similar to the System.Data.SqlClient.SqlCommandBuilder, but use only the DataTable to create the required commands.
- Don't support identity (autoincrement) column and only the base data type. This class don't use the data source to explore the data but only the DataTable informations.
- So you must populate the PrimaryKeys of the DataSet. I suggest to use GUID column (uniqueidentifier) to replace the identity column.
- Remember to set the Connection of the generated command.
- </summary>
- </member>
- <member name="M:DevAge.Data.SqlClient.SqlCommandBuilder.#ctor(System.Data.DataTable)">
- <summary>
- Constructor
- </summary>
- <param name="dataTable">table used to create commands</param>
- </member>
- <member name="P:DevAge.Data.SqlClient.SqlCommandBuilder.DataTable">
- <summary>
- Table used to create commands
- </summary>
- </member>
- <member name="T:DevAge.DateTimeHelper">
- <summary>
- Summary description for DateTimeHelper.
- </summary>
- </member>
- <member name="M:DevAge.DateTimeHelper.YearsDifference(System.DateTime,System.DateTime)">
- <summary>
- Calculate the difference in years of 2 dates. Usually used for age calculations. dateA - dateB
- </summary>
- <param name="dateA"></param>
- <param name="dateB"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.DateTimeHelper.MonthsDifference(System.DateTime,System.DateTime)">
- <summary>
- Calculate the difference in months of 2 dates. dateA - dateB
- </summary>
- <param name="dateA"></param>
- <param name="dateB"></param>
- <returns></returns>
- </member>
- <member name="T:DevAge.Data.FileDataSet">
- <summary>
- Summary description for Manager.
- </summary>
- </member>
- <member name="P:DevAge.Data.FileDataSet.SaveDataFormat">
- <summary>
- Gets or Sets the format used to save the DataSet
- </summary>
- </member>
- <member name="P:DevAge.Data.FileDataSet.FileDataFormat">
- <summary>
- Gets the current format of the File where the data are loaded.
- </summary>
- </member>
- <member name="P:DevAge.Data.FileDataSet.MergeReadedSchema">
- <summary>
- Gets or Sets if merge the schema of the file with the schema of the DataSet specified. Use true if the DataSet doesn't have a schema definition. Default is false.
- </summary>
- </member>
- <member name="T:DevAge.DevAgeApplicationException">
- <summary>
- Generic DevAge Exception
- </summary>
- </member>
- <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="p_strErrDescription"></param>
- </member>
- <member name="M:DevAge.DevAgeApplicationException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="p_strErrDescription"></param>
- <param name="p_InnerException"></param>
- </member>
- <member name="M:DevAge.DevAgeApplicationException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Constructor
- </summary>
- <param name="p_Info"></param>
- <param name="p_StreamingContext"></param>
- </member>
- <member name="T:DevAge.Text.FixedLength.FieldAttribute">
- <summary>
- Required attribute to specify the field position and length
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldAttribute.#ctor(System.Int32,System.Int32)">
- <summary>
- Constructor.
- </summary>
- <param name="fieldIndex">Index of the field, 0 based. Each field must have a unique progressive index</param>
- <param name="length">Lenght of the field when readed and writed to the string.</param>
- </member>
- <member name="T:DevAge.Text.FixedLength.ParseFormatAttribute">
- <summary>
- Attribute used to specify additional parse options
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.ParseFormatAttribute.#ctor">
- <summary>
- Constructor. Use one of these properties to customize the format: CultureInfo, DateTimeFormat, NumberFormat, TrimBeforeParse.
- Default is Invariant culture format.
- </summary>
- </member>
- <member name="T:DevAge.Text.FixedLength.ValueMappingAttribute">
- <summary>
- Attribute used to convert a specific value to another value
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.ValueMappingAttribute.#ctor(System.String,System.Object)">
- <summary>
- Constructor
- </summary>
- <param name="stringValue">String value</param>
- <param name="fieldValue">Field typed value</param>
- </member>
- <member name="T:DevAge.Text.FixedLength.StandardValueAttribute">
- <summary>
- Attribute used to specify the standard value (mandatory value) for a specific field.
- You can use this attribute for example when you want a particular field to only accept one or more standard values.
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.StandardValueAttribute.#ctor(System.Object)">
- <summary>
- Construcotr
- </summary>
- <param name="standardValue">Required value</param>
- </member>
- <member name="T:DevAge.Patterns.IActivity">
- <summary>
- An interface to represents a basic activity.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.IActivity.Start(DevAge.Patterns.IActivityEvents)">
- <summary>
- Start the activity and all sub activities.
- </summary>
- <param name="events">Interface class that receive the events, can be null if no event class is needed.</param>
- </member>
- <member name="M:DevAge.Patterns.IActivity.Cancel">
- <summary>
- Cancel the current activity and all sub activities throwing a ActivityCanceledException.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.SubActivities">
- <summary>
- Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped.
- Note that the sub activities can be async and so can be executed in a parellel mode.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.Status">
- <summary>
- Activity status
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.Name">
- <summary>
- Name of the activity used to describe the class.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.WaitHandle">
- <summary>
- Gets the WaitHandle class used to wait for the completition of the activity.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.Exception">
- <summary>
- Gets the exception throwed when the activity fail. Null if no exception.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.Parent">
- <summary>
- Gets or sets the Activity parent. Null when it is a root activity.
- Do not set manually the parent activity, but simply add the activity to the SubActivities collection.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.IActivity.FullName">
- <summary>
- Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character
- </summary>
- </member>
- <member name="F:DevAge.Patterns.SubActivityWaitMode.DoNotWait">
- <summary>
- Don't wait the sub activities to finish (parallel processing, asyncronous)
- </summary>
- </member>
- <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitOnEach">
- <summary>
- Wait for each sub activities (syncronous)
- </summary>
- </member>
- <member name="F:DevAge.Patterns.SubActivityWaitMode.WaitAtTheEnd">
- <summary>
- Wait all the sub activities at the end (parallel processing but syncronized with the parent)
- </summary>
- </member>
- <member name="T:DevAge.Patterns.ActivityBase">
- <summary>
- Base activity class. Override the OnWork method to customize the activity.
- </summary>
- </member>
- <member name="F:DevAge.Patterns.ActivityBase.mActivityCount">
- <summary>
- An activity count used only to generate a seguential name
- </summary>
- </member>
- <member name="F:DevAge.Patterns.ActivityBase.mWaitHandle">
- <summary>
- Initially set to signaled=true=completed, nonsignaled=false=notcompleted,
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.ResetRunningStatus">
- <summary>
- Reset the status property to the original values. If the activity is still running an exception is throw.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.OnWork">
- <summary>
- Working method. Abstract. Override this method to provide a specific work for the activity.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.DoWork">
- <summary>
- Internal work method. Call the OnWork method and Start the SubActivities.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.WaitActivities(DevAge.Patterns.ActivityCollection,System.Int32)">
- <summary>
- Wait until or SubActivities are completed. Throw an exception on timeout.
- </summary>
- <param name="activities"></param>
- <param name="timeout"></param>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.WaitActivity(DevAge.Patterns.IActivity,System.Int32)">
- <summary>
- Wait until or SubActivities are completed. Throw an exception on timeout.
- </summary>
- <param name="activity"></param>
- <param name="timeout"></param>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.CheckActivitiesException(DevAge.Patterns.ActivityCollection)">
- <summary>
- Throw an exception if one of the activities has an exception.
- </summary>
- <param name="activities"></param>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.CheckActivityException(DevAge.Patterns.IActivity)">
- <summary>
- Throw an exception if one of the activities has an exception.
- </summary>
- <param name="activity"></param>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.StartActivity">
- <summary>
- Start the activity. NOTE: Usually don't override this method but override the OnWork method to implement the specific activity work.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.Start(DevAge.Patterns.IActivityEvents)">
- <summary>
- Start the activity. If the activity is already running an exception is throw.
- To override the common working code use the OnWork abstract method.
- </summary>
- <param name="events">Interface class that receive the events, can be null if no event class is needed.</param>
- </member>
- <member name="M:DevAge.Patterns.ActivityBase.Cancel">
- <summary>
- Cancel the current activity and all sub activities throwing a ActivityCanceledException.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.SubActivitiesTimeOut">
- <summary>
- Gets or sets the time to wait for the sub activities. If the operation is still executing then a TimeOutException is fired. Default is System.Threading.Timeout.Infinite. Default is true.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.PropagateException">
- <summary>
- Gets or sets if propagate an exception from sub activities to the current activities. Default is true.
- Only valid SubActivitiesTimeOut is WaitOnEach or WaitAtTheEnd
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.SubActivityWaitMode">
- <summary>
- Gets or sets how the current activity wait the completition of the sub activities.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.SubActivities">
- <summary>
- Subordinated activities. Are executed after the current activity. If one of these activity throws an exception is propagated to parent activity and the operation is stopped.
- Note that the sub activities can be async and so can be executed in a parellel mode.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.Status">
- <summary>
- Activity status
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.Name">
- <summary>
- Name of the activity used to describe the class.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.WaitHandle">
- <summary>
- Gets the WaitHandle class used to wait for the completition of the activity.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.Exception">
- <summary>
- Gets the exception throwed when the activity fail. Null if no exception.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.Parent">
- <summary>
- Gets or sets the Activity parent. Null when it is a root activity.
- Do not set manually the parent activity, but simply add the activity to the SubActivities collection.
- </summary>
- </member>
- <member name="P:DevAge.Patterns.ActivityBase.FullName">
- <summary>
- Gets the activity full name of the activity, composed by the full name of the parent activity separated with a \ character
- </summary>
- </member>
- <member name="T:DevAge.Patterns.Activity">
- <summary>
- An activity used as a container for other activities using a syncronized code.
- </summary>
- </member>
- <member name="T:DevAge.Patterns.AsynchronousActivity">
- <summary>
- An activity used as a container for other activities using an asynchronous code.
- Override the OnAsyncWork method for custom asynchronous work.
- </summary>
- </member>
- <member name="T:DevAge.Patterns.AsyncActivityBase">
- <summary>
- Base activity class. Override the OnBeginWork and OnEndWork method to customize the activity.
- This class support an asyncronous activity.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.AsyncActivityBase.OnBeginWork(System.AsyncCallback)">
- <summary>
- Begind working method. Called to start the asyncronous activity. Abstract.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.AsyncActivityBase.OnEndWork(System.IAsyncResult)">
- <summary>
- End working method. Called when the asyncronous operation is finished
- </summary>
- <param name="asyncResult">AsyncResult</param>
- </member>
- <member name="M:DevAge.Patterns.AsyncActivityBase.OnWork">
- <summary>
- Working method.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.AsyncActivityBase.StartActivity">
- <summary>
- Start the activity. NOTE: Usually don't override this method but override the OnBeginWork method to implement the specific activity work.
- </summary>
- </member>
- <member name="T:DevAge.Data.StreamDataSet">
- <summary>
- A static class used to serialize a DataSet to and from a stream using a binary or xml format.
- The xml format use the standard DataSet xml serialization, the binary format use a custom format.
- </summary>
- </member>
- <member name="M:DevAge.Data.StreamDataSet.Write(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat)">
- <summary>
- Write the dataset to the stream using the specified format.
- </summary>
- <param name="destination"></param>
- <param name="source"></param>
- <param name="format"></param>
- </member>
- <member name="M:DevAge.Data.StreamDataSet.Read(System.IO.Stream,System.Data.DataSet,DevAge.Data.StreamDataSetFormat,System.Boolean)">
- <summary>
- Read from the stream and populate the dataset using the specified format.
- </summary>
- <param name="source"></param>
- <param name="destination"></param>
- <param name="format"></param>
- <param name="mergeSchema">True to merge the schema, otherwise it is used the schema of the dataset</param>
- </member>
- <member name="T:DevAge.Data.StreamDataSetFormat">
- <summary>
- Enum to control the serialization format
- </summary>
- </member>
- <member name="F:DevAge.Data.StreamDataSetFormat.XML">
- <summary>
- Standard xml format used by the ReadXml and WriteXml of the DataSet
- </summary>
- </member>
- <member name="F:DevAge.Data.StreamDataSetFormat.Binary">
- <summary>
- Custom binary format. More compact of the xml but not human readable
- </summary>
- </member>
- <member name="T:DevAge.Data.BinaryDataSetInvalidException">
- <summary>
- Binary data not valid exception
- </summary>
- </member>
- <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="M:DevAge.Data.BinaryDataSetInvalidException.#ctor(System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="p_InnerException"></param>
- </member>
- <member name="T:DevAge.Data.BinaryDataSetVersionException">
- <summary>
- Version not valid exception
- </summary>
- </member>
- <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="M:DevAge.Data.BinaryDataSetVersionException.#ctor(System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="p_InnerException"></param>
- </member>
- <member name="T:DevAge.Configuration.CommandLineArgs">
- <summary>
- Description résumée de Arguments.
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.Converter.PercentTypeConverter">
- <summary>
- A TypeConverter that support string conversion from and to string with the percent symbol.
- Support Conversion for Float, Double and Decimal
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Converter.PercentTypeConverter.ConsiderAllStringAsPercent">
- <summary>
- If true and the user insert a string with no percent symbel the value is divided by 100, otherwise not.
- </summary>
- </member>
- <member name="T:DevAge.Text.FixedLength.LineWriter">
- <summary>
- A class used to create fixed lenght string.
- </summary>
- </member>
- <member name="T:DevAge.IO.StreamPersistence">
- <summary>
- A static class to help save and read stream data
- </summary>
- </member>
- <member name="T:DevAge.Configuration.PersistableItemDictionary">
- <summary>
- A dictionary with keys of type String and values of type PersistableItem
- </summary>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.#ctor">
- <summary>
- Initializes a new empty instance of the PersistableItemDictionary class
- </summary>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.Add(System.String,DevAge.Configuration.PersistableItem)">
- <summary>
- Adds an element with the specified key and value to this PersistableItemDictionary.
- </summary>
- <param name="key">
- The String key of the element to add.
- </param>
- <param name="value">
- The PersistableItem value of the element to add.
- </param>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.Contains(System.String)">
- <summary>
- Determines whether this PersistableItemDictionary contains a specific key.
- </summary>
- <param name="key">
- The String key to locate in this PersistableItemDictionary.
- </param>
- <returns>
- true if this PersistableItemDictionary contains an element with the specified key;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsKey(System.String)">
- <summary>
- Determines whether this PersistableItemDictionary contains a specific key.
- </summary>
- <param name="key">
- The String key to locate in this PersistableItemDictionary.
- </param>
- <returns>
- true if this PersistableItemDictionary contains an element with the specified key;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.ContainsValue(DevAge.Configuration.PersistableItem)">
- <summary>
- Determines whether this PersistableItemDictionary contains a specific value.
- </summary>
- <param name="value">
- The PersistableItem value to locate in this PersistableItemDictionary.
- </param>
- <returns>
- true if this PersistableItemDictionary contains an element with the specified value;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Configuration.PersistableItemDictionary.Remove(System.String)">
- <summary>
- Removes the element with the specified key from this PersistableItemDictionary.
- </summary>
- <param name="key">
- The String key of the element to remove.
- </param>
- </member>
- <member name="P:DevAge.Configuration.PersistableItemDictionary.Item(System.String)">
- <summary>
- Gets or sets the PersistableItem associated with the given String
- </summary>
- <param name="key">
- The String whose value to get or set.
- </param>
- </member>
- <member name="P:DevAge.Configuration.PersistableItemDictionary.Keys">
- <summary>
- Gets a collection containing the keys in this PersistableItemDictionary.
- </summary>
- </member>
- <member name="P:DevAge.Configuration.PersistableItemDictionary.Values">
- <summary>
- Gets a collection containing the values in this PersistableItemDictionary.
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.Converter.CurrencyTypeConverter">
- <summary>
- A TypeConverter that support string conversion from and to string with the currency symbol.
- Support Conversion for Float, Double and Decimal, Int
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.Converter.NumberTypeConverter">
- <summary>
- A TypeConverter that support string conversion from and to string with a custom format number.
- Support Conversion for Float, Double and Decimal, Int
- </summary>
- </member>
- <member name="T:DevAge.Text.FixedLength.FieldList">
- <summary>
- A dictionary with keys of type string and values of type IField
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.#ctor">
- <summary>
- Initializes a new empty instance of the FieldList class
- </summary>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.Add(DevAge.Text.FixedLength.IField)">
- <summary>
- Adds an element with the specified key and value to this FieldList.
- </summary>
- <param name="key">
- The string key of the element to add.
- </param>
- <param name="value">
- The IField value of the element to add.
- </param>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.Contains(System.String)">
- <summary>
- Determines whether this FieldList contains a specific key.
- </summary>
- <param name="fieldName">
- The string key to locate in this FieldList.
- </param>
- <returns>
- true if this FieldList contains an element with the specified key;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.ContainsKey(System.String)">
- <summary>
- Determines whether this FieldList contains a specific key.
- </summary>
- <param name="key">
- The string key to locate in this FieldList.
- </param>
- <returns>
- true if this FieldList contains an element with the specified key;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.ContainsValue(DevAge.Text.FixedLength.IField)">
- <summary>
- Determines whether this FieldList contains a specific value.
- </summary>
- <param name="value">
- The IField value to locate in this FieldList.
- </param>
- <returns>
- true if this FieldList contains an element with the specified value;
- otherwise, false.
- </returns>
- </member>
- <member name="M:DevAge.Text.FixedLength.FieldList.Remove(System.String)">
- <summary>
- Removes the element with the specified key from this FieldList.
- </summary>
- <param name="fieldName">
- The string key of the element to remove.
- </param>
- </member>
- <member name="P:DevAge.Text.FixedLength.FieldList.Item(System.String)">
- <summary>
- Gets or sets the IField associated with the given string
- </summary>
- <param name="key">
- The string whose value to get or set.
- </param>
- </member>
- <member name="P:DevAge.Text.FixedLength.FieldList.Keys">
- <summary>
- Gets a collection containing the keys in this FieldList.
- </summary>
- </member>
- <member name="P:DevAge.Text.FixedLength.FieldList.Values">
- <summary>
- Gets a collection containing the values in this FieldList.
- </summary>
- </member>
- <member name="T:DevAge.Shell.Utilities">
- <summary>
- Shell utilities
- </summary>
- </member>
- <member name="T:DevAge.Patterns.ActivityCanceledException">
- <summary>
- Exception fired when canceling an activity with the Cancel method.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityCanceledException.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="T:DevAge.Patterns.ActivityStatusNotValidException">
- <summary>
- Exception fired when canceling an activity with the Cancel method.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.ActivityStatusNotValidException.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="T:DevAge.Patterns.TimeOutActivityException">
- <summary>
- Exception fired when a time out is encountered.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.TimeOutActivityException.#ctor">
- <summary>
- Constructor
- </summary>
- </member>
- <member name="T:DevAge.Patterns.SubActivityException">
- <summary>
- Exception fired when a time out is encountered.
- </summary>
- </member>
- <member name="M:DevAge.Patterns.SubActivityException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="activityName"></param>
- <param name="innerException"></param>
- </member>
- <member name="T:DevAge.IO.IsolatedStorage.IsolatedStorageSettingBase">
- <summary>
- Abstract class that help to save settings in the isolated storage
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.Validator.ValidatorTypeConverter">
- <summary>
- A string editor that use a TypeConverter for conversion.
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.Validator.ValidatorBase">
- <summary>
- A base class to support value conversion and validation. This class is used if no conversion is required or as a base class for specialized validator.
- Naming Legend:
- Object = an object not yet converted for the current validator,
- Value = an object already converted and valid for the current validator,
- String = a string that can be used for conversion to and from Value,
- DisplayString = a string representation of the Value
- </summary>
- </member>
- <member name="T:DevAge.ComponentModel.ComponentLight">
- <summary>
- A IComponent implementation, used as a base class for component derived class. It is similar to the System Component class but doesn't derive from MarshalByRef class, for this reason it is faster and consume less resources.
- Can be serialized.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.ComponentLight.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.ComponentLight.#ctor(DevAge.ComponentModel.ComponentLight)">
- <summary>
- Copy constructor
- </summary>
- <param name="other"></param>
- </member>
- <member name="T:DevAge.ComponentModel.Validator.IValidator">
- <summary>
- An interface to support value conversion and validation.
- Naming Legend:
- Object = an object not yet converted for the current validator,
- Value = an object already converted and valid for the current validator,
- String = a string that can be used for conversion to and from Value,
- DisplayString = a string representation of the Value
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsNullString(System.String)">
- <summary>
- Returns true if the string is null or if is equals to the NullString
- </summary>
- <param name="p_str"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.ObjectToValue(System.Object)">
- <summary>
- Convert an object according to the current ValueType of the validator
- </summary>
- <param name="p_Object"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToObject(System.Object,System.Type)">
- <summary>
- Convert a value valid for the current validator ValueType to an object with the Type specified. Throw an exception on error.
- </summary>
- <param name="p_Value"></param>
- <param name="p_ReturnObjectType"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToString(System.Object)">
- <summary>
- Convert a value valid for the current validator ValueType to a string that can be used for other conversions, for example StringToValue method.
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.StringToValue(System.String)">
- <summary>
- Converts a string to an object according to the type of the string editor
- </summary>
- <param name="p_str"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsStringConversionSupported">
- <summary>
- Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.ValueToDisplayString(System.Object)">
- <summary>
- Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion.
- If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString()
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidValue(System.Object)">
- <summary>
- Returns true if the value is valid for this type of editor without any conversion.
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object)">
- <summary>
- Returns true if the object is valid for this type of validator, using conversion functions.
- </summary>
- <param name="p_Object"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidObject(System.Object,System.Object@)">
- <summary>
- Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted.
- </summary>
- <param name="p_Object"></param>
- <param name="p_ValueConverted"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String)">
- <summary>
- Returns true if the string is valid for this type of editor, using string conversion function.
- </summary>
- <param name="p_strValue"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsValidString(System.String,System.Object@)">
- <summary>
- Returns true if the string is valid for this type of editor, using string conversion function. An returns the object converted.
- </summary>
- <param name="p_strValue"></param>
- <param name="p_ValueConverted"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.IsInStandardValues(System.Object)">
- <summary>
- Returns true if the value specified is presents in the list StandardValues.
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValueAtIndex(System.Int32)">
- <summary>
- Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
- </summary>
- <param name="p_Index"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.IValidator.StandardValuesIndexOf(System.Object)">
- <summary>
- Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
- </summary>
- <param name="p_StandardValue"></param>
- <returns></returns>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowNull">
- <summary>
- True to allow null object value or NullString string Value
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.NullString">
- <summary>
- Null string representation. A string is null when is null or when is equals to this string. Default is empty string.
- Used by ValueToString and StringToValue
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.NullDisplayString">
- <summary>
- Null string representation. A string is null when is null or when is equals to this string. Default is empty string.
- Used by ValueToDisplayString
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.AllowStringConversion">
- <summary>
- Gets or Sets if the string conversion is allowed.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.MinimumValue">
- <summary>
- Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.MaximumValue">
- <summary>
- Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.ValueType">
- <summary>
- Type allowed for the current editor. Cannot be null.
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingObjectToValue">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToObject">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.IValidator.ConvertingValueToDisplayString">
- <summary>
- Fired when converting a value to a display string. Called from method ValueToDisplayString
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.DefaultValue">
- <summary>
- Default value for this editor, usually is the default value for the specified type.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValues">
- <summary>
- A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.StandardValuesExclusive">
- <summary>
- If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.IValidator.CultureInfo">
- <summary>
- Culture for conversion. If null the default user culture is used. Default is null.
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.IValidator.Changed">
- <summary>
- Fired when one of the properties of the Validator change.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor">
- <summary>
- Constructor. Initialize the class using a null type.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.#ctor(System.Type)">
- <summary>
- Constructor.
- </summary>
- <param name="type">The type used to validate the values. If null no validation is made.</param>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsNullString(System.String)">
- <summary>
- Returns true if the string is null or if is equals to the NullString
- </summary>
- <param name="p_str"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToStringForError(System.Object)">
- <summary>
- Returns a string used for error description for a specified object. Usually used when printing the object for the error message when there is a conversion error.
- </summary>
- <param name="val"></param>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ObjectToValue(System.Object)">
- <summary>
- Convert an object according to the current ValueType of the validator
- </summary>
- <param name="p_Object"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToObject(System.Object,System.Type)">
- <summary>
- Convert a value according to the current ValueType to an object with the Type specified. Throw an exception on error.
- </summary>
- <param name="p_Value"></param>
- <param name="p_ReturnObjectType"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToString(System.Object)">
- <summary>
- Converts a value object to a string representation
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StringToValue(System.String)">
- <summary>
- Converts a string to an object according to the type of the string editor
- </summary>
- <param name="p_str"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsStringConversionSupported">
- <summary>
- Returns true if string conversion is suported. AllowStringConversion must be true and the current Validator must support string conversion.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.ValueToDisplayString(System.Object)">
- <summary>
- Converts a value valid for this validator valuetype to a string representation. The string cannot be used for conversion.
- If the validator support string conversion this method simply call ValueToString otherwise call Value.ToString()
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingObjectToValue">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToObject">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="F:DevAge.ComponentModel.Validator.ValidatorBase.m_ConvertingValueToDisplayString">
- <summary>
- Fired when converting a value to a display string. Called from method ValueToDisplayString
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingObjectToValue(DevAge.ComponentModel.ConvertingObjectEventArgs)">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- <param name="e"></param>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToObject(DevAge.ComponentModel.ConvertingObjectEventArgs)">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- <param name="e"></param>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnConvertingValueToDisplayString(DevAge.ComponentModel.ConvertingObjectEventArgs)">
- <summary>
- Fired when converting a value to a display string. Called from method ValueToDisplayString
- </summary>
- <param name="e"></param>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidValue(System.Object)">
- <summary>
- Returns true if the value is valid for this type of editor without any conversion.
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object)">
- <summary>
- Returns true if the object is valid for this type of validator, using conversion functions.
- </summary>
- <param name="p_Object"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidObject(System.Object,System.Object@)">
- <summary>
- Returns true if the object is valid for this type of validator, using conversion functions. Returns as parameter the value converted.
- </summary>
- <param name="p_Object"></param>
- <param name="p_ValueConverted"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String)">
- <summary>
- Returns true if the string is valid for this type of editor, using string conversion function.
- </summary>
- <param name="p_strValue"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsValidString(System.String,System.Object@)">
- <summary>
- Returns true if the string is valid for this type of editor, using string conversion function. Returns as out parameter the object converted.
- </summary>
- <param name="p_strValue"></param>
- <param name="p_ValueConverted"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.IsInStandardValues(System.Object)">
- <summary>
- Returns true if the value specified is presents in the list StandardValues.
- </summary>
- <param name="p_Value"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValueAtIndex(System.Int32)">
- <summary>
- Returns the standard values at the specified index. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
- </summary>
- <param name="p_Index"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesIndexOf(System.Object)">
- <summary>
- Returns the index of the specified standard value. -1 if not found. If StandardValues support IList use simple the indexer method otherwise loop troght the collection.
- </summary>
- <param name="p_StandardValue"></param>
- <returns></returns>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.ValidatorBase.OnChanged(System.EventArgs)">
- <summary>
- Fired when one of the properties of the Validator change.
- Call the Changed event.
- </summary>
- <param name="e"></param>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.AllowNull">
- <summary>
- True to allow null object value or NullString string Value
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.NullString">
- <summary>
- Null string representation. A string is null when is null or when is equals to this string. Default is empty string.
- Used by ValueToString and StringToValue
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.NullDisplayString">
- <summary>
- Null string representation. Default is empty string.
- Used by ValueToDisplayString
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.AllowStringConversion">
- <summary>
- Gets or Sets if the string conversion is allowed.
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingObjectToValue">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingValueToObject">
- <summary>
- Fired when converting a object to the value specified. Called from method ObjectToValue and IsValidObject
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.ConvertingValueToDisplayString">
- <summary>
- Fired when converting a value to a display string. Called from method ValueToDisplayString
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.MinimumValue">
- <summary>
- Minimum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.MaximumValue">
- <summary>
- Maximum value allowed. If null no check is performed. The value must derive from IComparable interface to use Minimum or Maximum feature.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.ValueType">
- <summary>
- Type allowed for the current editor. Cannot be null.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.ValueTypeName">
- <summary>
- Set the ValueType property using a string value, usually used by designer code generation.
- The designer for this type is configured to use only this property.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.DefaultValue">
- <summary>
- Default value for this editor, usually is the default value for the specified type.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.StandardValues">
- <summary>
- A list of values that this editor can support. If StandardValuesExclusive is true then the editor can only support one of these values.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.StandardValuesExclusive">
- <summary>
- If StandardValuesExclusive is true then the editor can only support the list specified in StandardValues.
- </summary>
- </member>
- <member name="P:DevAge.ComponentModel.Validator.ValidatorBase.CultureInfo">
- <summary>
- Culture for conversion. If null the default user culture is used. Default is null.
- </summary>
- </member>
- <member name="E:DevAge.ComponentModel.Validator.ValidatorBase.Changed">
- <summary>
- Fired when one of the properties of the Validator change.
- </summary>
- </member>
- <member name="M:DevAge.ComponentModel.Validator.Validator...
[truncated message content] |
|
From: <an...@us...> - 2007-06-12 13:45:08
|
Revision: 517
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=517&view=rev
Author: and-81
Date: 2007-06-12 06:45:04 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -160,15 +160,15 @@
this.groupBoxMode.Size = new System.Drawing.Size(424, 120);
this.groupBoxMode.TabIndex = 1;
this.groupBoxMode.TabStop = false;
- this.groupBoxMode.Text = "Server mode";
+ this.groupBoxMode.Text = "Mode";
//
// labelComputer
//
this.labelComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelComputer.Location = new System.Drawing.Point(160, 24);
+ this.labelComputer.Location = new System.Drawing.Point(160, 56);
this.labelComputer.Name = "labelComputer";
- this.labelComputer.Size = new System.Drawing.Size(248, 64);
+ this.labelComputer.Size = new System.Drawing.Size(248, 32);
this.labelComputer.TabIndex = 3;
this.labelComputer.Text = "Button Relay / IR Repeater mode host computer:";
this.labelComputer.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -540,7 +540,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -379,7 +379,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -501,7 +501,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -357,7 +357,7 @@
// Wait for the learning to finish ...
while (_learning && Environment.TickCount < _learnStartTick + timeout)
- Thread.SpinWait(100);
+ Thread.Sleep(100);
if (Environment.TickCount >= _learnStartTick + timeout)
return LearnStatus.Timeout;
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -461,7 +461,7 @@
// Wait for the learning to finish ...
while (_learning && Environment.TickCount < _learnStartTick + timeout)
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
if (_learning)
{
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -334,7 +334,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
}
return false;
@@ -403,7 +403,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -422,7 +422,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -524,7 +524,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -236,11 +236,10 @@
LoadEventMappings();
MapEvent(MappedEvent.MappingEvent.MediaPortal_Start);
- }
- // Register with MediaPortal to receive GUI Messages ...
- if (EventMapperEnabled)
+ // Register with MediaPortal to receive GUI Messages ...
GUIWindowManager.Receivers += new SendMessageHandler(OnMessage);
+ }
// Register for Power State message ...
//SystemEvents.SessionEnding += new SessionEndingEventHandler(SystemEvents_SessionEnding);
@@ -260,11 +259,12 @@
RemoteButtonListener -= new RemoteButtonHandler(RemoteButtonPressed);
if (EventMapperEnabled)
+ {
+ GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage);
+
MapEvent(MappedEvent.MappingEvent.MediaPortal_Stop);
+ }
- if (EventMapperEnabled)
- GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage);
-
StopComms();
_defaultInputHandler = null;
@@ -594,7 +594,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
}
return false;
@@ -663,7 +663,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -682,7 +682,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -784,7 +784,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
@@ -1129,7 +1129,14 @@
if (LogVerbose)
Log.Info("MPControlPlugin: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType));
- ProcessCommand(mappedEvent.Command);
+ try
+ {
+ ProcessCommand(mappedEvent.Command);
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
}
}
}
@@ -1150,7 +1157,14 @@
if (LogVerbose)
Log.Info("MPControlPlugin: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType));
- ProcessCommand(mappedEvent.Command);
+ try
+ {
+ ProcessCommand(mappedEvent.Command);
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
}
}
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -206,7 +206,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
}
return false;
@@ -275,7 +275,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -294,7 +294,7 @@
}
catch (Exception ex)
{
- Log.Error(ex.ToString());
+ Log.Error(ex);
return false;
}
}
@@ -396,7 +396,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 12:35:18 UTC (rev 516)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 13:45:04 UTC (rev 517)
@@ -373,7 +373,7 @@
}
else
{
- Thread.SpinWait(1000);
+ Thread.Sleep(1000);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-12 17:50:36
|
Revision: 521
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=521&view=rev
Author: and-81
Date: 2007-06-12 10:50:28 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -126,7 +126,6 @@
private void MainForm_Load(object sender, EventArgs e)
{
-
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Debug Client.log");
@@ -407,6 +406,16 @@
{
AddStatusLine(ex.Message);
}
+
+ try
+ {
+ if (PipeAccess.ServerRunning)
+ PipeAccess.StopServer();
+ }
+ catch (Exception ex)
+ {
+ AddStatusLine(ex.Message);
+ }
}
private void buttonBlast_Click(object sender, EventArgs e)
{
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -984,9 +984,7 @@
if (_pluginTransmit != null)
{
- if (String.IsNullOrEmpty(transceiverInfo.Name))
- transceiverInfo.Name = _pluginTransmit.Name;
-
+ transceiverInfo.Name = _pluginTransmit.Name;
transceiverInfo.Ports = _pluginTransmit.AvailablePorts;
transceiverInfo.Speeds = _pluginTransmit.AvailableSpeeds;
transceiverInfo.CanLearn = _pluginTransmit.CanLearn;
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -30,7 +30,7 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -32,7 +32,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -88,7 +88,7 @@
_ports = new string[] { "None" };
_speeds = new string[] { "None" };
- _name = String.Empty;
+ _name = "None";
_canLearn = false;
_canReceive = false;
_canTransmit = false;
Modified: trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -32,7 +32,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -33,7 +33,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(false)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -209,7 +209,7 @@
#region IIRServerPlugin Members
public string Name { get { return "FusionREMOTE"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "DViCO FusionREMOTE Receiver"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -49,7 +49,7 @@
#region IIRServerPlugin Members
public string Name { get { return "IRMan"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Receiver support for the Serial IRMan device"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -221,7 +221,7 @@
#region IIRServerPlugin Members
public string Name { get { return "IRTrans (Experimental)"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "IRTrans Transceiver (Experimental)"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -63,7 +63,7 @@
#region IIRServerPlugin Members
public string Name { get { return "IgorPlug USB"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "IgorPlug USB Receiver"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -42,7 +42,7 @@
#region IIRServerPlugin Members
public string Name { get { return "MCE Replacement"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Supports the MCE Replacement Driver for accessing the Microsoft MCE transceiver"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -335,7 +335,7 @@
#region IIRServerPlugin Members
public string Name { get { return "Microsoft MCE"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Microsoft MCE Infrared Transceiver"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -202,7 +202,7 @@
#region IIRServerPlugin Members
public string Name { get { return "USB-UIRT"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Support for the USB-UIRT transceiver"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -43,7 +43,7 @@
#region IIRServerPlugin Members
public string Name { get { return "WinLirc"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81, original code for MediaPortal by Sven"; } }
public string Description { get { return "Supports WinLirc as a reciever"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -54,7 +54,7 @@
#region IIRServerPlugin Members
public string Name { get { return "Windows Messages"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Supports receiving simulated button presses through Windows Messages"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -43,7 +43,7 @@
#region IIRServerPlugin Members
public string Name { get { return "X10 (Experimental)"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "X10 Transceiver (Experimental)"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -29,7 +29,7 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersion("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -187,7 +187,7 @@
#region IIRServerPlugin Members
public string Name { get { return "XBCDRC"; } }
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
public string Author { get { return "and-81"; } }
public string Description { get { return "Supports the XBox 1 IR receiver with XBCDRC"; } }
public bool CanReceive { get { return true; } }
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -39,7 +39,7 @@
const int WindowID = 248101;
- internal const string PluginVersion = "MP Blast Zone Plugin 1.0.3.1 for IR Server";
+ internal const string PluginVersion = "MP Blast Zone Plugin 1.0.3.2 for IR Server";
internal static readonly string MenuFile = Common.FolderAppData + "MP Blast Zone Plugin\\Menu.xml";
@@ -156,19 +156,26 @@
public void ShowPlugin()
{
- InConfiguration = true;
+ try
+ {
+ InConfiguration = true;
- if (LogVerbose)
- Log.Info("MPBlastZonePlugin: ShowPlugin()");
+ if (LogVerbose)
+ Log.Info("MPBlastZonePlugin: ShowPlugin()");
- SetupForm setupForm = new SetupForm();
- if (setupForm.ShowDialog() == DialogResult.OK)
- SaveSettings();
+ SetupForm setupForm = new SetupForm();
+ if (setupForm.ShowDialog() == DialogResult.OK)
+ SaveSettings();
- StopComms();
+ StopComms();
- if (LogVerbose)
- Log.Info("MPBlastZonePlugin: ShowPlugin() - End");
+ if (LogVerbose)
+ Log.Info("MPBlastZonePlugin: ShowPlugin() - End");
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
}
#endregion
@@ -183,16 +190,35 @@
public override bool Init()
{
- Start();
+ InConfiguration = false;
- return Load(GUIGraphicsContext.Skin + "\\BlastZone.xml");
+ Log.Info("MPBlastZonePlugin: Starting ({0})", PluginVersion);
+
+ if (!StartComms())
+ Log.Error("MPBlastZonePlugin: Failed to start local comms, IR blasting is disabled for this session");
+
+ if (Load(GUIGraphicsContext.Skin + "\\BlastZone.xml"))
+ {
+ if (LogVerbose)
+ Log.Info("MPBlastZonePlugin: Started");
+
+ return true;
+ }
+ else
+ {
+ Log.Error("MPBlastZonePlugin: Failed to load skin file.");
+ return false;
+ }
}
public override void DeInit()
{
- Stop();
+ StopComms();
base.DeInit();
+
+ if (LogVerbose)
+ Log.Info("MPBlastZonePlugin: Stopped");
}
protected override void OnPageLoad()
@@ -239,30 +265,6 @@
#region Implementation
- static void Start()
- {
- Log.Info("MPBlastZonePlugin: Starting ({0})", PluginVersion);
-
- Log.Debug("MPBlastZonePlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
- InConfiguration = false;
-
- if (!StartComms())
- Log.Error("MPBlastZonePlugin: Failed to start local comms, IR blasting is disabled for this session");
-
- if (LogVerbose)
- Log.Info("MPBlastZonePlugin: Started");
- }
- static void Stop()
- {
- if (LogVerbose)
- Log.Info("MPBlastZonePlugin: Stopping");
-
- StopComms();
-
- Log.Info("MPBlastZonePlugin: Stopped");
- }
-
static string GetCommand(string path, string name)
{
foreach (string collection in _menu.GetAllItems())
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersionAttribute("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersionAttribute("1.0.3.2")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -404,9 +404,7 @@
}
else
{
- string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
-
- BlastCommand blastCommand = new BlastCommand(commands);
+ BlastCommand blastCommand = new BlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
if (blastCommand.ShowDialog(this) == DialogResult.Cancel)
return;
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -206,15 +206,13 @@
public void Start()
{
+ InConfiguration = false;
+
Log.Info("MPControlPlugin: Starting ({0})", PluginVersion);
- Log.Debug("MPControlPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
// Load basic settings
LoadSettings();
- InConfiguration = false;
-
// Load the remote button mappings
_remoteMap = LoadRemoteMap(RemotesFile);
@@ -250,9 +248,6 @@
}
public void Stop()
{
- if (LogVerbose)
- Log.Info("MPControlPlugin: Stopping");
-
//SystemEvents.SessionEnding -= new SessionEndingEventHandler(SystemEvents_SessionEnding);
SystemEvents.PowerModeChanged -= new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
@@ -273,7 +268,8 @@
for (int i = 0; i < _multiInputHandlers.Count; i++)
_multiInputHandlers[i] = null;
- Log.Info("MPControlPlugin: Stopped");
+ if (LogVerbose)
+ Log.Info("MPControlPlugin: Stopped");
}
#endregion IPlugin methods
@@ -290,23 +286,30 @@
public void ShowPlugin()
{
- LoadSettings();
- LoadDefaultMapping();
- LoadMultiMappings();
+ try
+ {
+ LoadSettings();
+ LoadDefaultMapping();
+ LoadMultiMappings();
- InConfiguration = true;
+ InConfiguration = true;
- if (LogVerbose)
- Log.Info("MPControlPlugin: ShowPlugin()");
+ if (LogVerbose)
+ Log.Info("MPControlPlugin: ShowPlugin()");
- SetupForm setupForm = new SetupForm();
- if (setupForm.ShowDialog() == DialogResult.OK)
- SaveSettings();
+ SetupForm setupForm = new SetupForm();
+ if (setupForm.ShowDialog() == DialogResult.OK)
+ SaveSettings();
- StopComms();
+ StopComms();
- if (LogVerbose)
- Log.Info("MPControlPlugin: ShowPlugin() - End");
+ if (LogVerbose)
+ Log.Info("MPControlPlugin: ShowPlugin() - End");
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
}
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersionAttribute("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersionAttribute("1.0.3.2")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -27,7 +27,7 @@
#region Constants
- internal const string PluginVersion = "TV2 Blaster Plugin 1.0.3.1 for IR Server";
+ internal const string PluginVersion = "TV2 Blaster Plugin 1.0.3.2 for IR Server";
internal static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
@@ -120,8 +120,6 @@
{
Log.Info("TV2BlasterPlugin: Starting ({0})", PluginVersion);
- Log.Debug("TV2BlasterPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
// Load basic settings
LoadSettings();
@@ -140,14 +138,12 @@
}
public void Stop()
{
- if (LogVerbose)
- Log.Info("TV2BlasterPlugin: Stopping");
-
GUIWindowManager.Receivers -= new SendMessageHandler(OnMessage);
StopComms();
- Log.Info("TV2BlasterPlugin: Stopped");
+ if (LogVerbose)
+ Log.Info("TV2BlasterPlugin: Stopped");
}
#endregion IPlugin methods
@@ -164,22 +160,29 @@
public void ShowPlugin()
{
- LoadSettings();
- LoadExternalConfigs();
+ try
+ {
+ LoadSettings();
+ LoadExternalConfigs();
- InConfiguration = true;
+ InConfiguration = true;
- if (LogVerbose)
- Log.Info("TV2BlasterPlugin: ShowPlugin()");
+ if (LogVerbose)
+ Log.Info("TV2BlasterPlugin: ShowPlugin()");
- SetupForm setupForm = new SetupForm();
- if (setupForm.ShowDialog() == DialogResult.OK)
- SaveSettings();
+ SetupForm setupForm = new SetupForm();
+ if (setupForm.ShowDialog() == DialogResult.OK)
+ SaveSettings();
- StopComms();
+ StopComms();
- if (LogVerbose)
- Log.Info("TV2BlasterPlugin: ShowPlugin() - End");
+ if (LogVerbose)
+ Log.Info("TV2BlasterPlugin: ShowPlugin() - End");
+ }
+ catch (Exception ex)
+ {
+ Log.Error(ex);
+ }
}
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -28,7 +28,18 @@
public PluginSetup()
{
InitializeComponent();
+ }
+ #endregion Constructor
+
+ #region SetupTv.SectionSettings
+
+ public override void OnSectionActivated()
+ {
+ Log.Info("TV3BlasterPlugin: Configuration activated");
+
+ TV3BlasterPlugin.InConfiguration = true;
+
TvBusinessLayer layer = new TvBusinessLayer();
TV3BlasterPlugin.LogVerbose = checkBoxLogVerbose.Checked = Convert.ToBoolean(layer.GetSetting("TV3BlasterPlugin_LogVerbose", "False").Value);
TV3BlasterPlugin.ServerHost = layer.GetSetting("TV3BlasterPlugin_ServerHost", String.Empty).Value;
@@ -41,14 +52,13 @@
if (!TV3BlasterPlugin.StartComms())
MessageBox.Show(this, "Failed to start local comms. IR functions temporarily disabled.", "TV3 Blaster Plugin - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ TV3BlasterPlugin.LoadExternalConfigs();
+
RefreshIRList();
RefreshMacroList();
+
+ base.OnSectionActivated();
}
-
- #endregion Constructor
-
- #region SetupTv.SectionSettings
-
public override void OnSectionDeActivated()
{
Log.Info("TV3BlasterPlugin: Configuration deactivated");
@@ -66,23 +76,15 @@
setting.Value = TV3BlasterPlugin.ServerHost;
setting.Persist();
- TV3BlasterPlugin.LoadExternalConfigs();
+ //TV3BlasterPlugin.LoadExternalConfigs();
+ TV3BlasterPlugin.StopComms();
+
TV3BlasterPlugin.InConfiguration = false;
base.OnSectionDeActivated();
}
- public override void OnSectionActivated()
- {
- Log.Info("TV3BlasterPlugin: Configuration activated");
- TV3BlasterPlugin.InConfiguration = true;
-
- TV3BlasterPlugin.LoadExternalConfigs();
-
- base.OnSectionActivated();
- }
-
#endregion SetupTv.SectionSettings
#region Implementation
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.1")]
-[assembly: AssemblyFileVersionAttribute("1.0.3.1")]
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersionAttribute("1.0.3.2")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 16:40:14 UTC (rev 520)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs 2007-06-12 17:50:28 UTC (rev 521)
@@ -28,7 +28,7 @@
#region Constants
- internal const string PluginVersion = "TV3 Blaster Plugin 1.0.3.1 for IR Server";
+ internal const string PluginVersion = "TV3 Blaster Plugin 1.0.3.2 for IR Server";
internal static readonly string FolderMacros = Common.FolderAppData + "TV3 Blaster Plugin\\Macro\\";
@@ -70,7 +70,7 @@
/// <summary>
/// returns the version of the plugin
/// </summary>
- public string Version { get { return "1.0.3.1"; } }
+ public string Version { get { return "1.0.3.2"; } }
/// <summary>
/// returns the author of the plugin
/// </summary>
@@ -130,8 +130,6 @@
{
Log.Info("TV3BlasterPlugin: Version {0}", PluginVersion);
- Log.Debug("TV3BlasterPlugin: Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
InConfiguration = false;
TvBusinessLayer layer = new TvBusinessLayer();
@@ -146,6 +144,9 @@
if (!StartComms())
Log.Error("TV3BlasterPlugin: Failed to start local comms, IR blasting is disabled for this session");
+
+ if (LogVerbose)
+ Log.Info("TV3BlasterPlugin: Started");
}
public void Stop()
@@ -154,6 +155,9 @@
events.OnTvServerEvent -= _eventHandler;
StopComms();
+
+ if (LogVerbose)
+ Log.Info("TV3BlasterPlugin: Stopped");
}
[CLSCompliant(false)]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-06-16 13:27:18
|
Revision: 559
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=559&view=rev
Author: and-81
Date: 2007-06-16 06:27:16 -0700 (Sat, 16 Jun 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj
Modified: trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2007-06-16 12:18:13 UTC (rev 558)
+++ trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2007-06-16 13:27:16 UTC (rev 559)
@@ -33,14 +33,14 @@
</DocumentationFile>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86">
+ <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Core.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86">
+ <Reference Include="Dialogs, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Dialogs.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
@@ -48,9 +48,9 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="Utils, Version=2.1.2.0, Culture=neutral, processorArchitecture=x86">
+ <Reference Include="Utils, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Utils.DLL</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj 2007-06-16 12:18:13 UTC (rev 558)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj 2007-06-16 13:27:16 UTC (rev 559)
@@ -79,14 +79,14 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Core.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Dialogs, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Dialogs.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
@@ -94,9 +94,9 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="Utils, Version=1.0.2581.1867, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Utils, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Utils.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Utils.DLL</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj 2007-06-16 12:18:13 UTC (rev 558)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj 2007-06-16 13:27:16 UTC (rev 559)
@@ -85,28 +85,28 @@
</Compile>
</ItemGroup>
<ItemGroup>
- <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Core.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Databases, Version=1.0.2581.1890, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Databases, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Databases\bin\Release\Databases.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Databases.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Dialogs, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Dialogs.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal Development\MediaPortal\xbmc\bin\Release\Microsoft.DirectX.Direct3D.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Microsoft.DirectX.Direct3D.DLL</HintPath>
</Reference>
- <Reference Include="RemotePlugins, Version=1.0.2581.1913, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="RemotePlugins, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\RemotePlugins\bin\Release\RemotePlugins.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\RemotePlugins.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
@@ -114,14 +114,14 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="TVCapture, Version=1.0.2581.1894, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="TVCapture, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\TVCapture\bin\Release\TVCapture.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\TVCapture.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Utils, Version=1.0.2581.1867, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Utils, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Utils.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Utils.DLL</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj 2007-06-16 12:18:13 UTC (rev 558)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj 2007-06-16 13:27:16 UTC (rev 559)
@@ -85,19 +85,19 @@
<Compile Include="TV2BlasterPlugin.cs" />
</ItemGroup>
<ItemGroup>
- <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Core.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Databases, Version=1.0.2581.1890, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Databases, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Databases\bin\Release\Databases.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Databases.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Dialogs, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Dialogs.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
@@ -105,14 +105,14 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="TVCapture, Version=1.0.2581.1894, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="TVCapture, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\TVCapture\bin\Release\TVCapture.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\TVCapture.DLL</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Utils, Version=1.0.2581.1867, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Utils, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\MediaPortal\Core\bin\Release\Utils.dll</HintPath>
+ <HintPath>..\..\..\..\MediaPortal 0.2.3.0\Utils.DLL</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
Modified: trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj
===================================================================
--- trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj 2007-06-16 12:18:13 UTC (rev 558)
+++ trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj 2007-06-16 13:27:16 UTC (rev 559)
@@ -79,22 +79,22 @@
<ItemGroup>
<Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TVDatabase\references\Gentle.Common.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\Gentle.Common.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Gentle.Framework, Version=1.2.9.1286, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TVDatabase\references\Gentle.Framework.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\Gentle.Framework.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="PluginBase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TvService\bin\Release\PluginBase.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\PluginBase.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="SetupControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\SetupControls\bin\Release\SetupControls.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\SetupControls.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System">
@@ -112,22 +112,22 @@
<Reference Include="System.Xml" />
<Reference Include="TvBusinessLayer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TvService\bin\Release\TvBusinessLayer.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\TvBusinessLayer.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="TvControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TvControl\bin\Release\TvControl.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\TvControl.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="TVDatabase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TVDatabase\bin\Release\TVDatabase.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\TVDatabase.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="TvLibrary.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\..\..\MediaPortal Development\TV Engine\TVLibrary\TvLibrary.Interfaces\bin\Release\TvLibrary.Interfaces.dll</HintPath>
+ <HintPath>..\..\..\..\TV Engine 3 0.2.3.0\TvLibrary.Interfaces.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-05 04:48:34
|
Revision: 671
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=671&view=rev
Author: and-81
Date: 2007-07-04 21:48:31 -0700 (Wed, 04 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
Added Paths:
-----------
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-07-03 20:43:01 UTC (rev 670)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -165,7 +165,7 @@
{
PipeMessage received = PipeMessage.FromString(message);
- this.Invoke(_AddStatusLine, new Object[] { received.Name });
+ this.Invoke(_AddStatusLine, new Object[] { String.Format("Received Message: \"{0}\"", received.Name) });
try
{
@@ -357,7 +357,7 @@
}
void RemoteButtonPressed(string keyCode)
{
- string text = String.Format(" - {0}", keyCode);
+ string text = String.Format("Remote Button \"{0}\"", keyCode);
this.Invoke(_AddStatusLine, new Object[] { text });
}
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs 2007-07-03 20:43:01 UTC (rev 670)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.Designer.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -33,9 +33,9 @@
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripComboBoxSkin = new System.Windows.Forms.ToolStripComboBox();
this.changeServerHostToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItemHelp = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemQuit = new System.Windows.Forms.ToolStripMenuItem();
this.labelDisabled = new System.Windows.Forms.Label();
- this.toolStripMenuItemHelp = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip.SuspendLayout();
this.SuspendLayout();
//
@@ -50,7 +50,7 @@
this.contextMenuStrip.Name = "contextMenuStrip";
this.contextMenuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.contextMenuStrip.ShowImageMargin = false;
- this.contextMenuStrip.Size = new System.Drawing.Size(156, 117);
+ this.contextMenuStrip.Size = new System.Drawing.Size(156, 95);
//
// toolStripComboBoxSkin
//
@@ -68,6 +68,13 @@
this.changeServerHostToolStripMenuItem.ToolTipText = "Change the address of the server host";
this.changeServerHostToolStripMenuItem.Click += new System.EventHandler(this.changeServerHostToolStripMenuItem_Click);
//
+ // toolStripMenuItemHelp
+ //
+ this.toolStripMenuItemHelp.Name = "toolStripMenuItemHelp";
+ this.toolStripMenuItemHelp.Size = new System.Drawing.Size(155, 22);
+ this.toolStripMenuItemHelp.Text = "Help";
+ this.toolStripMenuItemHelp.Click += new System.EventHandler(this.toolStripMenuItemHelp_Click);
+ //
// toolStripMenuItemQuit
//
this.toolStripMenuItemQuit.Name = "toolStripMenuItemQuit";
@@ -90,13 +97,6 @@
this.labelDisabled.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labelDisabled.Visible = false;
//
- // toolStripMenuItemHelp
- //
- this.toolStripMenuItemHelp.Name = "toolStripMenuItemHelp";
- this.toolStripMenuItemHelp.Size = new System.Drawing.Size(155, 22);
- this.toolStripMenuItemHelp.Text = "Help";
- this.toolStripMenuItemHelp.Click += new System.EventHandler(this.toolStripMenuItemHelp_Click);
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-07-03 20:43:01 UTC (rev 670)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -19,30 +19,12 @@
public partial class MainForm : Form
{
- #region Constants
-
- const string DefaultSkin = "MCE";
-
- public static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml";
-
- #endregion Constants
-
#region Variables
- bool _registered = false;
- bool _keepAlive = true;
- int _echoID = -1;
- Thread _keepAliveThread;
+ RemoteButton []_buttons;
- string _serverHost;
- string _localPipeName;
- string _lastKeyCode = String.Empty;
- string _remoteSkin;
+ Thread _updateThread;
- string _installFolder;
-
- RemoteButton[] _buttons = null;
-
#endregion Variables
#region Constructor
@@ -50,48 +32,24 @@
public MainForm()
{
InitializeComponent();
-
- _setLabel = new DelegateSetLabel(SetLabel);
}
#endregion Constructor
private void MainForm_Load(object sender, EventArgs e)
{
- IrssLog.LogLevel = IrssLog.Level.Debug;
- IrssLog.Open(Common.FolderIrssLogs + "Virtual Remote.log");
+ SetSkinList();
+ SetSkin(Program.RemoteSkin);
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
- LoadSettings();
-
- IrssUtils.Forms.ServerAddress serverAddress;
-
- if (String.IsNullOrEmpty(_serverHost))
- {
- serverAddress = new IrssUtils.Forms.ServerAddress(Environment.MachineName);
- serverAddress.ShowDialog(this);
- _serverHost = serverAddress.ServerHost;
- }
-
- if (StartComms())
- {
- SetSkinList();
- SetSkin(_remoteSkin);
- }
- else
- {
- Application.Exit();
- }
+ _updateThread = new Thread(new ThreadStart(SetLabel));
+ _updateThread.Start();
}
+
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
- SaveSettings();
-
- StopComms();
-
- IrssLog.Close();
+ _updateThread.Abort();
}
+
private void MainForm_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left)
@@ -127,112 +85,6 @@
}
}
- void LoadSettings()
- {
- try
- {
- _installFolder = SystemRegistry.GetInstallFolder();
- if (String.IsNullOrEmpty(_installFolder))
- _installFolder = ".";
- else
- _installFolder += "\\Virtual Remote";
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
-
- _installFolder = ".";
- }
-
- try
- {
- XmlDocument doc = new XmlDocument();
- doc.Load(ConfigurationFile);
-
- _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value;
- _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value;
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
-
- _serverHost = String.Empty;
- _remoteSkin = DefaultSkin;
- }
- }
- void SaveSettings()
- {
- try
- {
- XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
- writer.Formatting = Formatting.Indented;
- writer.Indentation = 1;
- writer.IndentChar = (char)9;
- writer.WriteStartDocument(true);
- writer.WriteStartElement("settings"); // <settings>
-
- writer.WriteAttributeString("ServerHost", _serverHost);
- writer.WriteAttributeString("RemoteSkin", _remoteSkin);
-
- writer.WriteEndElement(); // </settings>
- writer.WriteEndDocument();
- writer.Close();
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
- }
- }
-
- bool StartComms()
- {
- try
- {
- if (OpenLocalPipe())
- {
- _keepAliveThread = new Thread(new ThreadStart(KeepAliveThread));
- _keepAliveThread.Start();
- return true;
- }
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
- }
-
- return false;
- }
- void StopComms()
- {
- _keepAlive = false;
-
- try
- {
- if (_keepAliveThread != null && _keepAliveThread.IsAlive)
- _keepAliveThread.Abort();
- }
- catch { }
-
- try
- {
- if (_registered)
- {
- _registered = false;
-
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Unregister", null);
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
- }
- }
- catch { }
-
- try
- {
- if (PipeAccess.ServerRunning)
- PipeAccess.StopServer();
- }
- catch { }
- }
-
bool LoadSkinXml(string xmlFile)
{
if (!File.Exists(xmlFile))
@@ -278,14 +130,14 @@
{
try
{
- string[] skins = Directory.GetFiles(_installFolder + "\\Skins\\", "*.png", SearchOption.TopDirectoryOnly);
+ string[] skins = Directory.GetFiles(Program.InstallFolder + "\\Skins\\", "*.png", SearchOption.TopDirectoryOnly);
for (int index = 0; index < skins.Length; index++)
skins[index] = Path.GetFileNameWithoutExtension(skins[index]);
toolStripComboBoxSkin.Items.Clear();
toolStripComboBoxSkin.Items.AddRange(skins);
- toolStripComboBoxSkin.SelectedItem = _remoteSkin;
+ toolStripComboBoxSkin.SelectedItem = Program.RemoteSkin;
}
catch (Exception ex)
{
@@ -300,17 +152,17 @@
if (String.IsNullOrEmpty(skin))
return;
- string skinFile = String.Format("{0}\\Skins\\{1}.png", _installFolder, skin);
+ string skinFile = String.Format("{0}\\Skins\\{1}.png", Program.InstallFolder, skin);
if (!File.Exists(skinFile))
throw new FileNotFoundException("Skin graphic file not found", skin);
// Try to load xml file of same name, failing that load using first word of skin name ...
- string xmlFile = String.Format("{0}\\Skins\\{1}.xml", _installFolder, skin);
+ string xmlFile = String.Format("{0}\\Skins\\{1}.xml", Program.InstallFolder, skin);
if (!File.Exists(xmlFile))
{
string firstWord = skin.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0];
- xmlFile = String.Format("{0}\\Skins\\{1}.xml", _installFolder, firstWord);
+ xmlFile = String.Format("{0}\\Skins\\{1}.xml", Program.InstallFolder, firstWord);
if (!File.Exists(xmlFile))
throw new FileNotFoundException("Skin file not found", xmlFile);
@@ -320,7 +172,7 @@
{
this.BackgroundImage = new Bitmap(skinFile);
this.ClientSize = new System.Drawing.Size(this.BackgroundImage.Width, this.BackgroundImage.Height);
- _remoteSkin = skin;
+ Program.RemoteSkin = skin;
}
else
throw new Exception(String.Format("Failed to load skin file not found \"{0}\"", xmlFile));
@@ -336,265 +188,19 @@
if (!PipeAccess.ServerRunning)
return;
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Button", Encoding.ASCII.GetBytes(keyCode));
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ PipeMessage message = new PipeMessage(Program.LocalPipeName, Environment.MachineName, "Forward Remote Button", Encoding.ASCII.GetBytes(keyCode));
+ PipeAccess.SendMessage(Common.ServerPipeName, Program.ServerHost, message.ToString());
}
- bool OpenLocalPipe()
+ void SetLabel()
{
- try
+ while (true)
{
- int pipeNumber = 1;
- bool retry = false;
-
- do
- {
- string localPipeTest = String.Format(Common.LocalPipeFormat, pipeNumber);
-
- if (PipeAccess.PipeExists(String.Format("\\\\.\\pipe\\{0}", localPipeTest)))
- {
- if (++pipeNumber <= Common.MaximumLocalClientCount)
- retry = true;
- else
- throw new Exception(String.Format("Maximum local client limit ({0}) reached", Common.MaximumLocalClientCount));
- }
- else
- {
- if (!PipeAccess.StartServer(localPipeTest, new PipeMessageHandler(ReceivedMessage)))
- throw new Exception(String.Format("Failed to start local pipe server \"{0}\"", localPipeTest));
-
- _localPipeName = localPipeTest;
- retry = false;
- }
- }
- while (retry);
-
- return true;
+ labelDisabled.Visible = !Program.Registered;
+ Thread.Sleep(2500);
}
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
- return false;
- }
}
- bool ConnectToServer()
- {
- try
- {
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Register", null);
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
- return true;
- }
- catch (AppModule.NamedPipes.NamedPipeIOException)
- {
- return false;
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
- return false;
- }
- }
-
- void KeepAliveThread()
- {
- Random random = new Random((int)DateTime.Now.Ticks);
- bool reconnect;
- int attempt;
-
- _registered = false;
- _keepAlive = true;
- while (_keepAlive)
- {
- reconnect = true;
-
- this.Invoke(_setLabel, new Object[] { true });
-
- #region Connect to server
-
- IrssLog.Info("Connecting ({0}) ...", _serverHost);
- attempt = 0;
- while (_keepAlive && reconnect)
- {
- if (ConnectToServer())
- {
- reconnect = false;
- }
- else
- {
- int wait;
-
- if (attempt <= 50)
- attempt++;
-
- if (attempt > 50)
- wait = 30; // 30 seconds
- else if (attempt > 20)
- wait = 10; // 10 seconds
- else if (attempt > 10)
- wait = 5; // 5 seconds
- else
- wait = 1; // 1 second
-
- for (int sleeps = 0; sleeps < wait && _keepAlive; sleeps++)
- Thread.Sleep(1000);
- }
- }
-
- #endregion Connect to server
-
- #region Wait for registered
-
- // Give up after 10 seconds ...
- attempt = 0;
- while (_keepAlive && !_registered && !reconnect)
- {
- if (++attempt >= 10)
- reconnect = true;
- else
- Thread.Sleep(1000);
- }
-
- #endregion Wait for registered
-
- #region Registered ...
-
- if (_keepAlive && _registered && !reconnect)
- {
- IrssLog.Info("Connected ({0})", _serverHost);
-
- this.Invoke(_setLabel, new Object[] { false });
- }
-
- #endregion Registered ...
-
- #region Ping the server repeatedly
-
- while (_keepAlive && _registered && !reconnect)
- {
- int pingID = random.Next();
- long pingTime = DateTime.Now.Ticks;
-
- try
- {
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Ping", BitConverter.GetBytes(pingID));
- PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
- }
- catch
- {
- // Failed to ping ... reconnect ...
- IrssLog.Warn("Failed to ping, attempting to reconnect ...");
- _registered = false;
- reconnect = true;
- break;
- }
-
- // Wait 10 seconds for a ping echo ...
- bool receivedEcho = false;
- while (_keepAlive && _registered && !reconnect &&
- !receivedEcho && DateTime.Now.Ticks - pingTime < 10 * 1000 * 10000)
- {
- if (_echoID == pingID)
- {
- receivedEcho = true;
- }
- else
- {
- Thread.Sleep(1000);
- }
- }
-
- if (receivedEcho) // Received ping echo ...
- {
- // Wait 60 seconds before re-pinging ...
- for (int sleeps = 0; sleeps < 60 && _keepAlive && _registered; sleeps++)
- Thread.Sleep(1000);
- }
- else // Didn't receive ping echo ...
- {
- IrssLog.Warn("No echo to ping, attempting to reconnect ...");
-
- // Break out of pinging cycle ...
- _registered = false;
- reconnect = true;
- }
- }
-
- #endregion Ping the server repeatedly
-
- }
-
- }
-
- delegate void DelegateSetLabel(bool visible);
- DelegateSetLabel _setLabel = null;
-
- void SetLabel(bool visible)
- {
- labelDisabled.Visible = visible;
- }
-
- void ReceivedMessage(string message)
- {
- PipeMessage received = PipeMessage.FromString(message);
-
- IrssLog.Debug("Received Message \"{0}\"", received.Name);
-
- try
- {
- switch (received.Name)
- {
- case "Remote Button":
- break;
-
- case "Register Success":
- {
- IrssLog.Info("Registered to IR Server");
- _registered = true;
- //_transceiverInfo = TransceiverInfo.FromBytes(received.Data);
- break;
- }
-
- case "Register Failure":
- {
- IrssLog.Warn("IR Server refused to register");
- _registered = false;
- break;
- }
-
- case "Server Shutdown":
- {
- IrssLog.Warn("IR Server Shutdown - Tray Launcher disabled until IR Server returns");
- _registered = false;
- break;
- }
-
- case "Echo":
- {
- _echoID = BitConverter.ToInt32(received.Data, 0);
- break;
- }
-
- case "Error":
- {
- IrssLog.Error(Encoding.ASCII.GetString(received.Data));
- break;
- }
-
- default:
- {
- IrssLog.Warn("Unknown message received from server: " + received.Name);
- break;
- }
- }
- }
- catch (Exception ex)
- {
- IrssLog.Error(ex.ToString());
- }
- }
-
private void toolStripMenuItemQuit_Click(object sender, EventArgs e)
{
IrssLog.Info("User quit");
@@ -610,13 +216,13 @@
private void changeServerHostToolStripMenuItem_Click(object sender, EventArgs e)
{
- StopComms();
+ Program.StopComms();
- IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(_serverHost);
+ IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(Program.ServerHost);
serverAddress.ShowDialog(this);
- _serverHost = serverAddress.ServerHost;
+ Program.ServerHost = serverAddress.ServerHost;
- StartComms();
+ Program.StartComms();
}
private void toolStripMenuItemHelp_Click(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-07-03 20:43:01 UTC (rev 670)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -1,23 +1,531 @@
using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Threading;
using System.Windows.Forms;
+using System.Xml;
+using NamedPipes;
+using IrssUtils;
+
namespace VirtualRemote
{
static class Program
{
+ #region Constants
+
+ const string DefaultSkin = "MCE";
+
+ public static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml";
+
+ #endregion Constants
+
+ #region Variables
+
+ static bool _registered = false;
+ static bool _keepAlive = true;
+ static int _echoID = -1;
+ static Thread _keepAliveThread;
+
+ static string _serverHost;
+ static string _localPipeName;
+ static string _lastKeyCode = String.Empty;
+
+ static string _installFolder;
+
+ static string _remoteSkin;
+
+ #endregion Variables
+
+ #region Properties
+
+ internal static bool Registered
+ {
+ get { return _registered; }
+ }
+
+ internal static string ServerHost
+ {
+ get { return _serverHost; }
+ set { _serverHost = value; }
+ }
+
+ internal static string LocalPipeName
+ {
+ get { return _localPipeName; }
+ }
+
+ internal static string InstallFolder
+ {
+ get { return _installFolder; }
+ }
+
+ internal static string RemoteSkin
+ {
+ get { return _remoteSkin; }
+ set { _remoteSkin = value; }
+ }
+
+ #endregion Properties
+
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
- static void Main()
+ static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new MainForm());
+
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+ IrssLog.Open(Common.FolderIrssLogs + "Virtual Remote.log");
+
+ IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
+
+ LoadSettings();
+
+ if (args.Length > 0) // Command Line Start ...
+ {
+ List<String> virtualButtons = new List<string>();
+
+ try
+ {
+ for (int index = 0; index < args.Length; index++)
+ {
+ if (args[index].Equals("-host", StringComparison.InvariantCultureIgnoreCase))
+ {
+ _serverHost = args[++index];
+ continue;
+ }
+ else
+ {
+ virtualButtons.Add(args[index]);
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error("Error processing command line parameters: {0}", ex.Message);
+ }
+
+ if (virtualButtons.Count != 0 && StartComms())
+ {
+ Thread.Sleep(250);
+
+ // Wait for registered ... Give up after 10 seconds ...
+ int attempt = 0;
+ while (!_registered)
+ {
+ if (++attempt >= 10)
+ break;
+ else
+ Thread.Sleep(1000);
+ }
+
+ if (_registered)
+ {
+ foreach (String button in virtualButtons)
+ {
+ if (button.StartsWith("~"))
+ {
+ Thread.Sleep(button.Length * 500);
+ }
+ else
+ {
+ PipeMessage message = new PipeMessage(Program.LocalPipeName, Environment.MachineName, "Forward Remote Button", Encoding.ASCII.GetBytes(button));
+ PipeAccess.SendMessage(Common.ServerPipeName, Program.ServerHost, message.ToString());
+ }
+ }
+
+ Thread.Sleep(500);
+ }
+ else
+ {
+ IrssLog.Warn("Failed to register with server host \"{0}\", custom message(s) not sent", Program.ServerHost);
+ }
+
+ StopComms();
+ }
+
+ }
+ else // GUI Start ...
+ {
+ if (String.IsNullOrEmpty(_serverHost))
+ {
+ IrssUtils.Forms.ServerAddress serverAddress = new IrssUtils.Forms.ServerAddress(Environment.MachineName);
+ serverAddress.ShowDialog();
+
+ _serverHost = serverAddress.ServerHost;
+ }
+
+ if (StartComms())
+ {
+ Application.Run(new MainForm());
+
+ StopComms();
+ }
+
+ SaveSettings();
+ }
+
+ IrssLog.Close();
}
+
+ static void LoadSettings()
+ {
+ try
+ {
+ _installFolder = SystemRegistry.GetInstallFolder();
+ if (String.IsNullOrEmpty(_installFolder))
+ _installFolder = ".";
+ else
+ _installFolder += "\\Virtual Remote";
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _installFolder = ".";
+ }
+
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value;
+ _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _serverHost = String.Empty;
+ _remoteSkin = DefaultSkin;
+ }
+ }
+ static void SaveSettings()
+ {
+ try
+ {
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerHost", _serverHost);
+ writer.WriteAttributeString("RemoteSkin", _remoteSkin);
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ internal static bool StartComms()
+ {
+ try
+ {
+ if (OpenLocalPipe())
+ {
+ _keepAliveThread = new Thread(new ThreadStart(KeepAliveThread));
+ _keepAliveThread.Start();
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ return false;
+ }
+ internal static void StopComms()
+ {
+ _keepAlive = false;
+
+ try
+ {
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
+ _keepAliveThread.Abort();
+ }
+ catch { }
+
+ try
+ {
+ if (_registered)
+ {
+ _registered = false;
+
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Unregister", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ }
+ catch { }
+
+ try
+ {
+ if (PipeAccess.ServerRunning)
+ PipeAccess.StopServer();
+ }
+ catch { }
+ }
+
+ static bool OpenLocalPipe()
+ {
+ try
+ {
+ int pipeNumber = 1;
+ bool retry = false;
+
+ do
+ {
+ string localPipeTest = String.Format(Common.LocalPipeFormat, pipeNumber);
+
+ if (PipeAccess.PipeExists(String.Format("\\\\.\\pipe\\{0}", localPipeTest)))
+ {
+ if (++pipeNumber <= Common.MaximumLocalClientCount)
+ retry = true;
+ else
+ throw new Exception(String.Format("Maximum local client limit ({0}) reached", Common.MaximumLocalClientCount));
+ }
+ else
+ {
+ if (!PipeAccess.StartServer(localPipeTest, new PipeMessageHandler(ReceivedMessage)))
+ throw new Exception(String.Format("Failed to start local pipe server \"{0}\"", localPipeTest));
+
+ _localPipeName = localPipeTest;
+ retry = false;
+ }
+ }
+ while (retry);
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ return false;
+ }
+ }
+
+ static bool ConnectToServer()
+ {
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Register", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ return true;
+ }
+ catch (AppModule.NamedPipes.NamedPipeIOException)
+ {
+ return false;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ return false;
+ }
+ }
+
+ static void KeepAliveThread()
+ {
+ Random random = new Random((int)DateTime.Now.Ticks);
+ bool reconnect;
+ int attempt;
+
+ _registered = false;
+ _keepAlive = true;
+ while (_keepAlive)
+ {
+ reconnect = true;
+
+ #region Connect to server
+
+ IrssLog.Info("Connecting ({0}) ...", _serverHost);
+ attempt = 0;
+ while (_keepAlive && reconnect)
+ {
+ if (ConnectToServer())
+ {
+ reconnect = false;
+ }
+ else
+ {
+ int wait;
+
+ if (attempt <= 50)
+ attempt++;
+
+ if (attempt > 50)
+ wait = 30; // 30 seconds
+ else if (attempt > 20)
+ wait = 10; // 10 seconds
+ else if (attempt > 10)
+ wait = 5; // 5 seconds
+ else
+ wait = 1; // 1 second
+
+ for (int sleeps = 0; sleeps < wait && _keepAlive; sleeps++)
+ Thread.Sleep(1000);
+ }
+ }
+
+ #endregion Connect to server
+
+ #region Wait for registered
+
+ // Give up after 10 seconds ...
+ attempt = 0;
+ while (_keepAlive && !_registered && !reconnect)
+ {
+ if (++attempt >= 10)
+ reconnect = true;
+ else
+ Thread.Sleep(1000);
+ }
+
+ #endregion Wait for registered
+
+ #region Registered ...
+
+ if (_keepAlive && _registered && !reconnect)
+ IrssLog.Info("Connected ({0})", _serverHost);
+
+ #endregion Registered ...
+
+ #region Ping the server repeatedly
+
+ while (_keepAlive && _registered && !reconnect)
+ {
+ int pingID = random.Next();
+ long pingTime = DateTime.Now.Ticks;
+
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Ping", BitConverter.GetBytes(pingID));
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ catch
+ {
+ // Failed to ping ... reconnect ...
+ IrssLog.Warn("Failed to ping, attempting to reconnect ...");
+ _registered = false;
+ reconnect = true;
+ break;
+ }
+
+ // Wait 10 seconds for a ping echo ...
+ bool receivedEcho = false;
+ while (_keepAlive && _registered && !reconnect &&
+ !receivedEcho && DateTime.Now.Ticks - pingTime < 10 * 1000 * 10000)
+ {
+ if (_echoID == pingID)
+ {
+ receivedEcho = true;
+ }
+ else
+ {
+ Thread.Sleep(1000);
+ }
+ }
+
+ if (receivedEcho) // Received ping echo ...
+ {
+ // Wait 60 seconds before re-pinging ...
+ for (int sleeps = 0; sleeps < 60 && _keepAlive && _registered; sleeps++)
+ Thread.Sleep(1000);
+ }
+ else // Didn't receive ping echo ...
+ {
+ IrssLog.Warn("No echo to ping, attempting to reconnect ...");
+
+ // Break out of pinging cycle ...
+ _registered = false;
+ reconnect = true;
+ }
+ }
+
+ #endregion Ping the server repeatedly
+
+ }
+
+ }
+
+ static void ReceivedMessage(string message)
+ {
+ PipeMessage received = PipeMessage.FromString(message);
+
+ IrssLog.Debug("Received Message \"{0}\"", received.Name);
+
+ try
+ {
+ switch (received.Name)
+ {
+ case "Remote Button":
+ break;
+
+ case "Register Success":
+ {
+ IrssLog.Info("Registered to IR Server");
+ _registered = true;
+ //_transceiverInfo = TransceiverInfo.FromBytes(received.Data);
+ break;
+ }
+
+ case "Register Failure":
+ {
+ IrssLog.Warn("IR Server refused to register");
+ _registered = false;
+ break;
+ }
+
+ case "Server Shutdown":
+ {
+ IrssLog.Warn("IR Server Shutdown - Tray Launcher disabled until IR Server returns");
+ _registered = false;
+ break;
+ }
+
+ case "Echo":
+ {
+ _echoID = BitConverter.ToInt32(received.Data, 0);
+ break;
+ }
+
+ case "Error":
+ {
+ IrssLog.Error(Encoding.ASCII.GetString(received.Data));
+ break;
+ }
+
+ default:
+ {
+ IrssLog.Warn("Unknown message received from server: " + received.Name);
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
}
}
Added: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -0,0 +1,125 @@
+namespace CustomHIDReceiver
+{
+ partial class AdvancedSettings
+ {
+ /// <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.numericUpDownInputByte = new System.Windows.Forms.NumericUpDown();
+ this.labelInputByte = new System.Windows.Forms.Label();
+ this.checkBoxUseAllBytes = new System.Windows.Forms.CheckBox();
+ this.labelInputByteMask = new System.Windows.Forms.Label();
+ this.numericUpDownInputByteMask = new System.Windows.Forms.NumericUpDown();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByte)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByteMask)).BeginInit();
+ this.SuspendLayout();
+ //
+ // numericUpDownInputByte
+ //
+ this.numericUpDownInputByte.Location = new System.Drawing.Point(112, 8);
+ this.numericUpDownInputByte.Maximum = new decimal(new int[] {
+ 255,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownInputByte.Name = "numericUpDownInputByte";
+ this.numericUpDownInputByte.Size = new System.Drawing.Size(56, 20);
+ this.numericUpDownInputByte.TabIndex = 0;
+ this.numericUpDownInputByte.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // labelInputByte
+ //
+ this.labelInputByte.Location = new System.Drawing.Point(8, 8);
+ this.labelInputByte.Name = "labelInputByte";
+ this.labelInputByte.Size = new System.Drawing.Size(104, 20);
+ this.labelInputByte.TabIndex = 1;
+ this.labelInputByte.Text = "Input byte:";
+ this.labelInputByte.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // checkBoxUseAllBytes
+ //
+ this.checkBoxUseAllBytes.AutoSize = true;
+ this.checkBoxUseAllBytes.Location = new System.Drawing.Point(8, 72);
+ this.checkBoxUseAllBytes.Name = "checkBoxUseAllBytes";
+ this.checkBoxUseAllBytes.Size = new System.Drawing.Size(112, 17);
+ this.checkBoxUseAllBytes.TabIndex = 2;
+ this.checkBoxUseAllBytes.Text = "Use all input bytes";
+ this.checkBoxUseAllBytes.UseVisualStyleBackColor = true;
+ //
+ // labelInputByteMask
+ //
+ this.labelInputByteMask.Location = new System.Drawing.Point(8, 40);
+ this.labelInputByteMask.Name = "labelInputByteMask";
+ this.labelInputByteMask.Size = new System.Drawing.Size(104, 20);
+ this.labelInputByteMask.TabIndex = 4;
+ this.labelInputByteMask.Text = "Input byte mask:";
+ this.labelInputByteMask.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownInputByteMask
+ //
+ this.numericUpDownInputByteMask.Location = new System.Drawing.Point(112, 40);
+ this.numericUpDownInputByteMask.Maximum = new decimal(new int[] {
+ 255,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownInputByteMask.Name = "numericUpDownInputByteMask";
+ this.numericUpDownInputByteMask.Size = new System.Drawing.Size(56, 20);
+ this.numericUpDownInputByteMask.TabIndex = 3;
+ this.numericUpDownInputByteMask.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // AdvancedSettings
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(176, 97);
+ this.Controls.Add(this.labelInputByteMask);
+ this.Controls.Add(this.numericUpDownInputByteMask);
+ this.Controls.Add(this.checkBoxUseAllBytes);
+ this.Controls.Add(this.labelInputByte);
+ this.Controls.Add(this.numericUpDownInputByte);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "AdvancedSettings";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Advanced Settings";
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByte)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByteMask)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.NumericUpDown numericUpDownInputByte;
+ private System.Windows.Forms.Label labelInputByte;
+ private System.Windows.Forms.CheckBox checkBoxUseAllBytes;
+ private System.Windows.Forms.Label labelInputByteMask;
+ private System.Windows.Forms.NumericUpDown numericUpDownInputByteMask;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace CustomHIDReceiver
+{
+ public partial class AdvancedSettings : Form
+ {
+ public AdvancedSettings()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.resx
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.resx (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.resx 2007-07-05 04:48:31 UTC (rev 671)
@@ -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/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2007-07-05 04:48:31 UTC (rev 671)
@@ -0,0 +1,340 @@
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+using System.Xml;
+
+using Microsoft.Win32.SafeHandles;
+
+using IRServerPluginInterface;
+
+namespace CustomHIDReceiver
+{
+
+ public class CustomHIDReceiver: IIRServerPlugin, IDisposable
+ {
+
+ #region Constants
+
+ public static readonly string ConfigurationFile =
+ Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
+ "\\IR Server Suite\\IR Server\\Custom HID Receiver.xml";
+
+ static readonly string[] Ports = new string[] { "None" };
+ static readonly string[] Speeds = new string[] { "None" };
+
+ const int DeviceBufferSize = 255;
+
+ #endregion Constants
+
+ #region Variables
+
+ RemoteButtonHandler _remoteButtonHandler = null;
+ FileStream _deviceStream;
+ byte[] _deviceBuffer;
+
+ string _deviceID;
+ int _inputByte;
+ byte _byteMask;
+ bool _useAllBytes;
+
+
+
+ bool _disposed = false;
+
+ #endregion Variables
+
+ #region Constructor / Deconstructor
+
+ public CustomHIDReceiver()
+ {
+ LoadSettings();
+ }
+
+ ~CustomHIDReceiver()
+ {
+ // call Dispose with false. Since we're in the
+ // destructor call, the managed resources will be
+ // disposed of anyways.
+ Dispose(false);
+ }
+
+ #endregion Constructor / Deconstructor
+
+ #region IDisposable Members
+
+ public void Dispose()
+ {
+ // dispose of the managed and unmanaged resources
+ Dispose(true);
+
+ // tell the GC that the Finalize process no longer needs
+ // to be run for this object.
+ GC.SuppressFinalize(this);
+ }
+
+ #endregion
+
+ #region IIRServerPlugin Members
+
+ public string Name { get { return "Custom HID Receiver"; } }
+ public string Version { get { return "1.0.3.2"; } }
+ public string Author { get { return "and-81"; } }
+ public string Description { get { return "Supports HID USB devices."; } }
+ public bool CanReceive { get { return true; } }
+ public bool CanTransmit { get { return false; } }
+ public bool CanLearn { get { return false; } }
+ public bool CanConfigure { get { return true; } }
+
+ public RemoteButtonHandler RemoteButtonCallback
+ {
+ get { return _remoteButtonHandler; }
+ set { _remoteButtonHandler = value; }
+ }
+
+ public string[] AvailablePorts { get { return Ports; } }
+ public string[] AvailableSpeeds { get { return Speeds; } }
+
+ public void Configure()
+ {
+ DeviceSelect deviceSelect = new DeviceSelect(_deviceID);
+ if (deviceSelect.ShowDialog() == DialogResult.OK)
+ {
+ _deviceID = deviceSelect.DeviceID;
+ SaveSettings();
+ }
+ }
+
+ public bool Start()
+ {
+ if (String.IsNullOrEmpty(_deviceID))
+ throw new Exception("No HID Device selected for use");
+
+ Guid guid = new Guid();
+ NativeMethods.HidD_GetHidGuid(ref guid);
+
+ string devicePath = FindDevice(guid, _deviceID);
+ if (devicePath == null)
+ return false;
+
+ SafeFileHandle deviceHandle = NativeMethods.CreateFile(devicePath, FileAccess.Read, FileShare.ReadWrite, IntPtr.Zero, FileMode.Open, NativeMethods.EFileAttributes.Overlapped, IntPtr.Zero);
+
+ if (deviceHandle.IsInvalid)
+ throw new Win32Exception(Marshal.GetLastWin32Error(), "Failed to open USB HID Device");
+
+ //_deviceWatcher.RegisterDeviceRemoval(deviceHandle);
+
+ _deviceBuffer = new byte[DeviceBufferSize];
+
+ _deviceStream = new FileStream(deviceHandle, FileAccess.Read, _deviceBuffer.Length, true);
+ _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null);
+
+ return true;
+ }
+ public void Suspend() { }
+ public void Resume() { }
+ public void Stop()
+ {
+ if (_deviceStream == null)
+ return;
+
+ try
+ {
+ _deviceStream.Close();
+ }
+ catch (IOException)
+ { }
+ finally
+ {
+ _deviceStream = null;
+ }
+ }
+
+ public bool Transmit(string file) { return false; }
+ public LearnStatus Learn(string file) { return LearnStatus.Failure; }
+
+ public bool SetPort(string port) { return true; }
+ public bool SetSpeed(string speed) { return true; }
+
+ #endregion IIRServerPlugin Members
+
+ #region Implementation
+
+ protected virtual void Dispose(bool disposeManagedResources)
+ {
+ // process only if mananged and unmanaged resources have
+ // not been disposed of.
+ if (!this._disposed)
+ {
+ if (disposeManagedResources)
+ {
+ // dispose managed resources
+ if (_deviceStream != null)
+ {
+ _deviceStream.Dispose();
+ _deviceStream = null;
+ }
+ }
+
+ // dispose unmanaged resources
+ this._disposed = true;
+ }
+ }
+
+ void LoadSettings()
+ {
+ try
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(ConfigurationFile);
+
+ _deviceID = doc.DocumentElement.Attributes["DeviceID"].Value;
+ _inputByte = int.Parse(doc.DocumentElement.Attributes["InputByte"].Value);
+ _byteMask = byte.Parse(doc.DocumentElement.Attributes["ByteMask"].Value);
+ _useAllBytes = bool.Parse(doc.DocumentElement.Attributes["UseAllBytes"].Value);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+
+ _deviceID = String.Empty;
+ _inputByte = 3;
+ _byteMask = 0x7F;
+ _useAllBytes = false;
+ }
+ }
+ void SaveSettings()
+ {
+ try
+ {
+ XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8);
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("DeviceID", _deviceID);
+ writer.WriteAttributeString("InputByte", _inputByte.ToString());
+ writer.WriteAttributeString("ByteMask", _byteMask.ToString());
+ writer.WriteAttributeString("UseAllBytes", _useAllBytes.ToString());
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ writer.Close();
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ }
+ }
+
+ static string FindDevice(Guid classGuid, string deviceID)
+ {
+ int lastError;
+
+ // 0x12 = DIGCF_PRESENT | DIGCF_DEVICEINTERFACE
+ IntPtr handle = NativeMethods.SetupDiGetClassDevs(ref classGuid, "", IntPtr.Zero, 0x12);
+ lastError = Marshal.GetLastWin32Error();
+
+ if (handle.ToInt32() == -1)
+ throw new Win32Exception(lastError);
+
+ string devicePath = null;
+
+ for (int deviceIndex = 0; ; deviceIndex++)
+ {
+ NativeMethods.DeviceInfoData deviceInfoData = new NativeMethods.DeviceInfoData();
+ deviceInfoData.Size = Marshal.SizeOf(deviceInfoData);
+
+ if (NativeMethods.SetupDiEnumDeviceInfo(handle, deviceIndex, ref deviceInfoData) == false)
+ {
+ // out of devices or do we have an error?
+ lastError = Marshal.GetLastWin32Error();
+ if (lastError != 0x0103 && lastError != 0x007E)
+ {
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ break;
+ }
+
+ NativeMethods.DeviceInterfaceData deviceInterfaceData = new NativeMethods.DeviceInterfaceData();
+ deviceInterfaceData.Size = Marshal.SizeOf(deviceInterfaceData);
+
+ if (NativeMethods.SetupDiEnumDeviceInterfaces(handle, ref deviceInfoData, ref classGuid, 0, ref deviceInterfaceData) == false)
+ {
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ uint cbData = 0;
+
+ if (NativeMethods.SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, IntPtr.Zero, 0, ref cbData, IntPtr.Zero) == false && cbData == 0)
+ {
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ NativeMethods.DeviceInterfaceDetailData deviceInterfaceDetailData = new NativeMethods.DeviceInterfaceDetailData();
+ deviceInterfaceDetailData.Size = 5;
+
+ if (NativeMethods.SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, ref deviceInterfaceDetailData, cbData, IntPtr.Zero, IntPtr.Zero) == false)
+ {
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ throw new Win32Exception(Marshal.GetLastWin32Error());
+ }
+
+ if (deviceInterfaceDetailData.DevicePath.IndexOf(deviceID) != -1)
+ {
+ NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ devicePath = deviceInterfaceDetailData.DevicePath;
+ break;
+ }
+ }
+
+ return devicePath;
+ }
+
+ void OnReadComplete(IAsyncResult asyncResult)
+ {
+ try
+ {
+ int bytesRead = _deviceStream.EndRead(asyncResult);
+
+ if (bytesRead == 0)
+ throw new Exception("Error reading from HID Device, zero bytes read");
+
+ if (_remoteButtonHandler != null)
+ {
+ if (_useAllBytes)
+ {
+ _remoteButtonHandler(BitConverter.ToString(_deviceBuffer, 0, bytesRead));
+ }
+ else if (bytesRead > _inputByte)
+ {
+ int keyByte = _deviceBuffer[_inputByte] & _byteMask;
+
+ string keyCode = keyByte.ToString("X2");
+
+ _remoteButtonHandler(keyCode);
+ }
+ }
+
+ _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ }
+ }
+
+ #endregion Implementation
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj (rev 0)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj 2007-07-05 04:48:31 UTC (rev 671)
@@ -0,0 +1,88 @@
+<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>{0F6576B4-C88E-4E79-B7E9-9480498C5A32}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>CustomHIDReceiver</RootNamespace>
+ <AssemblyName>Custom HID Receiver</AssemblyName>
+ <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>b...
[truncated message content] |
|
From: <an...@us...> - 2007-07-05 05:08:42
|
Revision: 672
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=672&view=rev
Author: and-81
Date: 2007-07-04 22:08:40 -0700 (Wed, 04 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-07-05 04:48:31 UTC (rev 671)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-07-05 05:08:40 UTC (rev 672)
@@ -176,19 +176,35 @@
// Start plugin(s) ...
if (_pluginReceive != null)
{
- if (_pluginReceive.Start())
- IrssLog.Info("Receiver plugin started: \"{0}\"", _pluginNameReceive);
- else
+ try
+ {
+ if (_pluginReceive.Start())
+ IrssLog.Info("Receiver plugin started: \"{0}\"", _pluginNameReceive);
+ else
+ IrssLog.Error("Failed to start receive plugin: \"{0}\"", _pluginNameReceive);
+ }
+ catch (Exception ex)
+ {
IrssLog.Error("Failed to start receive plugin: \"{0}\"", _pluginNameReceive);
+ IrssLog.Error(ex.ToString());
+ }
}
if (!_pluginNameTransmit.Equals(_pluginNameReceive, StringComparison.InvariantCultureIgnoreCase))
{
if (_pluginTransmit != null)
{
- if (_pluginTransmit.Start())
- IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit);
- else
+ try
+ {
+ if (_pluginTransmit.Start())
+ IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit);
+ else
+ IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit);
+ }
+ catch (Exception ex)
+ {
IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit);
+ IrssLog.Error(ex.ToString());
+ }
}
}
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs 2007-07-05 04:48:31 UTC (rev 671)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs 2007-07-05 05:08:40 UTC (rev 672)
@@ -33,8 +33,11 @@
this.checkBoxUseAllBytes = new System.Windows.Forms.CheckBox();
this.labelInputByteMask = new System.Windows.Forms.Label();
this.numericUpDownInputByteMask = new System.Windows.Forms.NumericUpDown();
+ this.labelRepeatDelay = new System.Windows.Forms.Label();
+ this.numericUpDownRepeatDelay = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByte)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByteMask)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatDelay)).BeginInit();
this.SuspendLayout();
//
// numericUpDownInputByte
@@ -91,11 +94,35 @@
this.numericUpDownInputByteMask.TabIndex = 3;
this.numericUpDownInputByteMask.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
+ // labelRepeatDelay
+ //
+ this.labelRepeatDelay.Location = new System.Drawing.Point(8, 104);
+ this.labelRepeatDelay.Name = "labelRepeatDelay";
+ this.labelRepeatDelay.Size = new System.Drawing.Size(104, 20);
+ this.labelRepeatDelay.TabIndex = 6;
+ this.labelRepeatDelay.Text = "Repeat delay:";
+ this.labelRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownRepeatDelay
+ //
+ this.numericUpDownRepeatDelay.Location = new System.Drawing.Point(112, 104);
+ this.numericUpDownRepeatDelay.Maximum = new decimal(new int[] {
+ 10000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownRepeatDelay.Name = "numericUpDownRepeatDelay";
+ this.numericUpDownRepeatDelay.Size = new System.Drawing.Size(56, 20);
+ this.numericUpDownRepeatDelay.TabIndex = 5;
+ this.numericUpDownRepeatDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
// AdvancedSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(176, 97);
+ this.ClientSize = new System.Drawing.Size(176, 137);
+ this.Controls.Add(this.labelRepeatDelay);
+ this.Controls.Add(this.numericUpDownRepeatDelay);
this.Controls.Add(this.labelInputByteMask);
this.Controls.Add(this.numericUpDownInputByteMask);
this.Controls.Add(this.checkBoxUseAllBytes);
@@ -109,6 +136,7 @@
this.Text = "Advanced Settings";
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByte)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownInputByteMask)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatDelay)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -121,5 +149,7 @@
private System.Windows.Forms.CheckBox checkBoxUseAllBytes;
private System.Windows.Forms.Label labelInputByteMask;
private System.Windows.Forms.NumericUpDown numericUpDownInputByteMask;
+ private System.Windows.Forms.Label labelRepeatDelay;
+ private System.Windows.Forms.NumericUpDown numericUpDownRepeatDelay;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2007-07-05 04:48:31 UTC (rev 671)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2007-07-05 05:08:40 UTC (rev 672)
@@ -40,7 +40,10 @@
byte _byteMask;
bool _useAllBytes;
+ int _repeatDelay;
+ string _lastKeyCode = String.Empty;
+ DateTime _lastCodeTime = DateTime.Now;
bool _disposed = false;
@@ -190,10 +193,11 @@
XmlDocument doc = new XmlDocument();
doc.Load(ConfigurationFile);
- _deviceID = doc.DocumentElement.Attributes["DeviceID"].Value;
- _inputByte = int.Parse(doc.DocumentElement.Attributes["InputByte"].Value);
- _byteMask = byte.Parse(doc.DocumentElement.Attributes["ByteMask"].Value);
- _useAllBytes = bool.Parse(doc.DocumentElement.Attributes["UseAllBytes"].Value);
+ _deviceID = doc.DocumentElement.Attributes["DeviceID"].Value;
+ _inputByte = int.Parse(doc.DocumentElement.Attributes["InputByte"].Value);
+ _byteMask = byte.Parse(doc.DocumentElement.Attributes["ByteMask"].Value);
+ _useAllBytes = bool.Parse(doc.DocumentElement.Attributes["UseAllBytes"].Value);
+ _repeatDelay = int.Parse(doc.DocumentElement.Attributes["RepeatDelay"].Value);
}
catch (Exception ex)
{
@@ -203,6 +207,7 @@
_inputByte = 3;
_byteMask = 0x7F;
_useAllBytes = false;
+ _repeatDelay = 250;
}
}
void SaveSettings()
@@ -220,6 +225,7 @@
writer.WriteAttributeString("InputByte", _inputByte.ToString());
writer.WriteAttributeString("ByteMask", _byteMask.ToString());
writer.WriteAttributeString("UseAllBytes", _useAllBytes.ToString());
+ writer.WriteAttributeString("RepeatDelay", _repeatDelay.ToString());
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
@@ -311,18 +317,35 @@
if (_remoteButtonHandler != null)
{
+ string keyCode = String.Empty;
+
if (_useAllBytes)
{
- _remoteButtonHandler(BitConverter.ToString(_deviceBuffer, 0, bytesRead));
+ keyCode = BitConverter.ToString(_deviceBuffer, 0, bytesRead);
}
else if (bytesRead > _inputByte)
{
int keyByte = _deviceBuffer[_inputByte] & _byteMask;
- string keyCode = keyByte.ToString("X2");
+ keyCode = keyByte.ToString("X2");
+ }
+ if (keyCode == _lastKeyCode)
+ {
+ TimeSpan timeSpan = DateTime.Now - _lastCodeTime;
+
+ if (timeSpan.Milliseconds >= _repeatDelay)
+ {
+ _remoteButtonHandler(keyCode);
+ _lastCodeTime = DateTime.Now;
+ }
+ }
+ else
+ {
_remoteButtonHandler(keyCode);
- }
+ _lastCodeTime = DateTime.Now;
+ _lastKeyCode = keyCode;
+ }
}
_deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-06 05:03:28
|
Revision: 675
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=675&view=rev
Author: and-81
Date: 2007-07-05 22:03:26 -0700 (Thu, 05 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/IR Blast/
trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj
trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/
trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
Added: trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj 2007-07-06 05:03:26 UTC (rev 675)
@@ -0,0 +1,76 @@
+<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>{C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>IRBlast</RootNamespace>
+ <AssemblyName>IRBlast</AssemblyName>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <StartupObject>IRBlast.Program</StartupObject>
+ <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>
+ </DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </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\irssUtils\IrssUtils.csproj">
+ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project>
+ <Name>IrssUtils</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\AppModule.InterProcessComm\AppModule.InterProcessComm.csproj">
+ <Project>{E98F1F7E-40B6-44C8-AC66-EC867B141FA1}</Project>
+ <Name>AppModule.InterProcessComm</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\AppModule.NamedPipes\AppModule.NamedPipes.csproj">
+ <Project>{077B53BB-404A-4B2F-BA17-AAE98C5E9C66}</Project>
+ <Name>AppModule.NamedPipes</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\Named Pipes\Named Pipes.csproj">
+ <Project>{F4EA6055-7133-4F18-8971-E19ADEB482C1}</Project>
+ <Name>Named Pipes</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>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\IR Server Suite\$(ProjectName)\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-07-06 05:03:26 UTC (rev 675)
@@ -0,0 +1,538 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.IO;
+using System.Text;
+using System.Threading;
+using System.Xml;
+
+using NamedPipes;
+using IrssUtils;
+
+namespace IRBlast
+{
+
+ static class Program
+ {
+
+ #region Variables
+
+ static bool _registered = false;
+ static bool _keepAlive = true;
+ static int _echoID = -1;
+ static Thread _keepAliveThread;
+
+ static string _serverHost = null;
+ static string _localPipeName;
+
+ static string _blastPort = "None";
+ static string _blastSpeed = "None";
+
+ static bool _treatAsChannelNumber = false;
+
+ #endregion Variables
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+ IrssLog.Open(Common.FolderIrssLogs + "IR Blast.log");
+
+ IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
+
+ ShowHeader();
+
+ try
+ {
+
+ if (args.Length > 0) // Command Line Start ...
+ {
+ List<String> irCommands = new List<string>();
+
+ for (int index = 0; index < args.Length; index++)
+ {
+ switch (args[index].ToLowerInvariant())
+ {
+ case "-host":
+ _serverHost = args[++index];
+ continue;
+
+ case "-port":
+ _blastPort = args[++index];
+ continue;
+
+ case "-speed":
+ _blastSpeed = args[++index];
+ continue;
+
+ case "-channel":
+ _treatAsChannelNumber = true;
+ continue;
+
+ default:
+ irCommands.Add(args[index]);
+ continue;
+ }
+ }
+
+ if (String.IsNullOrEmpty(_serverHost) || irCommands.Count == 0)
+ {
+ Console.WriteLine("Malformed command line parameters ...");
+ Console.WriteLine();
+
+ ShowHelp();
+ }
+ else if (StartComms())
+ {
+ Thread.Sleep(250);
+
+ // Wait for registered ... Give up after 10 seconds ...
+ int attempt = 0;
+ while (!_registered)
+ {
+ if (++attempt >= 10)
+ break;
+ else
+ Thread.Sleep(1000);
+ }
+
+ if (_registered)
+ {
+ string fileName;
+ foreach (String command in irCommands)
+ {
+ if (_treatAsChannelNumber)
+ {
+ Info("Processing channel: {0}", command);
+ foreach (char digit in command)
+ {
+ if (digit == '~')
+ {
+ Thread.Sleep(500);
+ }
+ else
+ {
+ fileName = Common.FolderIRCommands + digit + Common.FileExtensionIR;
+ BlastIR(fileName, _blastPort, _blastSpeed);
+ }
+ }
+ }
+ else if (command.StartsWith("~"))
+ {
+ Thread.Sleep(command.Length * 500);
+ }
+ else
+ {
+ fileName = Common.FolderIRCommands + command;
+ BlastIR(fileName, _blastPort, _blastSpeed);
+ }
+ }
+
+ Thread.Sleep(500);
+ }
+ else
+ {
+ Warn("Failed to register with server host \"{0}\", blasting not sent", _serverHost);
+ }
+
+ }
+ }
+ else // Give help ...
+ {
+ ShowHelp();
+ }
+ }
+ catch (Exception ex)
+ {
+ Error(ex);
+ }
+
+ StopComms();
+
+ IrssLog.Close();
+ }
+
+ static void ShowHeader()
+ {
+ Console.WriteLine("");
+ Console.WriteLine("IR Blast");
+ Console.WriteLine("-----------------------------------------------------------------------------");
+ Console.WriteLine("Command line IR blaster for IR Server Suite.");
+ Console.WriteLine("By and-81.");
+ Console.WriteLine("");
+ Console.WriteLine("");
+ }
+
+ static void ShowHelp()
+ {
+ IrssLog.Debug("Show Help");
+
+ Console.WriteLine("IRBlast.exe -host <server> -port [port] -speed [speed] [-channel] <commands>");
+ Console.WriteLine("");
+ Console.WriteLine("Use -host to specify the computer that is hosting the IR Server.");
+ Console.WriteLine("Use -port to blast to a particular blaster port (Optional).");
+ Console.WriteLine("Use -speed to set the blaster speed (Optional).");
+ Console.WriteLine("Use -channel to tell IR Blast to break apart the following IR Command and");
+ Console.WriteLine(" use each digit for a separate IR blast (Optional).");
+ Console.WriteLine("Use a tilde ~ between commands to insert half second pauses.");
+ Console.WriteLine("");
+ Console.WriteLine("");
+ Console.WriteLine("Examples:");
+ Console.WriteLine("");
+ Console.WriteLine("IRBlast -host HTPC TV_Power.IR");
+ Console.WriteLine("");
+ Console.WriteLine("This would blast the TV_Power.IR command on the HTPC computer to the default");
+ Console.WriteLine("blaster port at the default blaster speed.");
+ Console.WriteLine("");
+ Console.WriteLine("IRBlast -host MEDIAPC -port Port_2 \"Turn on surround.IR\"");
+ Console.WriteLine("");
+ Console.WriteLine("This would blast the \"Turn on surround.IR\" command on the MEDIAPC computer");
+ Console.WriteLine("to blaster port 2 at the default blaster speed.");
+ Console.WriteLine("");
+ Console.WriteLine("IRBlast -host HTPC -channel 302");
+ Console.WriteLine("");
+ Console.WriteLine("This would blast the 3.IR, 0.IR, and 2.IR commands on the HTPC computer to");
+ Console.WriteLine("the default blaster port at the default blaster speed.");
+ Console.WriteLine("");
+ Console.WriteLine("");
+ }
+
+ static bool StartComms()
+ {
+ try
+ {
+ if (OpenLocalPipe())
+ {
+ _keepAliveThread = new Thread(new ThreadStart(KeepAliveThread));
+ _keepAliveThread.Start();
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ Error(ex);
+ }
+
+ return false;
+ }
+ static void StopComms()
+ {
+ _keepAlive = false;
+
+ try
+ {
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
+ _keepAliveThread.Abort();
+ }
+ catch { }
+
+ try
+ {
+ if (_registered)
+ {
+ _registered = false;
+
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Unregister", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ }
+ catch { }
+
+ try
+ {
+ if (PipeAccess.ServerRunning)
+ PipeAccess.StopServer();
+ }
+ catch { }
+ }
+
+ static bool OpenLocalPipe()
+ {
+ try
+ {
+ int pipeNumber = 1;
+ bool retry = false;
+
+ do
+ {
+ string localPipeTest = String.Format(Common.LocalPipeFormat, pipeNumber);
+
+ if (PipeAccess.PipeExists(String.Format("\\\\.\\pipe\\{0}", localPipeTest)))
+ {
+ if (++pipeNumber <= Common.MaximumLocalClientCount)
+ retry = true;
+ else
+ throw new Exception(String.Format("Maximum local client limit ({0}) reached", Common.MaximumLocalClientCount));
+ }
+ else
+ {
+ if (!PipeAccess.StartServer(localPipeTest, new PipeMessageHandler(ReceivedMessage)))
+ throw new Exception(String.Format("Failed to start local pipe server \"{0}\"", localPipeTest));
+
+ _localPipeName = localPipeTest;
+ retry = false;
+ }
+ }
+ while (retry);
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ Error(ex);
+ return false;
+ }
+ }
+
+ static bool ConnectToServer()
+ {
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Register", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ return true;
+ }
+ catch (AppModule.NamedPipes.NamedPipeIOException)
+ {
+ return false;
+ }
+ catch (Exception ex)
+ {
+ Error(ex);
+ return false;
+ }
+ }
+
+ static void KeepAliveThread()
+ {
+ Random random = new Random((int)DateTime.Now.Ticks);
+ bool reconnect;
+ int attempt;
+
+ _registered = false;
+ _keepAlive = true;
+ while (_keepAlive)
+ {
+ reconnect = true;
+
+ #region Connect to server
+
+ Info("Connecting ({0}) ...", _serverHost);
+ attempt = 0;
+ while (_keepAlive && reconnect)
+ {
+ if (ConnectToServer())
+ {
+ reconnect = false;
+ }
+ else
+ {
+ int wait;
+
+ if (attempt <= 50)
+ attempt++;
+
+ if (attempt > 50)
+ wait = 30; // 30 seconds
+ else if (attempt > 20)
+ wait = 10; // 10 seconds
+ else if (attempt > 10)
+ wait = 5; // 5 seconds
+ else
+ wait = 1; // 1 second
+
+ for (int sleeps = 0; sleeps < wait && _keepAlive; sleeps++)
+ Thread.Sleep(1000);
+ }
+ }
+
+ #endregion Connect to server
+
+ #region Wait for registered
+
+ // Give up after 10 seconds ...
+ attempt = 0;
+ while (_keepAlive && !_registered && !reconnect)
+ {
+ if (++attempt >= 10)
+ reconnect = true;
+ else
+ Thread.Sleep(1000);
+ }
+
+ #endregion Wait for registered
+
+ #region Ping the server repeatedly
+
+ while (_keepAlive && _registered && !reconnect)
+ {
+ int pingID = random.Next();
+ long pingTime = DateTime.Now.Ticks;
+
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Ping", BitConverter.GetBytes(pingID));
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ catch
+ {
+ // Failed to ping ... reconnect ...
+ Warn("Failed to ping, attempting to reconnect ...");
+ _registered = false;
+ reconnect = true;
+ break;
+ }
+
+ // Wait 10 seconds for a ping echo ...
+ bool receivedEcho = false;
+ while (_keepAlive && _registered && !reconnect &&
+ !receivedEcho && DateTime.Now.Ticks - pingTime < 10 * 1000 * 10000)
+ {
+ if (_echoID == pingID)
+ {
+ receivedEcho = true;
+ }
+ else
+ {
+ Thread.Sleep(1000);
+ }
+ }
+
+ if (receivedEcho) // Received ping echo ...
+ {
+ // Wait 60 seconds before re-pinging ...
+ for (int sleeps = 0; sleeps < 60 && _keepAlive && _registered; sleeps++)
+ Thread.Sleep(1000);
+ }
+ else // Didn't receive ping echo ...
+ {
+ Warn("No echo to ping, attempting to reconnect ...");
+
+ // Break out of pinging cycle ...
+ _registered = false;
+ reconnect = true;
+ }
+ }
+
+ #endregion Ping the server repeatedly
+
+ }
+
+ }
+
+ static void ReceivedMessage(string message)
+ {
+ PipeMessage received = PipeMessage.FromString(message);
+
+ IrssLog.Debug("Received Message \"{0}\"", received.Name);
+
+ try
+ {
+ switch (received.Name)
+ {
+ case "Remote Button":
+ break;
+
+ case "Blast Success":
+ Info("Blast Success");
+ break;
+
+ case "Blast Failure":
+ Warn("Blast Failed!");
+ break;
+
+ case "Register Success":
+ {
+ Info("Registered to IR Server");
+ _registered = true;
+ //_transceiverInfo = TransceiverInfo.FromBytes(received.Data);
+ break;
+ }
+
+ case "Register Failure":
+ {
+ Warn("IR Server refused to register");
+ _registered = false;
+ break;
+ }
+
+ case "Server Shutdown":
+ {
+ Warn("IR Server Shutdown - Blasting disabled until IR Server returns");
+ _registered = false;
+ break;
+ }
+
+ case "Echo":
+ {
+ _echoID = BitConverter.ToInt32(received.Data, 0);
+ break;
+ }
+
+ case "Error":
+ {
+ Warn(Encoding.ASCII.GetString(received.Data));
+ break;
+ }
+
+ default:
+ {
+ Warn("Unknown message received from server: " + received.Name);
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Error(ex);
+ }
+ }
+
+ static void BlastIR(string fileName, string port, string speed)
+ {
+ FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
+
+ byte[] outData = new byte[8 + port.Length + speed.Length + file.Length];
+
+ BitConverter.GetBytes(port.Length).CopyTo(outData, 0);
+ Encoding.ASCII.GetBytes(port).CopyTo(outData, 4);
+ BitConverter.GetBytes(speed.Length).CopyTo(outData, 4 + port.Length);
+ Encoding.ASCII.GetBytes(speed).CopyTo(outData, 8 + port.Length);
+
+ file.Read(outData, 8 + port.Length + speed.Length, (int)file.Length);
+ file.Close();
+
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Blast", outData);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+
+ #region Log Commands
+
+ static void Info(string format, params object[] args)
+ {
+ string message = String.Format(format, args);
+ Console.WriteLine(message);
+ IrssLog.Info(message);
+ }
+ static void Warn(string format, params object[] args)
+ {
+ string message = String.Format(format, args);
+ Console.WriteLine(message);
+ IrssLog.Warn(message);
+ }
+ static void Error(Exception ex)
+ {
+ Console.WriteLine(ex.Message);
+ IrssLog.Error(ex.ToString());
+ }
+
+ #endregion Log Commands
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2007-07-06 05:03:26 UTC (rev 675)
@@ -0,0 +1,39 @@
+using System;
+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("IR Blast")]
+[assembly: AssemblyDescription("Command line application for blasting IR commands to IR Server")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("and-81")]
+[assembly: AssemblyProduct("IRBlast")]
+[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)]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
+
+[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-07-05 19:08:21 UTC (rev 674)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-07-06 05:03:26 UTC (rev 675)
@@ -112,7 +112,7 @@
}
catch (Exception ex)
{
- IrssLog.Error("Error processing command line parameters: {0}", ex.Message);
+ IrssLog.Error("Error processing command line parameters: {0}", ex.ToString());
}
if (virtualButtons.Count != 0 && StartComms())
@@ -150,8 +150,6 @@
{
IrssLog.Warn("Failed to register with server host \"{0}\", custom message(s) not sent", Program.ServerHost);
}
-
- StopComms();
}
}
@@ -166,15 +164,13 @@
}
if (StartComms())
- {
Application.Run(new MainForm());
- StopComms();
- }
-
SaveSettings();
}
+ StopComms();
+
IrssLog.Close();
}
@@ -401,13 +397,6 @@
#endregion Wait for registered
- #region Registered ...
-
- if (_keepAlive && _registered && !reconnect)
- IrssLog.Info("Connected ({0})", _serverHost);
-
- #endregion Registered ...
-
#region Ping the server repeatedly
while (_keepAlive && _registered && !reconnect)
@@ -496,7 +485,7 @@
case "Server Shutdown":
{
- IrssLog.Warn("IR Server Shutdown - Tray Launcher disabled until IR Server returns");
+ IrssLog.Warn("IR Server Shutdown - Virtual Remote disabled until IR Server returns");
_registered = false;
break;
}
Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-07-05 19:08:21 UTC (rev 674)
+++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-07-06 05:03:26 UTC (rev 675)
@@ -67,6 +67,8 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Custom HID Receiver", "IR Server Plugins\Custom HID Receiver\Custom HID Receiver.csproj", "{0F6576B4-C88E-4E79-B7E9-9480498C5A32}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IR Blast", "Applications\IR Blast\IR Blast.csproj", "{C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -185,6 +187,10 @@
{0F6576B4-C88E-4E79-B7E9-9480498C5A32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F6576B4-C88E-4E79-B7E9-9480498C5A32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F6576B4-C88E-4E79-B7E9-9480498C5A32}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -196,6 +202,7 @@
{A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6} = {0C209E91-5AD5-4662-AD0E-976A940D4806}
{46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63} = {0C209E91-5AD5-4662-AD0E-976A940D4806}
{D871AB9A-71B3-4D63-8320-084BAD75064E} = {0C209E91-5AD5-4662-AD0E-976A940D4806}
+ {C6B0CF12-01D3-439A-9FB4-DEFD5B32F6FB} = {0C209E91-5AD5-4662-AD0E-976A940D4806}
{A4023992-CCD6-461E-8E14-219A496734C5} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
{7C686499-7517-4338-8837-7E8617549D9A} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
{470D3C31-8D08-45D5-8C67-AEDEAD834402} = {0D1620EE-01B9-43B5-9FAA-E983BD9EBDBD}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-12 03:23:12
|
Revision: 686
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=686&view=rev
Author: and-81
Date: 2007-07-11 20:23:10 -0700 (Wed, 11 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
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/Translator.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.resx
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -152,11 +152,7 @@
if (StartRelay())
IrssLog.Info("Started in Relay Mode");
else
- {
IrssLog.Error("Failed to start in Relay Mode");
- return false;
- }
-
break;
}
@@ -165,10 +161,7 @@
if (StartRepeater())
IrssLog.Info("Started in Repeater Mode");
else
- {
IrssLog.Error("Failed to start in Repeater Mode");
- return false;
- }
break;
}
}
@@ -331,7 +324,6 @@
return false;
}
- // Todo: Put in the proper retry system from other apps/plugins
void StartMessageQueue()
{
_processMessageQueue = true;
@@ -945,8 +937,8 @@
break;
}
- // Pause 1 second before instructing the client to start the IR learning ...
- Thread.Sleep(1000);
+ // Pause half a second before instructing the client to start the IR learning ...
+ Thread.Sleep(500);
// Send back a "Start Learn" trigger ...
PipeMessage trigger = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Start Learn", null);
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -793,10 +793,12 @@
// radioButtonActiveWindow
//
this.radioButtonActiveWindow.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.radioButtonActiveWindow.Checked = true;
this.radioButtonActiveWindow.Location = new System.Drawing.Point(16, 24);
this.radioButtonActiveWindow.Name = "radioButtonActiveWindow";
this.radioButtonActiveWindow.Size = new System.Drawing.Size(104, 16);
this.radioButtonActiveWindow.TabIndex = 0;
+ this.radioButtonActiveWindow.TabStop = true;
this.radioButtonActiveWindow.Text = "Active window";
this.radioButtonActiveWindow.UseVisualStyleBackColor = true;
this.radioButtonActiveWindow.CheckedChanged += new System.EventHandler(this.radioButtonActiveWindow_CheckedChanged);
@@ -828,7 +830,6 @@
this.radioButtonWindowTitle.Name = "radioButtonWindowTitle";
this.radioButtonWindowTitle.Size = new System.Drawing.Size(96, 16);
this.radioButtonWindowTitle.TabIndex = 3;
- this.radioButtonWindowTitle.TabStop = true;
this.radioButtonWindowTitle.Text = "Window title";
this.radioButtonWindowTitle.UseVisualStyleBackColor = true;
this.radioButtonWindowTitle.CheckedChanged += new System.EventHandler(this.radioButtonWindowTitle_CheckedChanged);
@@ -840,7 +841,6 @@
this.radioButtonApplication.Name = "radioButtonApplication";
this.radioButtonApplication.Size = new System.Drawing.Size(88, 16);
this.radioButtonApplication.TabIndex = 1;
- this.radioButtonApplication.TabStop = true;
this.radioButtonApplication.Text = "Application";
this.radioButtonApplication.UseVisualStyleBackColor = true;
this.radioButtonApplication.CheckedChanged += new System.EventHandler(this.radioButtonApplication_CheckedChanged);
@@ -852,7 +852,6 @@
this.radioButtonClass.Name = "radioButtonClass";
this.radioButtonClass.Size = new System.Drawing.Size(72, 16);
this.radioButtonClass.TabIndex = 2;
- this.radioButtonClass.TabStop = true;
this.radioButtonClass.Text = "Class";
this.radioButtonClass.UseVisualStyleBackColor = true;
this.radioButtonClass.CheckedChanged += new System.EventHandler(this.radioButtonClass_CheckedChanged);
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -373,7 +373,9 @@
}
else if (radioButtonWindowTitle.Checked)
{
- // TODO: Locate Window
+ WindowList windowList = new WindowList();
+ if (windowList.ShowDialog(this) == DialogResult.OK)
+ textBoxMsgTarget.Text = windowList.SelectedWindowTitle;
}
}
@@ -394,7 +396,7 @@
}
private void radioButtonWindowTitle_CheckedChanged(object sender, EventArgs e)
{
- buttonFindMsgTarget.Enabled = false;
+ buttonFindMsgTarget.Enabled = true;
textBoxMsgTarget.Enabled = true;
}
Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -0,0 +1,70 @@
+namespace Translator
+{
+ partial class WindowList
+ {
+ /// <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.listBoxWindows = new System.Windows.Forms.ListBox();
+ this.SuspendLayout();
+ //
+ // listBoxWindows
+ //
+ this.listBoxWindows.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBoxWindows.FormattingEnabled = true;
+ this.listBoxWindows.HorizontalScrollbar = true;
+ this.listBoxWindows.IntegralHeight = false;
+ this.listBoxWindows.Location = new System.Drawing.Point(0, 0);
+ this.listBoxWindows.Name = "listBoxWindows";
+ this.listBoxWindows.Size = new System.Drawing.Size(292, 376);
+ this.listBoxWindows.TabIndex = 0;
+ this.listBoxWindows.DoubleClick += new System.EventHandler(this.listBoxWindows_DoubleClick);
+ this.listBoxWindows.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.listBoxWindows_KeyPress);
+ //
+ // WindowList
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(292, 376);
+ this.Controls.Add(this.listBoxWindows);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "WindowList";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Window List";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.ListBox listBoxWindows;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Translator
+{
+
+ public partial class WindowList : Form
+ {
+
+ #region Interop
+
+ public delegate bool EnumWindowsProc(int hWnd, int lParam);
+
+ [DllImport("user32.dll")]
+ private static extern int GetWindowText(int hWnd, StringBuilder title, int size);
+
+ [DllImport("user32.dll")]
+ private static extern int GetWindowModuleFileName(int hWnd, StringBuilder title, int size);
+
+ [DllImport("user32.dll")]
+ private static extern int EnumWindows(EnumWindowsProc ewp, int lParam);
+
+ #endregion Interop
+
+ #region Properties
+
+ public string SelectedWindowTitle
+ {
+ get { return listBoxWindows.SelectedItem as string; }
+ }
+
+ #endregion Properties
+
+ #region Constructor
+
+ public WindowList()
+ {
+ InitializeComponent();
+
+ PopulateList();
+ }
+
+ #endregion Constructor
+
+ void PopulateList()
+ {
+ EnumWindowsProc ewp = new EnumWindowsProc(EvalWindow);
+
+ EnumWindows(ewp, 0);
+ }
+
+ bool EvalWindow(int hWnd, int lParam)
+ {
+ StringBuilder title = new StringBuilder(256);
+ GetWindowText(hWnd, title, 256);
+
+ //StringBuilder module = new StringBuilder(256);
+ //GetWindowModuleFileName(hWnd, module, 256);
+
+ if (title.Length == 0)
+ return true;
+
+ listBoxWindows.Items.Add(title.ToString());
+
+ return true;
+ }
+
+ private void listBoxWindows_DoubleClick(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void listBoxWindows_KeyPress(object sender, KeyPressEventArgs e)
+ {
+ if (e.KeyChar == 27)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+ }
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx 2007-07-12 03:23:10 UTC (rev 686)
@@ -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
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-07-12 03:23:10 UTC (rev 686)
@@ -88,6 +88,12 @@
<Compile Include="Forms\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
+ <Compile Include="Forms\WindowList.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Forms\WindowList.Designer.cs">
+ <DependentUpon>WindowList.cs</DependentUpon>
+ </Compile>
<Compile Include="MappedEvent.cs" />
<Compile Include="Program.cs" />
<Compile Include="ProgramSettings.cs" />
@@ -120,6 +126,10 @@
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="Forms\WindowList.resx">
+ <DependentUpon>WindowList.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.Designer.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.Designer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -40,10 +40,15 @@
this.comboBoxBlasterType = new System.Windows.Forms.ComboBox();
this.labelBlasterType = new System.Windows.Forms.Label();
this.groupBoxBlaster = new System.Windows.Forms.GroupBox();
+ this.groupBoxLearnTimeout = new System.Windows.Forms.GroupBox();
+ this.labelLearnIRTimeout = new System.Windows.Forms.Label();
+ this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).BeginInit();
this.groupBoxTimes.SuspendLayout();
this.groupBoxBlaster.SuspendLayout();
+ this.groupBoxLearnTimeout.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).BeginInit();
this.SuspendLayout();
//
// labelButtonRepeatDelay
@@ -127,7 +132,7 @@
//
// buttonOK
//
- this.buttonOK.Location = new System.Drawing.Point(96, 168);
+ this.buttonOK.Location = new System.Drawing.Point(96, 232);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
this.buttonOK.TabIndex = 2;
@@ -138,7 +143,7 @@
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(168, 168);
+ this.buttonCancel.Location = new System.Drawing.Point(168, 232);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
this.buttonCancel.TabIndex = 3;
@@ -189,14 +194,65 @@
this.groupBoxBlaster.TabStop = false;
this.groupBoxBlaster.Text = "Blaster setup";
//
+ // groupBoxLearnTimeout
+ //
+ this.groupBoxLearnTimeout.Controls.Add(this.labelLearnIRTimeout);
+ this.groupBoxLearnTimeout.Controls.Add(this.numericUpDownLearnTimeout);
+ this.groupBoxLearnTimeout.Location = new System.Drawing.Point(8, 168);
+ this.groupBoxLearnTimeout.Name = "groupBoxLearnTimeout";
+ this.groupBoxLearnTimeout.Size = new System.Drawing.Size(224, 56);
+ this.groupBoxLearnTimeout.TabIndex = 4;
+ this.groupBoxLearnTimeout.TabStop = false;
+ this.groupBoxLearnTimeout.Text = "Learn IR timeout (in milliseconds)";
+ //
+ // labelLearnIRTimeout
+ //
+ this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 24);
+ this.labelLearnIRTimeout.Name = "labelLearnIRTimeout";
+ this.labelLearnIRTimeout.Size = new System.Drawing.Size(120, 20);
+ this.labelLearnIRTimeout.TabIndex = 2;
+ this.labelLearnIRTimeout.Text = "Learn IR timeout:";
+ this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownLearnTimeout
+ //
+ this.numericUpDownLearnTimeout.Increment = new decimal(new int[] {
+ 500,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(136, 24);
+ this.numericUpDownLearnTimeout.Maximum = new decimal(new int[] {
+ 60000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Minimum = new decimal(new int[] {
+ 2000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Name = "numericUpDownLearnTimeout";
+ this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownLearnTimeout.TabIndex = 3;
+ this.numericUpDownLearnTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownLearnTimeout.ThousandsSeparator = true;
+ this.toolTips.SetToolTip(this.numericUpDownLearnTimeout, "When teaching IR commands this is how long before the process times out");
+ this.numericUpDownLearnTimeout.Value = new decimal(new int[] {
+ 8000,
+ 0,
+ 0,
+ 0});
+ //
// Configure
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(240, 202);
+ this.ClientSize = new System.Drawing.Size(240, 263);
this.ControlBox = false;
+ this.Controls.Add(this.groupBoxLearnTimeout);
this.Controls.Add(this.groupBoxBlaster);
this.Controls.Add(this.groupBoxTimes);
this.Controls.Add(this.buttonCancel);
@@ -209,6 +265,8 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).EndInit();
this.groupBoxTimes.ResumeLayout(false);
this.groupBoxBlaster.ResumeLayout(false);
+ this.groupBoxLearnTimeout.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).EndInit();
this.ResumeLayout(false);
}
@@ -226,5 +284,8 @@
private System.Windows.Forms.ComboBox comboBoxBlasterType;
private System.Windows.Forms.Label labelBlasterType;
private System.Windows.Forms.GroupBox groupBoxBlaster;
+ private System.Windows.Forms.GroupBox groupBoxLearnTimeout;
+ private System.Windows.Forms.Label labelLearnIRTimeout;
+ private System.Windows.Forms.NumericUpDown numericUpDownLearnTimeout;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Configure.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -31,6 +31,12 @@
set { numericUpDownButtonHeldDelay.Value = new Decimal(value); }
}
+ public int LearnTimeout
+ {
+ get { return Decimal.ToInt32(numericUpDownLearnTimeout.Value); }
+ set { numericUpDownLearnTimeout.Value = new Decimal(value); }
+ }
+
#endregion Properties
#region Constructor
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -164,7 +164,6 @@
#region Methods
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrRegisterEvents(HandleRef windowHandle);
/// <summary>
/// Register your window handle to receive window messages from the MceIrApi.
@@ -184,7 +183,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrUnregisterEvents();
/// <summary>
/// Unregister from receiving window messages from the MceIrApi.
@@ -203,7 +201,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrSetRepeatTimes(int firstRepeat, int nextRepeats);
/// <summary>
/// Sets the time between key presses being repeated.
@@ -218,7 +215,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrRecordToFile(SafeFileHandle fileHandle, int timeout);
/// <summary>
/// Record an IR code to file.
@@ -233,7 +229,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrPlaybackFromFile(SafeFileHandle fileHandle);
/// <summary>
/// Transmit an IR Code from a file.
@@ -249,7 +244,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrSuspend();
/// <summary>
/// Suspend the MceIrApi.
@@ -265,7 +259,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrResume();
/// <summary>
/// Resume the MceIrApi.
@@ -282,7 +275,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrSelectBlaster(int portNumber);
/// <summary>
/// Select the Blaster port to use for transmitting IR Codes.
@@ -295,7 +287,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrCheckFile(SafeFileHandle fileHandle);
/// <summary>
/// Check an IR Code file to ensure it is valid.
@@ -309,7 +300,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrSetBlasterSpeed(int speed);
/// <summary>
/// Set the Speed to transmit IR Codes at.
@@ -322,7 +312,6 @@
}
[DllImport("MceIr.dll")]
- [return: MarshalAs(UnmanagedType.Bool)]
static extern bool MceIrSetBlasterType(int type);
/// <summary>
/// Set the Type of MCE unit.
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -36,6 +36,7 @@
int _repeatDelay;
int _heldDelay;
+ int _learnTimeout;
#endregion Variables
@@ -74,12 +75,14 @@
config.BlastType = _blasterType;
config.RepeatDelay = _repeatDelay;
config.HeldDelay = _heldDelay;
+ config.LearnTimeout = _learnTimeout;
if (config.ShowDialog() == DialogResult.OK)
{
_blasterType = config.BlastType;
_repeatDelay = config.RepeatDelay;
_heldDelay = config.HeldDelay;
+ _learnTimeout = config.LearnTimeout;
SaveSettings();
}
@@ -157,19 +160,16 @@
DateTime start = DateTime.Now;
- // TODO: Implement proper timeout ...
- int timeout = 8000;
+ bool result = MceIrApi.RecordToFile(fileStream.SafeFileHandle, _learnTimeout);
- bool result = MceIrApi.RecordToFile(fileStream.SafeFileHandle, timeout);
-
fileStream.Close();
TimeSpan timeTaken = start.Subtract(DateTime.Now);
- if (timeTaken.Milliseconds >= timeout)
+ if (result)
+ return LearnStatus.Success;
+ else if (timeTaken.Milliseconds >= _learnTimeout)
return LearnStatus.Timeout;
- else if (result)
- return LearnStatus.Success;
else
return LearnStatus.Failure;
}
@@ -215,6 +215,7 @@
_blasterType = (MceIrApi.BlasterType)Enum.Parse(typeof(MceIrApi.BlasterType), doc.DocumentElement.Attributes["BlastType"].Value);
_repeatDelay = int.Parse(doc.DocumentElement.Attributes["RepeatDelay"].Value);
_heldDelay = int.Parse(doc.DocumentElement.Attributes["HeldDelay"].Value);
+ _learnTimeout = int.Parse(doc.DocumentElement.Attributes["LearnTimeout"].Value);
}
catch (Exception ex)
{
@@ -223,6 +224,7 @@
_blasterType = MceIrApi.BlasterType.Microsoft;
_repeatDelay = 500;
_heldDelay = 250;
+ _learnTimeout = 8000;
}
}
void SaveSettings()
@@ -239,6 +241,7 @@
writer.WriteAttributeString("BlastType", Enum.GetName(typeof(MceIrApi.BlasterType), _blasterType));
writer.WriteAttributeString("RepeatDelay", _repeatDelay.ToString());
writer.WriteAttributeString("HeldDelay", _heldDelay.ToString());
+ writer.WriteAttributeString("LearnTimeout", _learnTimeout.ToString());
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -40,10 +40,15 @@
this.comboBoxBlasterType = new System.Windows.Forms.ComboBox();
this.labelBlasterType = new System.Windows.Forms.Label();
this.groupBoxBlaster = new System.Windows.Forms.GroupBox();
+ this.groupBoxLearnTimeout = new System.Windows.Forms.GroupBox();
+ this.labelLearnIRTimeout = new System.Windows.Forms.Label();
+ this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).BeginInit();
this.groupBoxTimes.SuspendLayout();
this.groupBoxBlaster.SuspendLayout();
+ this.groupBoxLearnTimeout.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).BeginInit();
this.SuspendLayout();
//
// labelButtonRepeatDelay
@@ -127,7 +132,7 @@
//
// buttonOK
//
- this.buttonOK.Location = new System.Drawing.Point(96, 168);
+ this.buttonOK.Location = new System.Drawing.Point(96, 232);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
this.buttonOK.TabIndex = 2;
@@ -138,7 +143,7 @@
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(168, 168);
+ this.buttonCancel.Location = new System.Drawing.Point(168, 232);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
this.buttonCancel.TabIndex = 3;
@@ -189,14 +194,65 @@
this.groupBoxBlaster.TabStop = false;
this.groupBoxBlaster.Text = "Blaster setup";
//
+ // groupBoxLearnTimeout
+ //
+ this.groupBoxLearnTimeout.Controls.Add(this.labelLearnIRTimeout);
+ this.groupBoxLearnTimeout.Controls.Add(this.numericUpDownLearnTimeout);
+ this.groupBoxLearnTimeout.Location = new System.Drawing.Point(8, 168);
+ this.groupBoxLearnTimeout.Name = "groupBoxLearnTimeout";
+ this.groupBoxLearnTimeout.Size = new System.Drawing.Size(224, 56);
+ this.groupBoxLearnTimeout.TabIndex = 5;
+ this.groupBoxLearnTimeout.TabStop = false;
+ this.groupBoxLearnTimeout.Text = "Learn IR timeout (in milliseconds)";
+ //
+ // labelLearnIRTimeout
+ //
+ this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 24);
+ this.labelLearnIRTimeout.Name = "labelLearnIRTimeout";
+ this.labelLearnIRTimeout.Size = new System.Drawing.Size(120, 20);
+ this.labelLearnIRTimeout.TabIndex = 2;
+ this.labelLearnIRTimeout.Text = "Learn IR timeout:";
+ this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownLearnTimeout
+ //
+ this.numericUpDownLearnTimeout.Increment = new decimal(new int[] {
+ 500,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(136, 24);
+ this.numericUpDownLearnTimeout.Maximum = new decimal(new int[] {
+ 60000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Minimum = new decimal(new int[] {
+ 2000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Name = "numericUpDownLearnTimeout";
+ this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownLearnTimeout.TabIndex = 3;
+ this.numericUpDownLearnTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownLearnTimeout.ThousandsSeparator = true;
+ this.toolTips.SetToolTip(this.numericUpDownLearnTimeout, "When teaching IR commands this is how long before the process times out");
+ this.numericUpDownLearnTimeout.Value = new decimal(new int[] {
+ 8000,
+ 0,
+ 0,
+ 0});
+ //
// Configure
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(240, 202);
+ this.ClientSize = new System.Drawing.Size(240, 263);
this.ControlBox = false;
+ this.Controls.Add(this.groupBoxLearnTimeout);
this.Controls.Add(this.groupBoxBlaster);
this.Controls.Add(this.groupBoxTimes);
this.Controls.Add(this.buttonCancel);
@@ -209,6 +265,8 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).EndInit();
this.groupBoxTimes.ResumeLayout(false);
this.groupBoxBlaster.ResumeLayout(false);
+ this.groupBoxLearnTimeout.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).EndInit();
this.ResumeLayout(false);
}
@@ -226,5 +284,8 @@
private System.Windows.Forms.ComboBox comboBoxBlasterType;
private System.Windows.Forms.Label labelBlasterType;
private System.Windows.Forms.GroupBox groupBoxBlaster;
+ private System.Windows.Forms.GroupBox groupBoxLearnTimeout;
+ private System.Windows.Forms.Label labelLearnIRTimeout;
+ private System.Windows.Forms.NumericUpDown numericUpDownLearnTimeout;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -31,6 +31,12 @@
set { numericUpDownButtonHeldDelay.Value = new Decimal(value); }
}
+ public int LearnTimeout
+ {
+ get { return Decimal.ToInt32(numericUpDownLearnTimeout.Value); }
+ set { numericUpDownLearnTimeout.Value = new Decimal(value); }
+ }
+
#endregion Properties
#region Constructor
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -318,6 +318,8 @@
static int _repeatDelay;
static int _heldDelay;
+ static int _learnTimeout;
+
static ArrayList _packetArray;
static Guid _blasterGuid;
static FileStream _blasterStream;
@@ -367,12 +369,14 @@
config.BlastType = _blasterType;
config.RepeatDelay = _repeatDelay;
config.HeldDelay = _heldDelay;
+ config.LearnTimeout = _learnTimeout;
if (config.ShowDialog() == DialogResult.OK)
{
_blasterType = config.BlastType;
_repeatDelay = config.RepeatDelay;
_heldDelay = config.HeldDelay;
+ _learnTimeout = config.LearnTimeout;
SaveSettings();
}
@@ -454,14 +458,11 @@
{
_irData = null;
- // TODO: Implement proper timeout
- int timeout = 8000;
-
BeginLearn(new RemoteEventHandler(LearnIRDone));
// Wait for the learning to finish ...
- while (_learning && Environment.TickCount < _learnStartTick + timeout)
- Thread.Sleep(1000);
+ while (_learning && Environment.TickCount < _learnStartTick + _learnTimeout)
+ Thread.Sleep(500);
if (_learning)
{
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.Designer.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.Designer.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -36,8 +36,11 @@
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
this.labelRepeatCount = new System.Windows.Forms.Label();
this.numericUpDownRepeatCount = new System.Windows.Forms.NumericUpDown();
+ this.labelLearnIRTimeout = new System.Windows.Forms.Label();
+ this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatCount)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).BeginInit();
this.SuspendLayout();
//
// labelButtonRepeatDelay
@@ -82,7 +85,7 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(104, 72);
+ this.buttonOK.Location = new System.Drawing.Point(104, 104);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
this.buttonOK.TabIndex = 4;
@@ -94,7 +97,7 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(176, 72);
+ this.buttonCancel.Location = new System.Drawing.Point(176, 104);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
this.buttonCancel.TabIndex = 5;
@@ -130,13 +133,54 @@
0,
0});
//
+ // labelLearnIRTimeout
+ //
+ this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 72);
+ this.labelLearnIRTimeout.Name = "labelLearnIRTimeout";
+ this.labelLearnIRTimeout.Size = new System.Drawing.Size(144, 20);
+ this.labelLearnIRTimeout.TabIndex = 6;
+ this.labelLearnIRTimeout.Text = "Learn IR timeout:";
+ this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownLearnTimeout
+ //
+ this.numericUpDownLearnTimeout.Increment = new decimal(new int[] {
+ 500,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(152, 72);
+ this.numericUpDownLearnTimeout.Maximum = new decimal(new int[] {
+ 60000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Minimum = new decimal(new int[] {
+ 2000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownLearnTimeout.Name = "numericUpDownLearnTimeout";
+ this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(88, 20);
+ this.numericUpDownLearnTimeout.TabIndex = 7;
+ this.numericUpDownLearnTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownLearnTimeout.ThousandsSeparator = true;
+ this.toolTips.SetToolTip(this.numericUpDownLearnTimeout, "When teaching IR commands this is how long before the process times out");
+ this.numericUpDownLearnTimeout.Value = new decimal(new int[] {
+ 10000,
+ 0,
+ 0,
+ 0});
+ //
// Configure
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(248, 105);
+ this.ClientSize = new System.Drawing.Size(248, 137);
+ this.Controls.Add(this.labelLearnIRTimeout);
+ this.Controls.Add(this.numericUpDownLearnTimeout);
this.Controls.Add(this.labelButtonRepeatDelay);
this.Controls.Add(this.numericUpDownRepeatCount);
this.Controls.Add(this.numericUpDownButtonRepeatDelay);
@@ -145,7 +189,7 @@
this.Controls.Add(this.buttonOK);
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(256, 132);
+ this.MinimumSize = new System.Drawing.Size(256, 164);
this.Name = "Configure";
this.ShowIcon = false;
this.ShowInTaskbar = false;
@@ -153,6 +197,7 @@
this.Text = "USB-UIRT Configuration";
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatCount)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).EndInit();
this.ResumeLayout(false);
}
@@ -166,5 +211,7 @@
private System.Windows.Forms.ToolTip toolTips;
private System.Windows.Forms.Label labelRepeatCount;
private System.Windows.Forms.NumericUpDown numericUpDownRepeatCount;
+ private System.Windows.Forms.Label labelLearnIRTimeout;
+ private System.Windows.Forms.NumericUpDown numericUpDownLearnTimeout;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -24,6 +24,11 @@
get { return Decimal.ToInt32(numericUpDownRepeatCount.Value); }
set { numericUpDownRepeatCount.Value = new Decimal(value); }
}
+ public int LearnTimeout
+ {
+ get { return Decimal.ToInt32(numericUpDownLearnTimeout.Value); }
+ set { numericUpDownLearnTimeout.Value = new Decimal(value); }
+ }
#endregion Properties
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.resx
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.resx 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.resx 2007-07-12 03:23:10 UTC (rev 686)
@@ -120,4 +120,7 @@
<metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
</root>
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-07-11 22:05:26 UTC (rev 685)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs 2007-07-12 03:23:10 UTC (rev 686)
@@ -145,6 +145,7 @@
int _repeatDelay;
int _blastRepeats;
+ int _learnTimeout;
string _lastCode = String.Empty;
DateTime _lastCodeTime = DateTime.Now;
@@ -227,11 +228,13 @@
config.RepeatDelay = _repeatDelay;
config.BlastRepeats = _blastRepeats;
+ config.LearnTimeout = _learnTimeout;
if (config.ShowDialog() == DialogResult.OK)
{
_repeatDelay = config.RepeatDelay;
_blastRepeats = config.BlastRepeats;
+ _learnTimeout = config.LearnTimeout;
SaveSettings();
}
@@ -308,9 +311,7 @@
_learnTimedOut = false;
Timer timer = new Timer();
-
- // TODO: Implement proper timeout ...
- timer.Interval = 8000;
+ timer.Interval = _learnTimeout;
timer.Tick += new EventHandler(timer_Tick);
result = UirtTransceiver.UUIRTLearnIR(
@@ -379,6 +380,7 @@
_repeatDelay = int.Parse(doc.DocumentElement.Attributes["RepeatDelay"].Value);
_blastRepeats = int.Parse(doc.DocumentElement.Attributes["BlastRepeats"].Value);
+ _learnTimeout = int.Parse(doc.DocumentElement.Attributes["LearnTimeout"].Value);
}
catch (Exception ex)
{
@@ -386,6 +388,7 @@
_repeatDelay = 500;
_blastRepeats = 4;
+ _learnTimeout = 10000;
}
}
void SaveSettings()
@@ -401,6 +404,7 @@
writer.WriteAttributeString("RepeatDelay", _repeatDelay.ToString());
writer.WriteAttributeString("BlastRepeats", _blastRepeats.ToString());
+ writer.WriteAttributeString("LearnTimeout", _learnTimeout.ToString());
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-13 02:56:31
|
Revision: 690
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=690&view=rev
Author: and-81
Date: 2007-07-12 19:56:29 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
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/ButtonMappingForm.resx
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.resx
trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickLeft.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickMiddle.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickRight.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveDown.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveLeft.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveRight.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveUp.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollDown.png
trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollUp.png
Added: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj 2007-07-13 02:56:29 UTC (rev 690)
@@ -0,0 +1,77 @@
+<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>{54E0E8FA-09C3-4755-B9CE-E7E5DDA3E932}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>IRBlast</RootNamespace>
+ <AssemblyName>IRBlast-NoWindow</AssemblyName>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <StartupObject>IRBlast.Program</StartupObject>
+ <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>
+ </DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Common\irssUtils\IrssUtils.csproj">
+ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project>
+ <Name>IrssUtils</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\AppModule.InterProcessComm\AppModule.InterProcessComm.csproj">
+ <Project>{E98F1F7E-40B6-44C8-AC66-EC867B141FA1}</Project>
+ <Name>AppModule.InterProcessComm</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\AppModule.NamedPipes\AppModule.NamedPipes.csproj">
+ <Project>{077B53BB-404A-4B2F-BA17-AAE98C5E9C66}</Project>
+ <Name>AppModule.NamedPipes</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\IPC\Named Pipes\Named Pipes.csproj">
+ <Project>{F4EA6055-7133-4F18-8971-E19ADEB482C1}</Project>
+ <Name>Named Pipes</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>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>copy "$(TargetFileName)" "\MediaPortal Development\Plugin Releases\IR Server Suite\IR Blast\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -0,0 +1,480 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.IO;
+using System.Text;
+using System.Threading;
+using System.Windows.Forms;
+using System.Xml;
+
+using NamedPipes;
+using IrssUtils;
+
+namespace IRBlast
+{
+
+ static class Program
+ {
+
+ #region Variables
+
+ static bool _registered = false;
+ static bool _keepAlive = true;
+ static int _echoID = -1;
+ static Thread _keepAliveThread;
+
+ static string _serverHost = null;
+ static string _localPipeName;
+
+ static string _blastPort = "None";
+ static string _blastSpeed = "None";
+
+ static bool _treatAsChannelNumber = false;
+
+ #endregion Variables
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+ IrssLog.Open(Common.FolderIrssLogs + "IR Blast (No Window).log");
+
+ IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
+
+ try
+ {
+
+ if (args.Length > 0) // Command Line Start ...
+ {
+ List<String> irCommands = new List<string>();
+
+ for (int index = 0; index < args.Length; index++)
+ {
+ switch (args[index].ToLowerInvariant())
+ {
+ case "-host":
+ _serverHost = args[++index];
+ continue;
+
+ case "-port":
+ _blastPort = args[++index];
+ continue;
+
+ case "-speed":
+ _blastSpeed = args[++index];
+ continue;
+
+ case "-channel":
+ _treatAsChannelNumber = true;
+ continue;
+
+ default:
+ irCommands.Add(args[index]);
+ continue;
+ }
+ }
+
+ if (String.IsNullOrEmpty(_serverHost) || irCommands.Count == 0)
+ {
+ Console.WriteLine("Malformed command line parameters ...");
+ Console.WriteLine();
+
+ ShowHelp();
+ }
+ else if (StartComms())
+ {
+ Thread.Sleep(250);
+
+ // Wait for registered ... Give up after 10 seconds ...
+ int attempt = 0;
+ while (!_registered)
+ {
+ if (++attempt >= 10)
+ break;
+ else
+ Thread.Sleep(1000);
+ }
+
+ if (_registered)
+ {
+ string fileName;
+ foreach (String command in irCommands)
+ {
+ if (_treatAsChannelNumber)
+ {
+ IrssLog.Info("Processing channel: {0}", command);
+ foreach (char digit in command)
+ {
+ if (digit == '~')
+ {
+ Thread.Sleep(500);
+ }
+ else
+ {
+ fileName = Common.FolderIRCommands + digit + Common.FileExtensionIR;
+ BlastIR(fileName, _blastPort, _blastSpeed);
+ }
+ }
+ }
+ else if (command.StartsWith("~"))
+ {
+ Thread.Sleep(command.Length * 500);
+ }
+ else
+ {
+ fileName = Common.FolderIRCommands + command;
+ BlastIR(fileName, _blastPort, _blastSpeed);
+ }
+ }
+
+ Thread.Sleep(500);
+ }
+ else
+ {
+ IrssLog.Warn("Failed to register with server host \"{0}\", blasting not sent", _serverHost);
+ }
+
+ }
+ }
+ else
+ {
+ ShowHelp();
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ StopComms();
+
+ IrssLog.Close();
+ }
+
+ static void ShowHelp()
+ {
+ IrssLog.Debug("Show Help");
+
+ MessageBox.Show(
+@"IR Blast (No Window) is a windowless version on IR Blast.
+Refer to IR Blast help for more information.",
+"IR Blast (No Window)", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+
+ static bool StartComms()
+ {
+ try
+ {
+ if (OpenLocalPipe())
+ {
+ _keepAliveThread = new Thread(new ThreadStart(KeepAliveThread));
+ _keepAliveThread.Start();
+ return true;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ return false;
+ }
+ static void StopComms()
+ {
+ _keepAlive = false;
+
+ try
+ {
+ if (_keepAliveThread != null && _keepAliveThread.IsAlive)
+ _keepAliveThread.Abort();
+ }
+ catch { }
+
+ try
+ {
+ if (_registered)
+ {
+ _registered = false;
+
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Unregister", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ }
+ catch { }
+
+ try
+ {
+ if (PipeAccess.ServerRunning)
+ PipeAccess.StopServer();
+ }
+ catch { }
+ }
+
+ static bool OpenLocalPipe()
+ {
+ try
+ {
+ int pipeNumber = 1;
+ bool retry = false;
+
+ do
+ {
+ string localPipeTest = String.Format(Common.LocalPipeFormat, pipeNumber);
+
+ if (PipeAccess.PipeExists(String.Format("\\\\.\\pipe\\{0}", localPipeTest)))
+ {
+ if (++pipeNumber <= Common.MaximumLocalClientCount)
+ retry = true;
+ else
+ throw new Exception(String.Format("Maximum local client limit ({0}) reached", Common.MaximumLocalClientCount));
+ }
+ else
+ {
+ if (!PipeAccess.StartServer(localPipeTest, new PipeMessageHandler(ReceivedMessage)))
+ throw new Exception(String.Format("Failed to start local pipe server \"{0}\"", localPipeTest));
+
+ _localPipeName = localPipeTest;
+ retry = false;
+ }
+ }
+ while (retry);
+
+ return true;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ return false;
+ }
+ }
+
+ static bool ConnectToServer()
+ {
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Register", null);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ return true;
+ }
+ catch (AppModule.NamedPipes.NamedPipeIOException)
+ {
+ return false;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ return false;
+ }
+ }
+
+ static void KeepAliveThread()
+ {
+ Random random = new Random((int)DateTime.Now.Ticks);
+ bool reconnect;
+ int attempt;
+
+ _registered = false;
+ _keepAlive = true;
+ while (_keepAlive)
+ {
+ reconnect = true;
+
+ #region Connect to server
+
+ IrssLog.Info("Connecting ({0}) ...", _serverHost);
+ attempt = 0;
+ while (_keepAlive && reconnect)
+ {
+ if (ConnectToServer())
+ {
+ reconnect = false;
+ }
+ else
+ {
+ int wait;
+
+ if (attempt <= 50)
+ attempt++;
+
+ if (attempt > 50)
+ wait = 30; // 30 seconds
+ else if (attempt > 20)
+ wait = 10; // 10 seconds
+ else if (attempt > 10)
+ wait = 5; // 5 seconds
+ else
+ wait = 1; // 1 second
+
+ for (int sleeps = 0; sleeps < wait && _keepAlive; sleeps++)
+ Thread.Sleep(1000);
+ }
+ }
+
+ #endregion Connect to server
+
+ #region Wait for registered
+
+ // Give up after 10 seconds ...
+ attempt = 0;
+ while (_keepAlive && !_registered && !reconnect)
+ {
+ if (++attempt >= 10)
+ reconnect = true;
+ else
+ Thread.Sleep(1000);
+ }
+
+ #endregion Wait for registered
+
+ #region Ping the server repeatedly
+
+ while (_keepAlive && _registered && !reconnect)
+ {
+ int pingID = random.Next();
+ long pingTime = DateTime.Now.Ticks;
+
+ try
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Ping", BitConverter.GetBytes(pingID));
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+ catch
+ {
+ // Failed to ping ... reconnect ...
+ IrssLog.Warn("Failed to ping, attempting to reconnect ...");
+ _registered = false;
+ reconnect = true;
+ break;
+ }
+
+ // Wait 10 seconds for a ping echo ...
+ bool receivedEcho = false;
+ while (_keepAlive && _registered && !reconnect &&
+ !receivedEcho && DateTime.Now.Ticks - pingTime < 10 * 1000 * 10000)
+ {
+ if (_echoID == pingID)
+ {
+ receivedEcho = true;
+ }
+ else
+ {
+ Thread.Sleep(1000);
+ }
+ }
+
+ if (receivedEcho) // Received ping echo ...
+ {
+ // Wait 60 seconds before re-pinging ...
+ for (int sleeps = 0; sleeps < 60 && _keepAlive && _registered; sleeps++)
+ Thread.Sleep(1000);
+ }
+ else // Didn't receive ping echo ...
+ {
+ IrssLog.Warn("No echo to ping, attempting to reconnect ...");
+
+ // Break out of pinging cycle ...
+ _registered = false;
+ reconnect = true;
+ }
+ }
+
+ #endregion Ping the server repeatedly
+
+ }
+
+ }
+
+ static void ReceivedMessage(string message)
+ {
+ PipeMessage received = PipeMessage.FromString(message);
+
+ IrssLog.Debug("Received Message \"{0}\"", received.Name);
+
+ try
+ {
+ switch (received.Name)
+ {
+ case "Remote Button":
+ break;
+
+ case "Blast Success":
+ IrssLog.Info("Blast Success");
+ break;
+
+ case "Blast Failure":
+ IrssLog.Warn("Blast Failed!");
+ break;
+
+ case "Register Success":
+ {
+ IrssLog.Info("Registered to IR Server");
+ _registered = true;
+ //_transceiverInfo = TransceiverInfo.FromBytes(received.Data);
+ break;
+ }
+
+ case "Register Failure":
+ {
+ IrssLog.Warn("IR Server refused to register");
+ _registered = false;
+ break;
+ }
+
+ case "Server Shutdown":
+ {
+ IrssLog.Warn("IR Server Shutdown - Blasting disabled until IR Server returns");
+ _registered = false;
+ break;
+ }
+
+ case "Echo":
+ {
+ _echoID = BitConverter.ToInt32(received.Data, 0);
+ break;
+ }
+
+ case "Error":
+ {
+ IrssLog.Warn(Encoding.ASCII.GetString(received.Data));
+ break;
+ }
+
+ default:
+ {
+ IrssLog.Warn("Unknown message received from server: " + received.Name);
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ static void BlastIR(string fileName, string port, string speed)
+ {
+ FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
+
+ byte[] outData = new byte[8 + port.Length + speed.Length + file.Length];
+
+ BitConverter.GetBytes(port.Length).CopyTo(outData, 0);
+ Encoding.ASCII.GetBytes(port).CopyTo(outData, 4);
+ BitConverter.GetBytes(speed.Length).CopyTo(outData, 4 + port.Length);
+ Encoding.ASCII.GetBytes(speed).CopyTo(outData, 8 + port.Length);
+
+ file.Read(outData, 8 + port.Length + speed.Length, (int)file.Length);
+ file.Close();
+
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Blast", outData);
+ PipeAccess.SendMessage(Common.ServerPipeName, _serverHost, message.ToString());
+ }
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -0,0 +1,39 @@
+using System;
+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("IR Blast (No Window)")]
+[assembly: AssemblyDescription("Command line application for blasting IR commands to IR Server")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("and-81")]
+[assembly: AssemblyProduct("IRBlastNoWindow")]
+[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)]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.3.2")]
+[assembly: AssemblyFileVersion("1.0.3.2")]
+
+[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ButtonMappingForm));
this.groupBoxButton = new System.Windows.Forms.GroupBox();
this.labelKeyCode = new System.Windows.Forms.Label();
@@ -97,9 +98,25 @@
this.buttonKeyHelp = new System.Windows.Forms.Button();
this.labelKeystrokes = new System.Windows.Forms.Label();
this.textBoxKeys = new System.Windows.Forms.TextBox();
+ this.tabPageMouse = new System.Windows.Forms.TabPage();
+ this.groupBoxMouseScroll = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseScrollDown = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseScrollUp = new System.Windows.Forms.CheckBox();
+ this.groupBoxMouseClick = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseClickRight = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseClickMiddle = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseClickLeft = new System.Windows.Forms.CheckBox();
+ this.groupBoxMouseMove = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseMoveLeft = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveDown = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveRight = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveUp = new System.Windows.Forms.CheckBox();
+ this.labelMouseMove = new System.Windows.Forms.Label();
+ this.numericUpDownMouseMove = new System.Windows.Forms.NumericUpDown();
this.buttonTest = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
+ this.toolTips = new System.Windows.Forms.ToolTip(this.components);
this.groupBoxButton.SuspendLayout();
this.groupBoxSet.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -117,6 +134,11 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit();
this.groupBoxMessageTarget.SuspendLayout();
this.tabPageKeystrokes.SuspendLayout();
+ this.tabPageMouse.SuspendLayout();
+ this.groupBoxMouseScroll.SuspendLayout();
+ this.groupBoxMouseClick.SuspendLayout();
+ this.groupBoxMouseMove.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).BeginInit();
this.SuspendLayout();
//
// groupBoxButton
@@ -210,6 +232,7 @@
this.buttonSet.Size = new System.Drawing.Size(48, 20);
this.buttonSet.TabIndex = 1;
this.buttonSet.Text = "Set";
+ this.toolTips.SetToolTip(this.buttonSet, "Click here to set the command");
this.buttonSet.UseVisualStyleBackColor = true;
this.buttonSet.Click += new System.EventHandler(this.buttonSet_Click);
//
@@ -224,6 +247,7 @@
this.tabControl.Controls.Add(this.tabPageSerial);
this.tabControl.Controls.Add(this.tabPageMessage);
this.tabControl.Controls.Add(this.tabPageKeystrokes);
+ this.tabControl.Controls.Add(this.tabPageMouse);
this.tabControl.Location = new System.Drawing.Point(8, 24);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
@@ -903,6 +927,206 @@
this.textBoxKeys.Size = new System.Drawing.Size(416, 144);
this.textBoxKeys.TabIndex = 1;
//
+ // tabPageMouse
+ //
+ this.tabPageMouse.Controls.Add(this.groupBoxMouseScroll);
+ this.tabPageMouse.Controls.Add(this.groupBoxMouseClick);
+ this.tabPageMouse.Controls.Add(this.groupBoxMouseMove);
+ this.tabPageMouse.Location = new System.Drawing.Point(4, 22);
+ this.tabPageMouse.Name = "tabPageMouse";
+ this.tabPageMouse.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageMouse.Size = new System.Drawing.Size(432, 206);
+ this.tabPageMouse.TabIndex = 6;
+ this.tabPageMouse.Text = "Mouse";
+ this.tabPageMouse.UseVisualStyleBackColor = true;
+ //
+ // groupBoxMouseScroll
+ //
+ this.groupBoxMouseScroll.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseScroll.Controls.Add(this.checkBoxMouseScrollDown);
+ this.groupBoxMouseScroll.Controls.Add(this.checkBoxMouseScrollUp);
+ this.groupBoxMouseScroll.Location = new System.Drawing.Point(296, 16);
+ this.groupBoxMouseScroll.Name = "groupBoxMouseScroll";
+ this.groupBoxMouseScroll.Size = new System.Drawing.Size(128, 176);
+ this.groupBoxMouseScroll.TabIndex = 2;
+ this.groupBoxMouseScroll.TabStop = false;
+ this.groupBoxMouseScroll.Text = "Scroll";
+ //
+ // checkBoxMouseScrollDown
+ //
+ this.checkBoxMouseScrollDown.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseScrollDown.Image = global::Translator.Properties.Resources.ScrollDown;
+ this.checkBoxMouseScrollDown.Location = new System.Drawing.Point(48, 96);
+ this.checkBoxMouseScrollDown.Name = "checkBoxMouseScrollDown";
+ this.checkBoxMouseScrollDown.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseScrollDown.TabIndex = 1;
+ this.toolTips.SetToolTip(this.checkBoxMouseScrollDown, "Scroll the mouse wheel down");
+ this.checkBoxMouseScrollDown.UseVisualStyleBackColor = true;
+ this.checkBoxMouseScrollDown.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseScrollUp
+ //
+ this.checkBoxMouseScrollUp.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseScrollUp.Image = global::Translator.Properties.Resources.ScrollUp;
+ this.checkBoxMouseScrollUp.Location = new System.Drawing.Point(48, 40);
+ this.checkBoxMouseScrollUp.Name = "checkBoxMouseScrollUp";
+ this.checkBoxMouseScrollUp.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseScrollUp.TabIndex = 0;
+ this.toolTips.SetToolTip(this.checkBoxMouseScrollUp, "Scroll the mouse wheel up");
+ this.checkBoxMouseScrollUp.UseVisualStyleBackColor = true;
+ this.checkBoxMouseScrollUp.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // groupBoxMouseClick
+ //
+ this.groupBoxMouseClick.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickRight);
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickMiddle);
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickLeft);
+ this.groupBoxMouseClick.Location = new System.Drawing.Point(160, 16);
+ this.groupBoxMouseClick.Name = "groupBoxMouseClick";
+ this.groupBoxMouseClick.Size = new System.Drawing.Size(128, 176);
+ this.groupBoxMouseClick.TabIndex = 1;
+ this.groupBoxMouseClick.TabStop = false;
+ this.groupBoxMouseClick.Text = "Click";
+ //
+ // checkBoxMouseClickRight
+ //
+ this.checkBoxMouseClickRight.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickRight.Image = global::Translator.Properties.Resources.ClickRight;
+ this.checkBoxMouseClickRight.Location = new System.Drawing.Point(88, 64);
+ this.checkBoxMouseClickRight.Name = "checkBoxMouseClickRight";
+ this.checkBoxMouseClickRight.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickRight.TabIndex = 2;
+ this.toolTips.SetToolTip(this.checkBoxMouseClickRight, "Click the right mouse button");
+ this.checkBoxMouseClickRight.UseVisualStyleBackColor = true;
+ this.checkBoxMouseClickRight.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseClickMiddle
+ //
+ this.checkBoxMouseClickMiddle.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickMiddle.Image = global::Translator.Properties.Resources.ClickMiddle;
+ this.checkBoxMouseClickMiddle.Location = new System.Drawing.Point(48, 64);
+ this.checkBoxMouseClickMiddle.Name = "checkBoxMouseClickMiddle";
+ this.checkBoxMouseClickMiddle.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickMiddle.TabIndex = 1;
+ this.toolTips.SetToolTip(this.checkBoxMouseClickMiddle, "Click the middle mouse button");
+ this.checkBoxMouseClickMiddle.UseVisualStyleBackColor = true;
+ this.checkBoxMouseClickMiddle.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseClickLeft
+ //
+ this.checkBoxMouseClickLeft.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickLeft.Image = global::Translator.Properties.Resources.ClickLeft;
+ this.checkBoxMouseClickLeft.Location = new System.Drawing.Point(8, 64);
+ this.checkBoxMouseClickLeft.Name = "checkBoxMouseClickLeft";
+ this.checkBoxMouseClickLeft.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickLeft.TabIndex = 0;
+ this.toolTips.SetToolTip(this.checkBoxMouseClickLeft, "Click the left mouse button");
+ this.checkBoxMouseClickLeft.UseVisualStyleBackColor = true;
+ this.checkBoxMouseClickLeft.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // groupBoxMouseMove
+ //
+ this.groupBoxMouseMove.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveLeft);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveDown);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveRight);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveUp);
+ this.groupBoxMouseMove.Controls.Add(this.labelMouseMove);
+ this.groupBoxMouseMove.Controls.Add(this.numericUpDownMouseMove);
+ this.groupBoxMouseMove.Location = new System.Drawing.Point(8, 16);
+ this.groupBoxMouseMove.Name = "groupBoxMouseMove";
+ this.groupBoxMouseMove.Size = new System.Drawing.Size(144, 176);
+ this.groupBoxMouseMove.TabIndex = 0;
+ this.groupBoxMouseMove.TabStop = false;
+ this.groupBoxMouseMove.Text = "Move";
+ //
+ // checkBoxMouseMoveLeft
+ //
+ this.checkBoxMouseMoveLeft.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveLeft.Image = global::Translator.Properties.Resources.MoveLeft;
+ this.checkBoxMouseMoveLeft.Location = new System.Drawing.Point(24, 64);
+ this.checkBoxMouseMoveLeft.Name = "checkBoxMouseMoveLeft";
+ this.checkBoxMouseMoveLeft.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveLeft.TabIndex = 1;
+ this.toolTips.SetToolTip(this.checkBoxMouseMoveLeft, "Move the mouse position left on screen");
+ this.checkBoxMouseMoveLeft.UseVisualStyleBackColor = true;
+ this.checkBoxMouseMoveLeft.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseMoveDown
+ //
+ this.checkBoxMouseMoveDown.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveDown.Image = global::Translator.Properties.Resources.MoveDown;
+ this.checkBoxMouseMoveDown.Location = new System.Drawing.Point(56, 96);
+ this.checkBoxMouseMoveDown.Name = "checkBoxMouseMoveDown";
+ this.checkBoxMouseMoveDown.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveDown.TabIndex = 3;
+ this.toolTips.SetToolTip(this.checkBoxMouseMoveDown, "Move the mousse position down the screen");
+ this.checkBoxMouseMoveDown.UseVisualStyleBackColor = true;
+ this.checkBoxMouseMoveDown.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseMoveRight
+ //
+ this.checkBoxMouseMoveRight.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveRight.Image = global::Translator.Properties.Resources.MoveRight;
+ this.checkBoxMouseMoveRight.Location = new System.Drawing.Point(88, 64);
+ this.checkBoxMouseMoveRight.Name = "checkBoxMouseMoveRight";
+ this.checkBoxMouseMoveRight.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveRight.TabIndex = 2;
+ this.toolTips.SetToolTip(this.checkBoxMouseMoveRight, "Move the mouse position right on screen");
+ this.checkBoxMouseMoveRight.UseVisualStyleBackColor = true;
+ this.checkBoxMouseMoveRight.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // checkBoxMouseMoveUp
+ //
+ this.checkBoxMouseMoveUp.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveUp.Image = global::Translator.Properties.Resources.MoveUp;
+ this.checkBoxMouseMoveUp.Location = new System.Drawing.Point(56, 32);
+ this.checkBoxMouseMoveUp.Name = "checkBoxMouseMoveUp";
+ this.checkBoxMouseMoveUp.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveUp.TabIndex = 0;
+ this.toolTips.SetToolTip(this.checkBoxMouseMoveUp, "Move the mouse position up the screen");
+ this.checkBoxMouseMoveUp.UseVisualStyleBackColor = true;
+ this.checkBoxMouseMoveUp.CheckedChanged += new System.EventHandler(this.checkBoxMouse_CheckedChanged);
+ //
+ // labelMouseMove
+ //
+ this.labelMouseMove.Location = new System.Drawing.Point(8, 144);
+ this.labelMouseMove.Name = "labelMouseMove";
+ this.labelMouseMove.Size = new System.Drawing.Size(72, 20);
+ this.labelMouseMove.TabIndex = 4;
+ this.labelMouseMove.Text = "Distance:";
+ this.labelMouseMove.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownMouseMove
+ //
+ this.numericUpDownMouseMove.Increment = new decimal(new int[] {
+ 5,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Location = new System.Drawing.Point(80, 144);
+ this.numericUpDownMouseMove.Maximum = new decimal(new int[] {
+ 5000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Minimum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Name = "numericUpDownMouseMove";
+ this.numericUpDownMouseMove.Size = new System.Drawing.Size(56, 20);
+ this.numericUpDownMouseMove.TabIndex = 5;
+ this.numericUpDownMouseMove.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.toolTips.SetToolTip(this.numericUpDownMouseMove, "The distance (in pixels) to move the mouse");
+ this.numericUpDownMouseMove.Value = new decimal(new int[] {
+ 16,
+ 0,
+ 0,
+ 0});
+ //
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -911,6 +1135,7 @@
this.buttonTest.Size = new System.Drawing.Size(48, 20);
this.buttonTest.TabIndex = 3;
this.buttonTest.Text = "Test";
+ this.toolTips.SetToolTip(this.buttonTest, "Click here to test the currently set command");
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
//
@@ -979,6 +1204,11 @@
this.groupBoxMessageTarget.PerformLayout();
this.tabPageKeystrokes.ResumeLayout(false);
this.tabPageKeystrokes.PerformLayout();
+ this.tabPageMouse.ResumeLayout(false);
+ this.groupBoxMouseScroll.ResumeLayout(false);
+ this.groupBoxMouseClick.ResumeLayout(false);
+ this.groupBoxMouseMove.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).EndInit();
this.ResumeLayout(false);
}
@@ -1056,6 +1286,22 @@
private System.Windows.Forms.Button buttonFindMsgTarget;
private System.Windows.Forms.GroupBox groupBoxMessageTarget;
private System.Windows.Forms.GroupBox groupBoxMessageDetails;
+ private System.Windows.Forms.TabPage tabPageMouse;
+ private System.Windows.Forms.GroupBox groupBoxMouseMove;
+ private System.Windows.Forms.Label labelMouseMove;
+ private System.Windows.Forms.NumericUpDown numericUpDownMouseMove;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveUp;
+ private System.Windows.Forms.GroupBox groupBoxMouseScroll;
+ private System.Windows.Forms.CheckBox checkBoxMouseScrollDown;
+ private System.Windows.Forms.CheckBox checkBoxMouseScrollUp;
+ private System.Windows.Forms.GroupBox groupBoxMouseClick;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickRight;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickMiddle;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickLeft;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveLeft;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveDown;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveRight;
+ private System.Windows.Forms.ToolTip toolTips;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -209,6 +209,29 @@
textBoxKeys.Text = suffix;
break;
}
+
+ case Common.CmdPrefixMouse:
+ {
+ tabControl.SelectTab(tabPageMouse);
+ switch (suffix)
+ {
+ case Common.MouseClickLeft: checkBoxMouseClickLeft.Checked = true; break;
+ case Common.MouseClickMiddle: checkBoxMouseClickMiddle.Checked = true; break;
+ case Common.MouseClickRight: checkBoxMouseClickRight.Checked = true; break;
+ case Common.MouseScrollDown: checkBoxMouseScrollDown.Checked = true; break;
+ case Common.MouseScrollUp: checkBoxMouseScrollUp.Checked = true; break;
+
+ default:
+ if (suffix.StartsWith(Common.MouseMoveDown)) checkBoxMouseMoveDown.Checked = true;
+ else if (suffix.StartsWith(Common.MouseMoveLeft)) checkBoxMouseMoveLeft.Checked = true;
+ else if (suffix.StartsWith(Common.MouseMoveRight)) checkBoxMouseMoveRight.Checked = true;
+ else if (suffix.StartsWith(Common.MouseMoveUp)) checkBoxMouseMoveUp.Checked = true;
+
+ numericUpDownMouseMove.Value = Decimal.Parse(suffix.Substring(suffix.IndexOf(" ")));
+ break;
+ }
+ break;
+ }
}
}
@@ -335,6 +358,31 @@
textBoxCommand.Text = _command = Common.CmdPrefixKeys + textBoxKeys.Text;
break;
}
+
+ case "tabPageMouse":
+ {
+ StringBuilder newCommand = new StringBuilder();
+ newCommand.Append(Common.CmdPrefixMouse);
+
+ if (checkBoxMouseClickLeft.Checked) newCommand.Append(Common.MouseClickLeft);
+ else if (checkBoxMouseClickRight.Checked) newCommand.Append(Common.MouseClickRight);
+ else if (checkBoxMouseClickMiddle.Checked) newCommand.Append(Common.MouseClickMiddle);
+ else if (checkBoxMouseScrollUp.Checked) newCommand.Append(Common.MouseScrollUp);
+ else if (checkBoxMouseScrollDown.Checked) newCommand.Append(Common.MouseScrollDown);
+ else
+ {
+ if (checkBoxMouseMoveUp.Checked) newCommand.Append(Common.MouseMoveUp);
+ else if (checkBoxMouseMoveDown.Checked) newCommand.Append(Common.MouseMoveDown);
+ else if (checkBoxMouseMoveLeft.Checked) newCommand.Append(Common.MouseMoveLeft);
+ else if (checkBoxMouseMoveRight.Checked) newCommand.Append(Common.MouseMoveRight);
+ else break;
+
+ newCommand.Append(numericUpDownMouseMove.Value.ToString());
+ }
+
+ textBoxCommand.Text = _command = newCommand.ToString();
+ break;
+ }
}
}
@@ -459,6 +507,24 @@
#endregion Controls
+ private void checkBoxMouse_CheckedChanged(object sender, EventArgs e)
+ {
+ CheckBox origin = (CheckBox)sender;
+
+ if (!origin.Checked)
+ return;
+
+ if (origin != checkBoxMouseClickLeft) checkBoxMouseClickLeft.Checked = false;
+ if (origin != checkBoxMouseClickRight) checkBoxMouseClickRight.Checked = false;
+ if (origin != checkBoxMouseClickMiddle) checkBoxMouseClickMiddle.Checked = false;
+ if (origin != checkBoxMouseMoveUp) checkBoxMouseMoveUp.Checked = false;
+ if (origin != checkBoxMouseMoveDown) checkBoxMouseMoveDown.Checked = false;
+ if (origin != checkBoxMouseMoveLeft) checkBoxMouseMoveLeft.Checked = false;
+ if (origin != checkBoxMouseMoveRight) checkBoxMouseMoveRight.Checked = false;
+ if (origin != checkBoxMouseScrollUp) checkBoxMouseScrollUp.Checked = false;
+ if (origin != checkBoxMouseScrollDown) checkBoxMouseScrollDown.Checked = false;
+ }
+
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx 2007-07-13 02:56:29 UTC (rev 690)
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickLeft.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickMiddle.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickMiddle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickRight.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ClickRight.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveDown.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveDown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveLeft.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveRight.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveRight.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveUp.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/MoveUp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollDown.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollDown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollUp.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Translator/Graphics/ScrollUp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -990,6 +990,11 @@
string keyCommand = command.Substring(Common.CmdPrefixKeys.Length);
Common.ProcessKeyCommand(keyCommand);
}
+ else if (command.StartsWith(Common.CmdPrefixMouse)) // Mouse Command
+ {
+ string mouseCommand = command.Substring(Common.CmdPrefixMouse.Length);
+ Common.ProcessMouseCommand(mouseCommand);
+ }
else
{
throw new ArgumentException(String.Format("Cannot process unrecognized command \"{0}\"", command), "command");
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.Designer.cs 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.Designer.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -60,6 +60,27 @@
}
}
+ internal static System.Drawing.Bitmap ClickLeft {
+ get {
+ object obj = ResourceManager.GetObject("ClickLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ClickMiddle {
+ get {
+ object obj = ResourceManager.GetObject("ClickMiddle", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ClickRight {
+ get {
+ object obj = ResourceManager.GetObject("ClickRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
internal static System.Drawing.Icon Icon16 {
get {
object obj = ResourceManager.GetObject("Icon16", resourceCulture);
@@ -73,5 +94,47 @@
return ((System.Drawing.Icon)(obj));
}
}
+
+ internal static System.Drawing.Bitmap MoveDown {
+ get {
+ object obj = ResourceManager.GetObject("MoveDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveLeft {
+ get {
+ object obj = ResourceManager.GetObject("MoveLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveRight {
+ get {
+ object obj = ResourceManager.GetObject("MoveRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveUp {
+ get {
+ object obj = ResourceManager.GetObject("MoveUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ScrollDown {
+ get {
+ object obj = ResourceManager.GetObject("ScrollDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ScrollUp {
+ get {
+ object obj = ResourceManager.GetObject("ScrollUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.resx 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.resx 2007-07-13 02:56:29 UTC (rev 690)
@@ -118,10 +118,37 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="ClickLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\clickleft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="ClickMiddle" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\clickmiddle.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="ClickRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\clickright.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
<data name="Icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icon16.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Icon16Connecting" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Icon16Connecting.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
+ <data name="MoveDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\movedown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="MoveLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\moveleft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="MoveRight" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\moveright.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="MoveUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\moveup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="ScrollDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\scrolldown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="ScrollUp" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\graphics\scrollup.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
</root>
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-07-13 02:56:29 UTC (rev 690)
@@ -165,6 +165,17 @@
<ItemGroup>
<None Include="Icon16Connecting.ico" />
</ItemGroup>
+ <ItemGroup>
+ <Content Include="Graphics\ClickLeft.png" />
+ <Content Include="Graphics\ClickMiddle.png" />
+ <Content Include="Graphics\ClickRight.png" />
+ <Content Include="Graphics\MoveDown.png" />
+ <Content Include="Graphics\MoveLeft.png" />
+ <Content Include="Graphics\MoveRight.png" />
+ <Content Include="Graphics\MoveUp.png" />
+ <Content Include="Graphics\ScrollDown.png" />
+ <Content Include="Graphics\ScrollUp.png" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-07-12 18:58:38 UTC (rev 689)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-07-13 02:56:29 UTC (rev 690)
@@ -114,6 +114,8 @@
public const string CmdPrefixReboot = "Reboot";
public const string CmdPrefixShutdown = "Shutdown";
+ public const string CmdPrefixMouse = "Mouse: ";
+
#endregion Command Prefixes
#region XML Tags
@@ -138,6 +140,8 @@
public const string XmlTagReboot = "REBOOT";
public const string XmlTagShutdown = "SHUTDOWN";
+ public const string XmlTagMouse = "MOUSE";
+
#endregion XML Tags
#region User Interface Text
@@ -161,8 +165,26 @@
public const string UITextReboot = "Reboot";
public const string UITextShutdown = "Shutdown";
+ public const string UITextMouse = "Mouse Command";
+
#endregion User Interface Text
+ #region Mouse Commands
+
+ public const string MouseMoveUp = "Move_Up ";
+ public const string MouseMoveDown = "Move_Down ";
+ public const string MouseMoveLeft = "Move_Left ";
+ public const string MouseMoveRight = "Move_Right ";
+
+ public const string MouseClickLeft = "Click_Left";
+ public const string MouseClickRight = "Click_Right";
+ public const string MouseClickMiddle = "Click_Middle";
+
+ public const string MouseScrollUp = "Scroll_Up";
+ public const string MouseScrollDown = "Scroll_Down";
+
+ #endregion Mouse Commands
+
#endregion Strings
#endregion Constants
@@ -360,6 +382,52 @@
tcpClient.Close();
}
+ /// <summary>
+ /// Given a Mouse Command this method will move, click or scroll the mouse according to the command issued.
+ /// </summary>
+ /// <param name="command">The Mouse Command string</param>
+ public static void ProcessMouseCommand(string command)
+ {
+ switch (command)
+ {
+ case MouseClickLeft:
+ Mouse.Button(Mouse.MouseEvents.LeftDown);
+ Mouse.Button(Mouse.MouseEvents.LeftUp);
+ break;
+
+ case MouseClickMiddle:
+ Mouse.Button(Mouse.MouseEvents.MiddleDown);
+ Mouse.Button(Mouse.MouseEvents.MiddleUp);
+ break;
+
+ case MouseClickRight:
+ Mouse.Button(Mouse.MouseEvents.RightDown);
+ Mouse.Button(Mouse.MouseEvents.RightUp);
+ break;
+
+ case MouseScrollDown:
+ Mouse.Scroll(Mouse.ScrollDir.Down);
+ break;
+
+ case MouseScrollUp:
+ Mouse.Scroll(Mouse.ScrollDir.Up);
+ break;
+
+ default:
+ if (command.StartsWith(MouseMoveDown))
+ Mouse.Move(0, int.Parse(command.Substring(MouseMoveDown.Length)), false);
+ else if (command.StartsWith(MouseMoveLeft))
+ Mouse.Move(-int.Parse(command.Substring(MouseMoveLeft.Length)), 0, false);
+ else if (command.StartsWith(MouseMoveRight))
+ Mouse.Move(int.Parse(command.Substring(MouseMoveRight.Length)), 0, false);
+ else if (command.StartsWith(MouseMoveUp))
+ Mouse.Move(0, -int.Parse(command.Substring(MouseMoveUp.Length)), false);
+ else
+ throw new ApplicationException("Invalid Mouse Command");
+ break;
+ }
+ }
+
#endregion Command Execution
#region Misc
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-16 06:32:25
|
Revision: 693
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=693&view=rev
Author: and-81
Date: 2007-07-15 23:32:23 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
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/ButtonMappingForm.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
Added Paths:
-----------
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/Configure.resx
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/MCE Replacement Transceiver v2.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/MceIrApi.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/MceReplacementTransceiverV2.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/Properties/
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/Properties/AssemblyInfo.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-15 16:20:48 UTC (rev 692)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-16 06:32:23 UTC (rev 693)
@@ -98,6 +98,58 @@
this.buttonKeyHelp = new System.Windows.Forms.Button();
this.labelKeystrokes = new System.Windows.Forms.Label();
this.textBoxKeys = new System.Windows.Forms.TextBox();
+ this.contextMenuStripKeystrokes = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.selectNoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.specialKeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.arrowsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.upToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.downToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.leftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.rightToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.functionKeysToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f4ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f5ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f6ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f7ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f8ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f9ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f10ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f11ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f12ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f13ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f14ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f15ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.f16ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.keypadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.subtractToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.multiplyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.divideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
+ this.backspaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.breakToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.capsLockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.delToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.endToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.enterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.escapeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.homeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.insToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.numLockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pageDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.pageUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.scrollLockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tabToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabPageMouse = new System.Windows.Forms.TabPage();
this.groupBoxMouseScroll = new System.Windows.Forms.GroupBox();
this.checkBoxMouseScrollDown = new System.Windows.Forms.CheckBox();
@@ -117,6 +169,10 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.modifiersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.altToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.controlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.shiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBoxButton.SuspendLayout();
this.groupBoxSet.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -134,6 +190,7 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit();
this.groupBoxMessageTarget.SuspendLayout();
this.tabPageKeystrokes.SuspendLayout();
+ this.contextMenuStripKeystrokes.SuspendLayout();
this.tabPageMouse.SuspendLayout();
this.groupBoxMouseScroll.SuspendLayout();
this.groupBoxMouseClick.SuspendLayout();
@@ -186,6 +243,7 @@
this.textBoxKeyCode.TabIndex = 1;
this.textBoxKeyCode.TabStop = false;
this.textBoxKeyCode.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.toolTips.SetToolTip(this.textBoxKeyCode, "This button\'s unique IR code");
//
// textBoxButtonDesc
//
@@ -195,6 +253,7 @@
this.textBoxButtonDesc.Name = "textBoxButtonDesc";
this.textBoxButtonDesc.Size = new System.Drawing.Size(360, 20);
this.textBoxButtonDesc.TabIndex = 3;
+ this.toolTips.SetToolTip(this.textBoxButtonDesc, "Provide a description of this button here");
this.textBoxButtonDesc.TextChanged += new System.EventHandler(this.textBoxButtonDesc_TextChanged);
//
// groupBoxSet
@@ -297,6 +356,7 @@
this.buttonLearnIR.Size = new System.Drawing.Size(64, 24);
this.buttonLearnIR.TabIndex = 6;
this.buttonLearnIR.Text = "Learn";
+ this.toolTips.SetToolTip(this.buttonLearnIR, "Click here to add a new IR Command to the list");
this.buttonLearnIR.UseVisualStyleBackColor = true;
this.buttonLearnIR.Click += new System.EventHandler(this.buttonLearnIR_Click);
//
@@ -359,6 +419,7 @@
this.buttonNewMacro.Size = new System.Drawing.Size(64, 24);
this.buttonNewMacro.TabIndex = 2;
this.buttonNewMacro.Text = "New";
+ this.toolTips.SetToolTip(this.buttonNewMacro, "Click here to create a new Macro");
this.buttonNewMacro.UseVisualStyleBackColor = true;
this.buttonNewMacro.Click += new System.EventHandler(this.buttonNewMacro_Click);
//
@@ -479,6 +540,7 @@
this.buttonStartupFolder.Size = new System.Drawing.Size(24, 20);
this.buttonStartupFolder.TabIndex = 5;
this.buttonStartupFolder.Text = "...";
+ this.toolTips.SetToolTip(this.buttonStartupFolder, "Click here to locate the working folder for the application");
this.buttonStartupFolder.UseVisualStyleBackColor = true;
this.buttonStartupFolder.Click += new System.EventHandler(this.buttonStartupFolder_Click);
//
@@ -508,6 +570,7 @@
this.buttonLocate.Size = new System.Drawing.Size(24, 20);
this.buttonLocate.TabIndex = 2;
this.buttonLocate.Text = "...";
+ this.toolTips.SetToolTip(this.buttonLocate, "Click here to locate the application to run");
this.buttonLocate.UseVisualStyleBackColor = true;
this.buttonLocate.Click += new System.EventHandler(this.buttonLocate_Click);
//
@@ -682,6 +745,7 @@
this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20);
this.buttonParamQuestion.TabIndex = 2;
this.buttonParamQuestion.Text = "?";
+ this.toolTips.SetToolTip(this.buttonParamQuestion, "Click here for command parameters");
this.buttonParamQuestion.UseVisualStyleBackColor = true;
this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click);
//
@@ -844,6 +908,7 @@
this.buttonFindMsgTarget.Size = new System.Drawing.Size(24, 20);
this.buttonFindMsgTarget.TabIndex = 5;
this.buttonFindMsgTarget.Text = "...";
+ this.toolTips.SetToolTip(this.buttonFindMsgTarget, "Click here to locate the target for this Window Message");
this.buttonFindMsgTarget.UseVisualStyleBackColor = true;
this.buttonFindMsgTarget.Click += new System.EventHandler(this.buttonFindMsgTarget_Click);
//
@@ -901,6 +966,7 @@
this.buttonKeyHelp.Size = new System.Drawing.Size(64, 24);
this.buttonKeyHelp.TabIndex = 2;
this.buttonKeyHelp.Text = "Help";
+ this.toolTips.SetToolTip(this.buttonKeyHelp, "Click here for help on keystroke commands");
this.buttonKeyHelp.UseVisualStyleBackColor = true;
this.buttonKeyHelp.Click += new System.EventHandler(this.buttonKeyHelp_Click);
//
@@ -920,13 +986,424 @@
this.textBoxKeys.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxKeys.ContextMenuStrip = this.contextMenuStripKeystrokes;
this.textBoxKeys.Location = new System.Drawing.Point(8, 24);
this.textBoxKeys.Multiline = true;
this.textBoxKeys.Name = "textBoxKeys";
this.textBoxKeys.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+ this.textBoxKeys.ShortcutsEnabled = false;
this.textBoxKeys.Size = new System.Drawing.Size(416, 144);
this.textBoxKeys.TabIndex = 1;
//
+ // contextMenuStripKeystrokes
+ //
+ this.contextMenuStripKeystrokes.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.cutToolStripMenuItem,
+ this.copyToolStripMenuItem,
+ this.pasteToolStripMenuItem,
+ this.toolStripSeparator1,
+ this.selectAllToolStripMenuItem,
+ this.selectNoneToolStripMenuItem,
+ this.toolStripSeparator2,
+ this.specialKeyToolStripMenuItem});
+ this.contextMenuStripKeystrokes.Name = "contextMenuStripKeystrokes";
+ this.contextMenuStripKeystrokes.Size = new System.Drawing.Size(155, 170);
+ //
+ // cutToolStripMenuItem
+ //
+ this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
+ this.cutToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.cutToolStripMenuItem.Text = "Cut";
+ this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
+ //
+ // copyToolStripMenuItem
+ //
+ this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.copyToolStripMenuItem.Text = "Copy";
+ this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
+ //
+ // pasteToolStripMenuItem
+ //
+ this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
+ this.pasteToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.pasteToolStripMenuItem.Text = "Paste";
+ this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(151, 6);
+ //
+ // selectAllToolStripMenuItem
+ //
+ this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
+ this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.selectAllToolStripMenuItem.Text = "Select All";
+ this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
+ //
+ // selectNoneToolStripMenuItem
+ //
+ this.selectNoneToolStripMenuItem.Name = "selectNoneToolStripMenuItem";
+ this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.selectNoneToolStripMenuItem.Text = "Select None";
+ this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(151, 6);
+ //
+ // specialKeyToolStripMenuItem
+ //
+ this.specialKeyToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.arrowsToolStripMenuItem,
+ this.functionKeysToolStripMenuItem,
+ this.keypadToolStripMenuItem,
+ this.modifiersToolStripMenuItem,
+ this.toolStripSeparator3,
+ this.backspaceToolStripMenuItem,
+ this.breakToolStripMenuItem,
+ this.capsLockToolStripMenuItem,
+ this.delToolStripMenuItem,
+ this.endToolStripMenuItem,
+ this.enterToolStripMenuItem,
+ this.escapeToolStripMenuItem,
+ this.helpToolStripMenuItem,
+ this.homeToolStripMenuItem,
+ this.insToolStripMenuItem,
+ this.numLockToolStripMenuItem,
+ this.pageDownToolStripMenuItem,
+ this.pageUpToolStripMenuItem,
+ this.scrollLockToolStripMenuItem,
+ this.tabToolStripMenuItem});
+ this.specialKeyToolStripMenuItem.Name = "specialKeyToolStripMenuItem";
+ this.specialKeyToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.specialKeyToolStripMenuItem.Text = "Special Key ...";
+ //
+ // arrowsToolStripMenuItem
+ //
+ this.arrowsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.upToolStripMenuItem,
+ this.downToolStripMenuItem,
+ this.leftToolStripMenuItem,
+ this.rightToolStripMenuItem});
+ this.arrowsToolStripMenuItem.Name = "arrowsToolStripMenuItem";
+ this.arrowsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.arrowsToolStripMenuItem.Text = "Arrows";
+ //
+ // upToolStripMenuItem
+ //
+ this.upToolStripMenuItem.Name = "upToolStripMenuItem";
+ this.upToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.upToolStripMenuItem.Text = "Up";
+ this.upToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // downToolStripMenuItem
+ //
+ this.downToolStripMenuItem.Name = "downToolStripMenuItem";
+ this.downToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.downToolStripMenuItem.Text = "Down";
+ this.downToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // leftToolStripMenuItem
+ //
+ this.leftToolStripMenuItem.Name = "leftToolStripMenuItem";
+ this.leftToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.leftToolStripMenuItem.Text = "Left";
+ this.leftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // rightToolStripMenuItem
+ //
+ this.rightToolStripMenuItem.Name = "rightToolStripMenuItem";
+ this.rightToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.rightToolStripMenuItem.Text = "Right";
+ this.rightToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // functionKeysToolStripMenuItem
+ //
+ this.functionKeysToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.f1ToolStripMenuItem,
+ this.f2ToolStripMenuItem,
+ this.f3ToolStripMenuItem,
+ this.f4ToolStripMenuItem,
+ this.f5ToolStripMenuItem,
+ this.f6ToolStripMenuItem,
+ this.f7ToolStripMenuItem,
+ this.f8ToolStripMenuItem,
+ this.f9ToolStripMenuItem,
+ this.f10ToolStripMenuItem,
+ this.f11ToolStripMenuItem,
+ this.f12ToolStripMenuItem,
+ this.f13ToolStripMenuItem,
+ this.f14ToolStripMenuItem,
+ this.f15ToolStripMenuItem,
+ this.f16ToolStripMenuItem});
+ this.functionKeysToolStripMenuItem.Name = "functionKeysToolStripMenuItem";
+ this.functionKeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.functionKeysToolStripMenuItem.Text = "Function Keys";
+ //
+ // f1ToolStripMenuItem
+ //
+ this.f1ToolStripMenuItem.Name = "f1ToolStripMenuItem";
+ this.f1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f1ToolStripMenuItem.Text = "F1";
+ this.f1ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f2ToolStripMenuItem
+ //
+ this.f2ToolStripMenuItem.Name = "f2ToolStripMenuItem";
+ this.f2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f2ToolStripMenuItem.Text = "F2";
+ this.f2ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f3ToolStripMenuItem
+ //
+ this.f3ToolStripMenuItem.Name = "f3ToolStripMenuItem";
+ this.f3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f3ToolStripMenuItem.Text = "F3";
+ this.f3ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f4ToolStripMenuItem
+ //
+ this.f4ToolStripMenuItem.Name = "f4ToolStripMenuItem";
+ this.f4ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f4ToolStripMenuItem.Text = "F4";
+ this.f4ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f5ToolStripMenuItem
+ //
+ this.f5ToolStripMenuItem.Name = "f5ToolStripMenuItem";
+ this.f5ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f5ToolStripMenuItem.Text = "F5";
+ this.f5ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f6ToolStripMenuItem
+ //
+ this.f6ToolStripMenuItem.Name = "f6ToolStripMenuItem";
+ this.f6ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f6ToolStripMenuItem.Text = "F6";
+ this.f6ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f7ToolStripMenuItem
+ //
+ this.f7ToolStripMenuItem.Name = "f7ToolStripMenuItem";
+ this.f7ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f7ToolStripMenuItem.Text = "F7";
+ this.f7ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f8ToolStripMenuItem
+ //
+ this.f8ToolStripMenuItem.Name = "f8ToolStripMenuItem";
+ this.f8ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f8ToolStripMenuItem.Text = "F8";
+ this.f8ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f9ToolStripMenuItem
+ //
+ this.f9ToolStripMenuItem.Name = "f9ToolStripMenuItem";
+ this.f9ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f9ToolStripMenuItem.Text = "F9";
+ this.f9ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f10ToolStripMenuItem
+ //
+ this.f10ToolStripMenuItem.Name = "f10ToolStripMenuItem";
+ this.f10ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f10ToolStripMenuItem.Text = "F10";
+ this.f10ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f11ToolStripMenuItem
+ //
+ this.f11ToolStripMenuItem.Name = "f11ToolStripMenuItem";
+ this.f11ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f11ToolStripMenuItem.Text = "F11";
+ this.f11ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f12ToolStripMenuItem
+ //
+ this.f12ToolStripMenuItem.Name = "f12ToolStripMenuItem";
+ this.f12ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f12ToolStripMenuItem.Text = "F12";
+ this.f12ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f13ToolStripMenuItem
+ //
+ this.f13ToolStripMenuItem.Name = "f13ToolStripMenuItem";
+ this.f13ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f13ToolStripMenuItem.Text = "F13";
+ this.f13ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f14ToolStripMenuItem
+ //
+ this.f14ToolStripMenuItem.Name = "f14ToolStripMenuItem";
+ this.f14ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f14ToolStripMenuItem.Text = "F14";
+ this.f14ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f15ToolStripMenuItem
+ //
+ this.f15ToolStripMenuItem.Name = "f15ToolStripMenuItem";
+ this.f15ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f15ToolStripMenuItem.Text = "F15";
+ this.f15ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // f16ToolStripMenuItem
+ //
+ this.f16ToolStripMenuItem.Name = "f16ToolStripMenuItem";
+ this.f16ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f16ToolStripMenuItem.Text = "F16";
+ this.f16ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // keypadToolStripMenuItem
+ //
+ this.keypadToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.addToolStripMenuItem,
+ this.subtractToolStripMenuItem,
+ this.multiplyToolStripMenuItem,
+ this.divideToolStripMenuItem});
+ this.keypadToolStripMenuItem.Name = "keypadToolStripMenuItem";
+ this.keypadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.keypadToolStripMenuItem.Text = "Keypad";
+ //
+ // addToolStripMenuItem
+ //
+ this.addToolStripMenuItem.Name = "addToolStripMenuItem";
+ this.addToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.addToolStripMenuItem.Text = "Add";
+ this.addToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // subtractToolStripMenuItem
+ //
+ this.subtractToolStripMenuItem.Name = "subtractToolStripMenuItem";
+ this.subtractToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.subtractToolStripMenuItem.Text = "Subtract";
+ this.subtractToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // multiplyToolStripMenuItem
+ //
+ this.multiplyToolStripMenuItem.Name = "multiplyToolStripMenuItem";
+ this.multiplyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.multiplyToolStripMenuItem.Text = "Multiply";
+ this.multiplyToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // divideToolStripMenuItem
+ //
+ this.divideToolStripMenuItem.Name = "divideToolStripMenuItem";
+ this.divideToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.divideToolStripMenuItem.Text = "Divide";
+ this.divideToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // toolStripSeparator3
+ //
+ this.toolStripSeparator3.Name = "toolStripSeparator3";
+ this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
+ //
+ // backspaceToolStripMenuItem
+ //
+ this.backspaceToolStripMenuItem.Name = "backspaceToolStripMenuItem";
+ this.backspaceToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.backspaceToolStripMenuItem.Text = "Backspace";
+ this.backspaceToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // breakToolStripMenuItem
+ //
+ this.breakToolStripMenuItem.Name = "breakToolStripMenuItem";
+ this.breakToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.breakToolStripMenuItem.Text = "Break";
+ this.breakToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // capsLockToolStripMenuItem
+ //
+ this.capsLockToolStripMenuItem.Name = "capsLockToolStripMenuItem";
+ this.capsLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.capsLockToolStripMenuItem.Text = "Caps Lock";
+ this.capsLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // delToolStripMenuItem
+ //
+ this.delToolStripMenuItem.Name = "delToolStripMenuItem";
+ this.delToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.delToolStripMenuItem.Text = "Delete";
+ this.delToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // endToolStripMenuItem
+ //
+ this.endToolStripMenuItem.Name = "endToolStripMenuItem";
+ this.endToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.endToolStripMenuItem.Text = "End";
+ this.endToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // enterToolStripMenuItem
+ //
+ this.enterToolStripMenuItem.Name = "enterToolStripMenuItem";
+ this.enterToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.enterToolStripMenuItem.Text = "Enter";
+ this.enterToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // escapeToolStripMenuItem
+ //
+ this.escapeToolStripMenuItem.Name = "escapeToolStripMenuItem";
+ this.escapeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.escapeToolStripMenuItem.Text = "Escape";
+ this.escapeToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // helpToolStripMenuItem
+ //
+ this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
+ this.helpToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.helpToolStripMenuItem.Text = "Help";
+ this.helpToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // homeToolStripMenuItem
+ //
+ this.homeToolStripMenuItem.Name = "homeToolStripMenuItem";
+ this.homeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.homeToolStripMenuItem.Text = "Home";
+ this.homeToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // insToolStripMenuItem
+ //
+ this.insToolStripMenuItem.Name = "insToolStripMenuItem";
+ this.insToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.insToolStripMenuItem.Text = "Insert";
+ this.insToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // numLockToolStripMenuItem
+ //
+ this.numLockToolStripMenuItem.Name = "numLockToolStripMenuItem";
+ this.numLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.numLockToolStripMenuItem.Text = "Num Lock";
+ this.numLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // pageDownToolStripMenuItem
+ //
+ this.pageDownToolStripMenuItem.Name = "pageDownToolStripMenuItem";
+ this.pageDownToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.pageDownToolStripMenuItem.Text = "Page Down";
+ this.pageDownToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // pageUpToolStripMenuItem
+ //
+ this.pageUpToolStripMenuItem.Name = "pageUpToolStripMenuItem";
+ this.pageUpToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.pageUpToolStripMenuItem.Text = "Page Up";
+ this.pageUpToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // scrollLockToolStripMenuItem
+ //
+ this.scrollLockToolStripMenuItem.Name = "scrollLockToolStripMenuItem";
+ this.scrollLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.scrollLockToolStripMenuItem.Text = "Scroll Lock";
+ this.scrollLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // tabToolStripMenuItem
+ //
+ this.tabToolStripMenuItem.Name = "tabToolStripMenuItem";
+ this.tabToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.tabToolStripMenuItem.Text = "Tab";
+ this.tabToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
// tabPageMouse
//
this.tabPageMouse.Controls.Add(this.groupBoxMouseScroll);
@@ -1162,6 +1639,37 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
+ // modifiersToolStripMenuItem
+ //
+ this.modifiersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.altToolStripMenuItem,
+ this.controlToolStripMenuItem,
+ this.shiftToolStripMenuItem});
+ this.modifiersToolStripMenuItem.Name = "modifiersToolStripMenuItem";
+ this.modifiersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.modifiersToolStripMenuItem.Text = "Modifiers";
+ //
+ // altToolStripMenuItem
+ //
+ this.altToolStripMenuItem.Name = "altToolStripMenuItem";
+ this.altToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.altToolStripMenuItem.Text = "Alt";
+ this.altToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // controlToolStripMenuItem
+ //
+ this.controlToolStripMenuItem.Name = "controlToolStripMenuItem";
+ this.controlToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.controlToolStripMenuItem.Text = "Control";
+ this.controlToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // shiftToolStripMenuItem
+ //
+ this.shiftToolStripMenuItem.Name = "shiftToolStripMenuItem";
+ this.shiftToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.shiftToolStripMenuItem.Text = "Shift";
+ this.shiftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
// ButtonMappingForm
//
this.AcceptButton = this.buttonOK;
@@ -1204,6 +1712,7 @@
this.groupBoxMessageTarget.PerformLayout();
this.tabPageKeystrokes.ResumeLayout(false);
this.tabPageKeystrokes.PerformLayout();
+ this.contextMenuStripKeystrokes.ResumeLayout(false);
this.tabPageMouse.ResumeLayout(false);
this.groupBoxMouseScroll.ResumeLayout(false);
this.groupBoxMouseClick.ResumeLayout(false);
@@ -1302,6 +1811,62 @@
private System.Windows.Forms.CheckBox checkBoxMouseMoveDown;
private System.Windows.Forms.CheckBox checkBoxMouseMoveRight;
private System.Windows.Forms.ToolTip toolTips;
+ private System.Windows.Forms.ContextMenuStrip contextMenuStripKeystrokes;
+ private System.Windows.Forms.ToolStripMenuItem cutToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+ private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
+ private System.Windows.Forms.ToolStripMenuItem specialKeyToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem arrowsToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem upToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem downToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem leftToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem rightToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem functionKeysToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f1ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f2ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f3ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f4ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
+ private System.Windows.Forms.ToolStripMenuItem backspaceToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem breakToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem capsLockToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem delToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem endToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem enterToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem escapeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f5ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f6ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f7ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f8ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f9ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f10ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f11ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f12ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f13ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f14ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f15ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem f16ToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem keypadToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem subtractToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem multiplyToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem homeToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem insToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem numLockToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pageDownToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem pageUpToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem scrollLockToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem tabToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem divideToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem modifiersToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem altToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem controlToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem shiftToolStripMenuItem;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-15 16:20:48 UTC (rev 692)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-07-16 06:32:23 UTC (rev 693)
@@ -79,6 +79,16 @@
}
}
+ void InsertKeystroke(string keystroke)
+ {
+ string clipboardWas = Clipboard.GetText();
+
+ Clipboard.SetText(keystroke);
+ textBoxKeys.Paste();
+
+ Clipboard.SetText(clipboardWas);
+ }
+
private void ButtonMappingForm_Load(object sender, EventArgs e)
{
textBoxKeyCode.Text = _keyCode;
@@ -505,8 +515,6 @@
_description = textBoxButtonDesc.Text;
}
- #endregion Controls
-
private void checkBoxMouse_CheckedChanged(object sender, EventArgs e)
{
CheckBox origin = (CheckBox)sender;
@@ -525,6 +533,88 @@
if (origin != checkBoxMouseScrollDown) checkBoxMouseScrollDown.Checked = false;
}
+ private void KeystrokeToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ ToolStripMenuItem origin = sender as ToolStripMenuItem;
+
+ if (origin == null)
+ return;
+
+ switch (origin.Name)
+ {
+ case "upToolStripMenuItem": InsertKeystroke("{UP}"); break;
+ case "downToolStripMenuItem": InsertKeystroke("{DOWN}"); break;
+ case "leftToolStripMenuItem": InsertKeystroke("{LEFT}"); break;
+ case "rightToolStripMenuItem": InsertKeystroke("{RIGHT}"); break;
+
+ case "f1ToolStripMenuItem": InsertKeystroke("{F1}"); break;
+ case "f2ToolStripMenuItem": InsertKeystroke("{F2}"); break;
+ case "f3ToolStripMenuItem": InsertKeystroke("{F3}"); break;
+ case "f4ToolStripMenuItem": InsertKeystroke("{F4}"); break;
+ case "f5ToolStripMenuItem": InsertKeystroke("{F5}"); break;
+ case "f6ToolStripMenuItem": InsertKeystroke("{F6}"); break;
+ case "f7ToolStripMenuItem": InsertKeystroke("{F7}"); break;
+ case "f8ToolStripMenuItem": InsertKeystroke("{F8}"); break;
+ case "f9ToolStripMenuItem": InsertKeystroke("{F9}"); break;
+ case "f10ToolStripMenuItem": InsertKeystroke("{F10}"); break;
+ case "f11ToolStripMenuItem": InsertKeystroke("{F11}"); break;
+ case "f12ToolStripMenuItem": InsertKeystroke("{F12}"); break;
+ case "f13ToolStripMenuItem": InsertKeystroke("{F13}"); break;
+ case "f14ToolStripMenuItem": InsertKeystroke("{F14}"); break;
+ case "f15ToolStripMenuItem": InsertKeystroke("{F15}"); break;
+ case "f16ToolStripMenuItem": InsertKeystroke("{F16}"); break;
+
+ case "addToolStripMenuItem": InsertKeystroke("{ADD}"); break;
+ case "subtractToolStripMenuItem": InsertKeystroke("{SUBTRACT}"); break;
+ case "multiplyToolStripMenuItem": InsertKeystroke("{MULTIPLY}"); break;
+ case "divideToolStripMenuItem": InsertKeystroke("{DIVIDE}"); break;
+
+ case "altToolStripMenuItem": InsertKeystroke("%"); break;
+ case "controlToolStripMenuItem": InsertKeystroke("^"); break;
+ case "shiftToolStripMenuItem": InsertKeystroke("+"); break;
+
+ case "backspaceToolStripMenuItem": InsertKeystroke("{BACKSPACE}"); break;
+ case "breakToolStripMenuItem": InsertKeystroke("{BREAK}"); break;
+ case "capsLockToolStripMenuItem": InsertKeystroke("{CAPSLOCK}"); break;
+ case "delToolStripMenuItem": InsertKeystroke("{DEL}"); break;
+
+ case "endToolStripMenuItem": InsertKeystroke("{END}"); break;
+ case "enterToolStripMenuItem": InsertKeystroke("{ENTER}"); break;
+ case "escapeToolStripMenuItem": InsertKeystroke("{ESC}"); break;
+ case "helpToolStripMenuItem": InsertKeystroke("{HELP}"); break;
+ case "homeToolStripMenuItem": InsertKeystroke("{HOME}"); break;
+ case "insToolStripMenuItem": InsertKeystroke("{INS}"); break;
+ case "numLockToolStripMenuItem": InsertKeystroke("{NUMLOCK}"); break;
+ case "pageDownToolStripMenuItem": InsertKeystroke("{PGDN}"); break;
+ case "pageUpToolStripMenuItem": InsertKeystroke("{PGUP}"); break;
+ case "scrollLockToolStripMenuItem": InsertKeystroke("{SCROLLLOCK}"); break;
+ case "tabToolStripMenuItem": InsertKeystroke("{TAB}"); break;
+ }
+ }
+
+ private void cutToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ textBoxKeys.Cut();
+ }
+ private void copyToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ textBoxKeys.Copy();
+ }
+ private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ textBoxKeys.Paste();
+ }
+ private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ textBoxKeys.SelectAll();
+ }
+ private void selectNoneToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ textBoxKeys.SelectionLength = 0;
+ }
+
+ #endregion Controls
+
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx 2007-07-15 16:20:48 UTC (rev 692)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.resx 2007-07-16 06:32:23 UTC (rev 693)
@@ -120,6 +120,9 @@
<metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="contextMenuStripKeystrokes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>107, 17</value>
+ </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs 2007-07-15 16:20:48 UTC (rev 692)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs 2007-07-16 06:32:23 UTC (rev 693)
@@ -86,87 +86,83 @@
void FindHIDDevices()
{
- int lastError;
+ uint deviceCount = 0;
+ int dwSize = (Marshal.SizeOf(typeof(NativeMethods.RAWINPUTDEVICELIST)));
- // Get the HID Guid
- Guid classGuid = new Guid();
- NativeMethods.HidD_GetHidGuid(ref classGuid);
-
- // 0x12 = DIGCF_PRESENT | DIGCF_DEVICEINTERFACE
- IntPtr handle = NativeMethods.SetupDiGetClassDevs(ref classGuid, "", IntPtr.Zero, 0x12);
- lastError = Marshal.GetLastWin32Error();
-
- if (handle.ToInt32() == -1)
- throw new Win32Exception(lastError);
-
- for (int deviceIndex = 0; ; deviceIndex++)
+ // Get the number of raw input devices in the list,
+ // then allocate sufficient memory and get the entire list
+ if (NativeMethods.GetRawInputDeviceList(IntPtr.Zero, ref deviceCount, (uint)dwSize) == 0)
{
- NativeMethods.DeviceInfoData deviceInfoData = new NativeMethods.DeviceInfoData();
- deviceInfoData.Size = Marshal.SizeOf(deviceInfoData);
+ IntPtr pRawInputDeviceList = Marshal.AllocHGlobal((int)(dwSize * deviceCount));
+ NativeMethods.GetRawInputDeviceList(pRawInputDeviceList, ref deviceCount, (uint)dwSize);
- if (NativeMethods.SetupDiEnumDeviceInfo(handle, deviceIndex, ref deviceInfoData) == false)
+ // Iterate through the list, discarding undesired items
+ // and retrieving further information on keyboard devices
+ for (int i = 0; i < deviceCount; i++)
{
+ string deviceName;
+ uint pcbSize = 0;
- // out of devices or do we have an error?
- /*
- lastError = Marshal.GetLastWin32Error();
- if (lastError != 0x0103 && lastError != 0x007E)
- {
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
- throw new Win32Exception(Marshal.GetLastWin32Error());
- }
- */
+ NativeMethods.RAWINPUTDEVICELIST rid = (NativeMethods.RAWINPUTDEVICELIST)Marshal.PtrToStructure(
+ new IntPtr((pRawInputDeviceList.ToInt32() + (dwSize * i))),
+ typeof(NativeMethods.RAWINPUTDEVICELIST));
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
- break;
- }
+ NativeMethods.GetRawInputDeviceInfo(rid.hDevice, NativeMethods.RIDI_DEVICENAME, IntPtr.Zero, ref pcbSize);
- NativeMethods.DeviceInterfaceData deviceInterfaceData = new NativeMethods.DeviceInterfaceData();
- deviceInterfaceData.Size = Marshal.SizeOf(deviceInterfaceData);
+ if (pcbSize > 0)
+ {
+ IntPtr pData = Marshal.AllocHGlobal((int)pcbSize);
+ NativeMethods.GetRawInputDeviceInfo(rid.hDevice, NativeMethods.RIDI_DEVICENAME, pData, ref pcbSize);
+ deviceName = (string)Marshal.PtrToStringAnsi(pData);
- if (NativeMethods.SetupDiEnumDeviceInterfaces(handle, ref deviceInfoData, ref classGuid, 0, ref deviceInterfaceData) == false)
- {
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
- //throw new Win32Exception(Marshal.GetLastWin32Error());
- continue;
- }
+ // Drop the "root" keyboard and mouse devices used for Terminal
+ // Services and the Remote Desktop
+ if (deviceName.ToUpperInvariant().Contains("ROOT"))
+ continue;
- uint cbData = 0;
+ // Get Detailed Info ...
+ uint size = (uint)Marshal.SizeOf(typeof(NativeMethods.DeviceInfo));
+ NativeMethods.DeviceInfo di = new NativeMethods.DeviceInfo();
+ di.Size = Marshal.SizeOf(typeof(NativeMethods.DeviceInfo));
+ NativeMethods.GetRawInputDeviceInfo(rid.hDevice, NativeMethods.RIDI_DEVICEINFO, ref di, ref size);
- if (NativeMethods.SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, IntPtr.Zero, 0, ref cbData, IntPtr.Zero) == false && cbData == 0)
- {
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
- //throw new Win32Exception(Marshal.GetLastWin32Error());
- continue;
- }
+ di = new NativeMethods.DeviceInfo();
+ di.Size = Marshal.SizeOf(typeof(NativeMethods.DeviceInfo));
+ NativeMethods.GetRawInputDeviceInfo(rid.hDevice, NativeMethods.RIDI_DEVICEINFO, ref di, ref size);
- NativeMethods.DeviceInterfaceDetailData deviceInterfaceDetailData = new NativeMethods.DeviceInterfaceDetailData();
- deviceInterfaceDetailData.Size = 5;
+ DeviceDetails deviceDetails = new DeviceDetails();
+ switch (di.Type)
+ {
+ case NativeMethods.RawInputType.HID:
+ {
+ string vidAndPid = String.Format("Vid_{0:x4}&Pid_{1:x4}", di.HIDInfo.VendorID, di.HIDInfo.ProductID);
+ deviceDetails.Name = String.Format("HID: {0}", GetFriendlyName(vidAndPid));
+ deviceDetails.ID = deviceName;
+ break;
+ }
- if (NativeMethods.SetupDiGetDeviceInterfaceDetail(handle, ref deviceInterfaceData, ref deviceInterfaceDetailData, cbData, IntPtr.Zero, IntPtr.Zero) == false)
- {
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
- //throw new Win32Exception(Marshal.GetLastWin32Error());
- continue;
- }
+ case NativeMethods.RawInputType.Keyboard:
+ {
+ deviceDetails.Name = "Keyboard";
+ deviceDetails.ID = deviceName;
+ break;
+ }
- string devicePath = deviceInterfaceDetailData.DevicePath;
+ case NativeMethods.RawInputType.Mouse:
+ {
+ deviceDetails.Name = "Mouse";
+ deviceDetails.ID = deviceName;
+ break;
+ }
+ }
+ _devices.Add(deviceDetails);
- if (!String.IsNullOrEmpty(devicePath))
- {
- string friendlyName = GetFriendlyName(devicePath);
- if (String.IsNullOrEmpty(friendlyName))
- friendlyName = "Unknown";
-
- DeviceDetails deviceDetails = new DeviceDetails();
- deviceDetails.Name = friendlyName;
- deviceDetails.ID = devicePath;
- _devices.Add(deviceDetails);
+ Marshal.FreeHGlobal(pData);
+ }
}
- NativeMethods.SetupDiDestroyDeviceInfoList(handle);
+ Marshal.FreeHGlobal(pRawInputDeviceList);
}
-
}
private void buttonOK_Click(object sender, EventArgs e)
@@ -181,14 +177,12 @@
this.Close();
}
- string GetFriendlyName(string deviceID)
+ string GetFriendlyName(string vidAndPid)
{
try
{
RegistryKey USBEnum = Registry.LocalMachine.OpenSubKey("SYSTEM\\CurrentControlSet\\Enum\\USB");
- string vidAndPid = GetVidAndPid(deviceID);
-
foreach (string usbSubKey in USBEnum.GetSubKeyNames())
{
if (usbSubKey.IndexOf(vidAndPid, StringComparison.InvariantCultureIgnoreCase) == -1)
@@ -201,13 +195,8 @@
foreach (string vidAndPidSubKey in vidAndPidSubKeys)
{
RegistryKey subKey = currentKey.OpenSubKey(vidAndPidSubKey);
- string parentIdPrefix = subKey.GetValue("ParentIdPrefix", null) as string;
- if (String.IsNullOrEmpty(parentIdPrefix))
- continue;
-
- if (deviceID.Contains(parentIdPrefix))
- return subKey.GetValue("DeviceDesc", null) as string + " (" + subKey.GetValue("LocationInformation", null) as string + ")";
+ return subKey.GetValue("LocationInformation", null) as string;
}
}
}
@@ -218,18 +207,6 @@
return null;
}
- string GetVidAndPid(string deviceID)
- {
- // \\?\hid#vid_0fe9&pid_9010#6&162bd6c4&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
-
- int vidStart = deviceID.IndexOf("vid_", StringComparison.InvariantCultureIgnoreCase);
-
- if (vidStart != -1)
- return deviceID.Substring(vidStart, 17);
- else
- return null;
- }
-
private void buttonAdvanced_Click(object sender, EventArgs e)
{
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs 2007-07-15 16:20:48 UTC (rev 692)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs 2007-07-16 06:32:23 UTC (rev 693)
@@ -11,19 +11,97 @@
internal static class NativeMethods
{
- #region Interop
+ #region Constants
- [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Auto)]
- internal static extern SafeFileHandle CreateFile(
- String fileName,
- [MarshalAs(UnmanagedType.U4)] FileAccess fileAccess,
- [MarshalAs(UnmanagedType.U4)] FileShare fileShare,
- IntPtr securityAttributes,
- [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition,
- [MarshalAs(UnmanagedType.U4)] EFileAttributes flags,
- IntPtr template);
+ public const int WM_KEYDOWN = 0x0100;
+ public const int WM_APPCOMMAND = 0x0319;
+ public const int WM_INPUT = 0x00FF;
+ public const int WM_SYSKEYDOWN = 0x0104;
+ public const int RIDI_PREPARSEDDATA = 0x20000005;
+ public const int RIDI_DEVICENAME = 0x20000007;
+ public const int RIDI_DEVICEINFO = 0x2000000B;
+
+ public const int KEYBOARD_OVERRUN_MAKE_CODE = 0x00FF;
+
+ #endregion Constants
+
+ #region Enumerations
+
+ internal enum RawInputType
+ {
+ Mouse = 0,
+ Keyboard = 1,
+ HID = 2
+ }
+
[Flags]
+ internal enum RawMouseFlags : ushort
+ {
+ MoveRelative = 0,
+ MoveAbsolute = 1,
+ VirtualDesktop = 2,
+ AttributesChanged = 4
+ }
+
+ [Flags]
+ internal enum RawMouseButtons : ushort
+ {
+ None = 0,
+ LeftDown = 0x0001,
+ LeftUp = 0x0002,
+ RightDown = 0x0004,
+ RightUp = 0x0008,
+ MiddleDown = 0x0010,
+ MiddleUp = 0x0020,
+ Button4Down = 0x0040,
+ Button4Up = 0x0080,
+ Button5Down = 0x0100,
+ Button5Up = 0x0200,
+ MouseWheel = 0x0400
+ }
+
+ [Flags]
+ internal enum RawKeyboardFlags : ushort
+ {
+ KeyMake = 0x00,
+ KeyBreak = 0x01,
+ KeyE0 = 0x02,
+ KeyE1 = 0x04,
+ TerminalServerSetLED = 0x08,
+ TerminalServerShadow = 0x10
+ }
+
+ internal enum RawInputCommand
+ {
+ Input = 0x10000003,
+ Header = 0x10000005
+ }
+
+ [Flags]
+ internal enum RawInputDeviceFlags
+ {
+ /// <summary>No flags.</summary>
+ None = 0,
+ /// <summary>If set, this removes the top level collection from the inclusion list. This tells the operating system to stop reading from a device which matches the top level collection.</summary>
+ Remove = 0x00000001,
+ /// <summary>If set, this specifies the top level collections to exclude when reading a complete usage page. This flag only affects a TLC whose usage page is already specified with PageOnly.</summary>
+ Exclude = 0x00000010,
+ /// <summary>If set, this specifies all devices whose top level collection is from the specified usUsagePage. Note that Usage must be zero. To exclude a particular top level collection, use Exclude.</summary>
+ PageOnly = 0x00000020,
+ /// <summary>If set, this prevents any devices specified by UsagePage or Usage from generating legacy messages. This is only for the mouse and keyboard.</summary>
+ NoLegacy = 0x00000030,
+ /// <summary>If set, this enables the caller to receive the input even when the caller is not in the foreground. Note that WindowHandle must be specified.</summary>
+ InputSink = 0x00000100,
+ /// <summary>If set, the mouse button click does not activate the other window.</summary>
+ CaptureMouse = 0x00000200,
+ /// <summary>If set, the application-defined keyboard device hotkeys are not handled. However, the system hotkeys; for example, ALT+TAB and CTRL+ALT+DEL, are still handled. By default, all keyboard hotkeys are handled. NoHotKeys can be specified even if NoLegacy is not specified and WindowHandle is NULL.</summary>
+ NoHotKeys = 0x00000200,
+ /// <summary>If set, application keys are handled. NoLegacy must be specified. Keyboard only.</summary>
+ AppKeys = 0x00000400
+ }
+
+ [Flags]
internal enum EFileAttributes : uint
{
Readonly = 0x00000001,
@@ -53,6 +131,10 @@
FirstPipeInstance = 0x00080000
}
+ #endregion Enumerations
+
+ #region Structures
+
[StructLayout(LayoutKind.Sequential)]
internal struct DeviceInfoData
{
@@ -79,6 +161,167 @@
public string DevicePath;
}
+
+ [StructLayout(LayoutKind.Explicit)]
+ internal struct DeviceInfo
+ {
+ [FieldOffset(0)]
+ public int Size;
+ [FieldOffset(4)]
+ public RawInputType Type;
+
+ [FieldOffset(8)]
+ public DeviceInfoMouse MouseInfo;
+ [FieldOffset(8)]
+ public DeviceInfoKeyboard KeyboardInfo;
+ [FieldOffset(8)]
+ public DeviceInfoHID HIDInfo;
+ }
+
+ internal struct DeviceInfoMouse
+ {
+ public uint ID;
+ public uint NumberOfButtons;
+ public uint SampleRate;
+ }
+
+ internal struct DeviceInfoKeyboard
+ {
+ public uint Type;
+ public uint SubType;
+ public uint KeyboardMode;
+ public uint NumberOfFunctionKeys;
+ public uint NumberOfIndicators;
+ public uint NumberOfKeysTotal;
+ }
+
+ internal struct DeviceInfoHID
+ {
+ public uint VendorID;
+ public uint ProductID;
+ public uint VersionNumber;
+ public ushort UsagePage;
+ public ushort Usage;
+ }
+
+
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct RAWINPUTDEVICELIST
+ {
+ public IntPtr hDevice;
+ [MarshalAs(UnmanagedType.U4)]
+ public RawInputType dwType;
+ }
+
+ [StructLayout(LayoutKind.Explicit)]
+ internal struct RAWINPUT
+ {
+ [FieldOffset(0)]
+ public RAWINPUTHEADER header;
+ [FieldOff...
[truncated message content] |
|
From: <an...@us...> - 2007-07-18 15:54:18
|
Revision: 736
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=736&view=rev
Author: and-81
Date: 2007-07-18 08:54:16 -0700 (Wed, 18 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-18 14:25:21 UTC (rev 735)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-18 15:54:16 UTC (rev 736)
@@ -106,7 +106,7 @@
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.selectNoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
- this.specialKeyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.specialKeysToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.arrowsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.upToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.downToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -1005,58 +1005,58 @@
this.selectAllToolStripMenuItem,
this.selectNoneToolStripMenuItem,
this.toolStripSeparator2,
- this.specialKeyToolStripMenuItem});
+ this.specialKeysToolStripMenuItem});
this.contextMenuStripKeystrokes.Name = "contextMenuStripKeystrokes";
- this.contextMenuStripKeystrokes.Size = new System.Drawing.Size(155, 170);
+ this.contextMenuStripKeystrokes.Size = new System.Drawing.Size(145, 148);
//
// cutToolStripMenuItem
//
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
- this.cutToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.cutToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.cutToolStripMenuItem.Text = "Cut";
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
- this.copyToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// pasteToolStripMenuItem
//
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
- this.pasteToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.pasteToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.pasteToolStripMenuItem.Text = "Paste";
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(151, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(141, 6);
//
// selectAllToolStripMenuItem
//
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
- this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.selectAllToolStripMenuItem.Text = "Select All";
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
//
// selectNoneToolStripMenuItem
//
this.selectNoneToolStripMenuItem.Name = "selectNoneToolStripMenuItem";
- this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
+ this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
this.selectNoneToolStripMenuItem.Text = "Select None";
this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(151, 6);
+ this.toolStripSeparator2.Size = new System.Drawing.Size(141, 6);
//
- // specialKeyToolStripMenuItem
+ // specialKeysToolStripMenuItem
//
- this.specialKeyToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.specialKeysToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.arrowsToolStripMenuItem,
this.functionKeysToolStripMenuItem,
this.keypadToolStripMenuItem,
@@ -1077,9 +1077,9 @@
this.pageUpToolStripMenuItem,
this.scrollLockToolStripMenuItem,
this.tabToolStripMenuItem});
- this.specialKeyToolStripMenuItem.Name = "specialKeyToolStripMenuItem";
- this.specialKeyToolStripMenuItem.Size = new System.Drawing.Size(154, 22);
- this.specialKeyToolStripMenuItem.Text = "Special Key ...";
+ this.specialKeysToolStripMenuItem.Name = "specialKeysToolStripMenuItem";
+ this.specialKeysToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.specialKeysToolStripMenuItem.Text = "Special Keys";
//
// arrowsToolStripMenuItem
//
@@ -1819,7 +1819,7 @@
private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
- private System.Windows.Forms.ToolStripMenuItem specialKeyToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem specialKeysToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem arrowsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem upToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem downToolStripMenuItem;
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs 2007-07-18 14:25:21 UTC (rev 735)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs 2007-07-18 15:54:16 UTC (rev 736)
@@ -25,6 +25,7 @@
[Flags]
public enum MouseEvents : int
{
+ None = 0x0000,
Move = 0x0001,
LeftDown = 0x0002,
LeftUp = 0x0004,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-07-20 14:43:21
|
Revision: 748
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=748&view=rev
Author: and-81
Date: 2007-07-20 07:43:12 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
trunk/plugins/IR Server Suite/Common/IrssUtils/SystemRegistry.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/NotifyWindow.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.resx
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickLeft.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickMiddle.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickRight.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveDown.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveLeft.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveRight.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveUp.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollDown.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollUp.png
trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DeviceAccess.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IRCodeConversion.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IRDecoder.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Program.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/RemoteDetectionData.cs
Removed Paths:
-------------
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver v2/
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-20 12:06:11 UTC (rev 747)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -134,6 +134,10 @@
this.subtractToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.multiplyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.divideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.modifiersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.altToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.controlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.shiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.backspaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.breakToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -169,10 +173,6 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.modifiersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.altToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.controlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.shiftToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBoxButton.SuspendLayout();
this.groupBoxSet.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -994,6 +994,7 @@
this.textBoxKeys.ShortcutsEnabled = false;
this.textBoxKeys.Size = new System.Drawing.Size(416, 144);
this.textBoxKeys.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxKeys, "Enter keystrokes here, right-click for a list of special keys");
//
// contextMenuStripKeystrokes
//
@@ -1095,28 +1096,28 @@
// upToolStripMenuItem
//
this.upToolStripMenuItem.Name = "upToolStripMenuItem";
- this.upToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.upToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.upToolStripMenuItem.Text = "Up";
this.upToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// downToolStripMenuItem
//
this.downToolStripMenuItem.Name = "downToolStripMenuItem";
- this.downToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.downToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.downToolStripMenuItem.Text = "Down";
this.downToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// leftToolStripMenuItem
//
this.leftToolStripMenuItem.Name = "leftToolStripMenuItem";
- this.leftToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.leftToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.leftToolStripMenuItem.Text = "Left";
this.leftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// rightToolStripMenuItem
//
this.rightToolStripMenuItem.Name = "rightToolStripMenuItem";
- this.rightToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.rightToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
this.rightToolStripMenuItem.Text = "Right";
this.rightToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1146,112 +1147,112 @@
// f1ToolStripMenuItem
//
this.f1ToolStripMenuItem.Name = "f1ToolStripMenuItem";
- this.f1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f1ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f1ToolStripMenuItem.Text = "F1";
this.f1ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f2ToolStripMenuItem
//
this.f2ToolStripMenuItem.Name = "f2ToolStripMenuItem";
- this.f2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f2ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f2ToolStripMenuItem.Text = "F2";
this.f2ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f3ToolStripMenuItem
//
this.f3ToolStripMenuItem.Name = "f3ToolStripMenuItem";
- this.f3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f3ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f3ToolStripMenuItem.Text = "F3";
this.f3ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f4ToolStripMenuItem
//
this.f4ToolStripMenuItem.Name = "f4ToolStripMenuItem";
- this.f4ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f4ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f4ToolStripMenuItem.Text = "F4";
this.f4ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f5ToolStripMenuItem
//
this.f5ToolStripMenuItem.Name = "f5ToolStripMenuItem";
- this.f5ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f5ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f5ToolStripMenuItem.Text = "F5";
this.f5ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f6ToolStripMenuItem
//
this.f6ToolStripMenuItem.Name = "f6ToolStripMenuItem";
- this.f6ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f6ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f6ToolStripMenuItem.Text = "F6";
this.f6ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f7ToolStripMenuItem
//
this.f7ToolStripMenuItem.Name = "f7ToolStripMenuItem";
- this.f7ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f7ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f7ToolStripMenuItem.Text = "F7";
this.f7ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f8ToolStripMenuItem
//
this.f8ToolStripMenuItem.Name = "f8ToolStripMenuItem";
- this.f8ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f8ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f8ToolStripMenuItem.Text = "F8";
this.f8ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f9ToolStripMenuItem
//
this.f9ToolStripMenuItem.Name = "f9ToolStripMenuItem";
- this.f9ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f9ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f9ToolStripMenuItem.Text = "F9";
this.f9ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f10ToolStripMenuItem
//
this.f10ToolStripMenuItem.Name = "f10ToolStripMenuItem";
- this.f10ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f10ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f10ToolStripMenuItem.Text = "F10";
this.f10ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f11ToolStripMenuItem
//
this.f11ToolStripMenuItem.Name = "f11ToolStripMenuItem";
- this.f11ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f11ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f11ToolStripMenuItem.Text = "F11";
this.f11ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f12ToolStripMenuItem
//
this.f12ToolStripMenuItem.Name = "f12ToolStripMenuItem";
- this.f12ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f12ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f12ToolStripMenuItem.Text = "F12";
this.f12ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f13ToolStripMenuItem
//
this.f13ToolStripMenuItem.Name = "f13ToolStripMenuItem";
- this.f13ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f13ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f13ToolStripMenuItem.Text = "F13";
this.f13ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f14ToolStripMenuItem
//
this.f14ToolStripMenuItem.Name = "f14ToolStripMenuItem";
- this.f14ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f14ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f14ToolStripMenuItem.Text = "F14";
this.f14ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f15ToolStripMenuItem
//
this.f15ToolStripMenuItem.Name = "f15ToolStripMenuItem";
- this.f15ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f15ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f15ToolStripMenuItem.Text = "F15";
this.f15ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f16ToolStripMenuItem
//
this.f16ToolStripMenuItem.Name = "f16ToolStripMenuItem";
- this.f16ToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.f16ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
this.f16ToolStripMenuItem.Text = "F16";
this.f16ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1269,31 +1270,62 @@
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
- this.addToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.addToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
this.addToolStripMenuItem.Text = "Add";
this.addToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// subtractToolStripMenuItem
//
this.subtractToolStripMenuItem.Name = "subtractToolStripMenuItem";
- this.subtractToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.subtractToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
this.subtractToolStripMenuItem.Text = "Subtract";
this.subtractToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// multiplyToolStripMenuItem
//
this.multiplyToolStripMenuItem.Name = "multiplyToolStripMenuItem";
- this.multiplyToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.multiplyToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
this.multiplyToolStripMenuItem.Text = "Multiply";
this.multiplyToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// divideToolStripMenuItem
//
this.divideToolStripMenuItem.Name = "divideToolStripMenuItem";
- this.divideToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.divideToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
this.divideToolStripMenuItem.Text = "Divide";
this.divideToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
+ // modifiersToolStripMenuItem
+ //
+ this.modifiersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.altToolStripMenuItem,
+ this.controlToolStripMenuItem,
+ this.shiftToolStripMenuItem});
+ this.modifiersToolStripMenuItem.Name = "modifiersToolStripMenuItem";
+ this.modifiersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.modifiersToolStripMenuItem.Text = "Modifiers";
+ //
+ // altToolStripMenuItem
+ //
+ this.altToolStripMenuItem.Name = "altToolStripMenuItem";
+ this.altToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.altToolStripMenuItem.Text = "Alt";
+ this.altToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // controlToolStripMenuItem
+ //
+ this.controlToolStripMenuItem.Name = "controlToolStripMenuItem";
+ this.controlToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.controlToolStripMenuItem.Text = "Control";
+ this.controlToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
+ // shiftToolStripMenuItem
+ //
+ this.shiftToolStripMenuItem.Name = "shiftToolStripMenuItem";
+ this.shiftToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.shiftToolStripMenuItem.Text = "Shift";
+ this.shiftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
+ //
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
@@ -1639,37 +1671,6 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
- // modifiersToolStripMenuItem
- //
- this.modifiersToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.altToolStripMenuItem,
- this.controlToolStripMenuItem,
- this.shiftToolStripMenuItem});
- this.modifiersToolStripMenuItem.Name = "modifiersToolStripMenuItem";
- this.modifiersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.modifiersToolStripMenuItem.Text = "Modifiers";
- //
- // altToolStripMenuItem
- //
- this.altToolStripMenuItem.Name = "altToolStripMenuItem";
- this.altToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.altToolStripMenuItem.Text = "Alt";
- this.altToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
- //
- // controlToolStripMenuItem
- //
- this.controlToolStripMenuItem.Name = "controlToolStripMenuItem";
- this.controlToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.controlToolStripMenuItem.Text = "Control";
- this.controlToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
- //
- // shiftToolStripMenuItem
- //
- this.shiftToolStripMenuItem.Name = "shiftToolStripMenuItem";
- this.shiftToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.shiftToolStripMenuItem.Text = "Shift";
- this.shiftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
- //
// ButtonMappingForm
//
this.AcceptButton = this.buttonOK;
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs 2007-07-20 12:06:11 UTC (rev 747)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/CDRom.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -6,6 +6,9 @@
namespace IrssUtils
{
+ /// <summary>
+ /// Access to the CDRom door.
+ /// </summary>
public static class CDRom
{
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-07-20 12:06:11 UTC (rev 747)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -6,6 +6,7 @@
using System.IO.Ports;
using System.Net.Sockets;
using System.Text;
+using System.Threading;
using System.Windows.Forms;
namespace IrssUtils
@@ -284,6 +285,18 @@
process.StartInfo.CreateNoWindow = bool.Parse(commands[4]);
process.StartInfo.UseShellExecute = bool.Parse(commands[5]);
process.Start();
+
+ // Give new process focus ...
+ if (!process.StartInfo.CreateNoWindow &&
+ process.StartInfo.WindowStyle != ProcessWindowStyle.Hidden &&
+ process.StartInfo.WindowStyle != ProcessWindowStyle.Minimized)
+ {
+ Thread.Sleep(500);
+
+ IntPtr processWindow = process.MainWindowHandle;
+ if (processWindow != IntPtr.Zero)
+ Win32.SetForegroundWindow(processWindow);
+ }
}
/// <summary>
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.Designer.cs 2007-07-20 12:06:11 UTC (rev 747)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.Designer.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -87,7 +87,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(336, 160);
+ this.ClientSize = new System.Drawing.Size(336, 167);
this.Controls.Add(this.labelKeystrokes);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.Designer.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -0,0 +1,290 @@
+namespace IrssUtils.Forms
+{
+
+ partial class MouseCommand
+ {
+
+ /// <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.buttonCancel = new System.Windows.Forms.Button();
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.groupBoxMouseScroll = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseScrollDown = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseScrollUp = new System.Windows.Forms.CheckBox();
+ this.groupBoxMouseClick = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseClickRight = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseClickMiddle = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseClickLeft = new System.Windows.Forms.CheckBox();
+ this.groupBoxMouseMove = new System.Windows.Forms.GroupBox();
+ this.checkBoxMouseMoveLeft = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveDown = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveRight = new System.Windows.Forms.CheckBox();
+ this.checkBoxMouseMoveUp = new System.Windows.Forms.CheckBox();
+ this.labelMouseMove = new System.Windows.Forms.Label();
+ this.numericUpDownMouseMove = new System.Windows.Forms.NumericUpDown();
+ this.groupBoxMouseScroll.SuspendLayout();
+ this.groupBoxMouseClick.SuspendLayout();
+ this.groupBoxMouseMove.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).BeginInit();
+ this.SuspendLayout();
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.Location = new System.Drawing.Point(360, 192);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.Size = new System.Drawing.Size(64, 24);
+ this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.Text = "Cancel";
+ this.buttonCancel.UseVisualStyleBackColor = true;
+ this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+ //
+ // buttonOK
+ //
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOK.Location = new System.Drawing.Point(288, 192);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(64, 24);
+ this.buttonOK.TabIndex = 2;
+ this.buttonOK.Text = "OK";
+ this.buttonOK.UseVisualStyleBackColor = true;
+ this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+ //
+ // groupBoxMouseScroll
+ //
+ this.groupBoxMouseScroll.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseScroll.Controls.Add(this.checkBoxMouseScrollDown);
+ this.groupBoxMouseScroll.Controls.Add(this.checkBoxMouseScrollUp);
+ this.groupBoxMouseScroll.Location = new System.Drawing.Point(296, 8);
+ this.groupBoxMouseScroll.Name = "groupBoxMouseScroll";
+ this.groupBoxMouseScroll.Size = new System.Drawing.Size(128, 176);
+ this.groupBoxMouseScroll.TabIndex = 6;
+ this.groupBoxMouseScroll.TabStop = false;
+ this.groupBoxMouseScroll.Text = "Scroll";
+ //
+ // checkBoxMouseScrollDown
+ //
+ this.checkBoxMouseScrollDown.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseScrollDown.Image = global::IrssUtils.Properties.Resources.ScrollDown;
+ this.checkBoxMouseScrollDown.Location = new System.Drawing.Point(48, 96);
+ this.checkBoxMouseScrollDown.Name = "checkBoxMouseScrollDown";
+ this.checkBoxMouseScrollDown.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseScrollDown.TabIndex = 1;
+ this.checkBoxMouseScrollDown.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseScrollUp
+ //
+ this.checkBoxMouseScrollUp.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseScrollUp.Image = global::IrssUtils.Properties.Resources.ScrollUp;
+ this.checkBoxMouseScrollUp.Location = new System.Drawing.Point(48, 40);
+ this.checkBoxMouseScrollUp.Name = "checkBoxMouseScrollUp";
+ this.checkBoxMouseScrollUp.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseScrollUp.TabIndex = 0;
+ this.checkBoxMouseScrollUp.UseVisualStyleBackColor = true;
+ //
+ // groupBoxMouseClick
+ //
+ this.groupBoxMouseClick.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickRight);
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickMiddle);
+ this.groupBoxMouseClick.Controls.Add(this.checkBoxMouseClickLeft);
+ this.groupBoxMouseClick.Location = new System.Drawing.Point(160, 8);
+ this.groupBoxMouseClick.Name = "groupBoxMouseClick";
+ this.groupBoxMouseClick.Size = new System.Drawing.Size(128, 176);
+ this.groupBoxMouseClick.TabIndex = 5;
+ this.groupBoxMouseClick.TabStop = false;
+ this.groupBoxMouseClick.Text = "Click";
+ //
+ // checkBoxMouseClickRight
+ //
+ this.checkBoxMouseClickRight.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickRight.Image = global::IrssUtils.Properties.Resources.ClickRight;
+ this.checkBoxMouseClickRight.Location = new System.Drawing.Point(88, 64);
+ this.checkBoxMouseClickRight.Name = "checkBoxMouseClickRight";
+ this.checkBoxMouseClickRight.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickRight.TabIndex = 2;
+ this.checkBoxMouseClickRight.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseClickMiddle
+ //
+ this.checkBoxMouseClickMiddle.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickMiddle.Image = global::IrssUtils.Properties.Resources.ClickMiddle;
+ this.checkBoxMouseClickMiddle.Location = new System.Drawing.Point(48, 64);
+ this.checkBoxMouseClickMiddle.Name = "checkBoxMouseClickMiddle";
+ this.checkBoxMouseClickMiddle.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickMiddle.TabIndex = 1;
+ this.checkBoxMouseClickMiddle.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseClickLeft
+ //
+ this.checkBoxMouseClickLeft.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseClickLeft.Image = global::IrssUtils.Properties.Resources.ClickLeft;
+ this.checkBoxMouseClickLeft.Location = new System.Drawing.Point(8, 64);
+ this.checkBoxMouseClickLeft.Name = "checkBoxMouseClickLeft";
+ this.checkBoxMouseClickLeft.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseClickLeft.TabIndex = 0;
+ this.checkBoxMouseClickLeft.UseVisualStyleBackColor = true;
+ //
+ // groupBoxMouseMove
+ //
+ this.groupBoxMouseMove.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveLeft);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveDown);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveRight);
+ this.groupBoxMouseMove.Controls.Add(this.checkBoxMouseMoveUp);
+ this.groupBoxMouseMove.Controls.Add(this.labelMouseMove);
+ this.groupBoxMouseMove.Controls.Add(this.numericUpDownMouseMove);
+ this.groupBoxMouseMove.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxMouseMove.Name = "groupBoxMouseMove";
+ this.groupBoxMouseMove.Size = new System.Drawing.Size(144, 176);
+ this.groupBoxMouseMove.TabIndex = 4;
+ this.groupBoxMouseMove.TabStop = false;
+ this.groupBoxMouseMove.Text = "Move";
+ //
+ // checkBoxMouseMoveLeft
+ //
+ this.checkBoxMouseMoveLeft.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveLeft.Image = global::IrssUtils.Properties.Resources.MoveLeft;
+ this.checkBoxMouseMoveLeft.Location = new System.Drawing.Point(24, 64);
+ this.checkBoxMouseMoveLeft.Name = "checkBoxMouseMoveLeft";
+ this.checkBoxMouseMoveLeft.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveLeft.TabIndex = 1;
+ this.checkBoxMouseMoveLeft.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseMoveDown
+ //
+ this.checkBoxMouseMoveDown.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveDown.Image = global::IrssUtils.Properties.Resources.MoveDown;
+ this.checkBoxMouseMoveDown.Location = new System.Drawing.Point(56, 96);
+ this.checkBoxMouseMoveDown.Name = "checkBoxMouseMoveDown";
+ this.checkBoxMouseMoveDown.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveDown.TabIndex = 3;
+ this.checkBoxMouseMoveDown.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseMoveRight
+ //
+ this.checkBoxMouseMoveRight.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveRight.Image = global::IrssUtils.Properties.Resources.MoveRight;
+ this.checkBoxMouseMoveRight.Location = new System.Drawing.Point(88, 64);
+ this.checkBoxMouseMoveRight.Name = "checkBoxMouseMoveRight";
+ this.checkBoxMouseMoveRight.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveRight.TabIndex = 2;
+ this.checkBoxMouseMoveRight.UseVisualStyleBackColor = true;
+ //
+ // checkBoxMouseMoveUp
+ //
+ this.checkBoxMouseMoveUp.Appearance = System.Windows.Forms.Appearance.Button;
+ this.checkBoxMouseMoveUp.Image = global::IrssUtils.Properties.Resources.MoveUp;
+ this.checkBoxMouseMoveUp.Location = new System.Drawing.Point(56, 32);
+ this.checkBoxMouseMoveUp.Name = "checkBoxMouseMoveUp";
+ this.checkBoxMouseMoveUp.Size = new System.Drawing.Size(32, 32);
+ this.checkBoxMouseMoveUp.TabIndex = 0;
+ this.checkBoxMouseMoveUp.UseVisualStyleBackColor = true;
+ //
+ // labelMouseMove
+ //
+ this.labelMouseMove.Location = new System.Drawing.Point(8, 144);
+ this.labelMouseMove.Name = "labelMouseMove";
+ this.labelMouseMove.Size = new System.Drawing.Size(72, 20);
+ this.labelMouseMove.TabIndex = 4;
+ this.labelMouseMove.Text = "Distance:";
+ this.labelMouseMove.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // numericUpDownMouseMove
+ //
+ this.numericUpDownMouseMove.Increment = new decimal(new int[] {
+ 5,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Location = new System.Drawing.Point(80, 144);
+ this.numericUpDownMouseMove.Maximum = new decimal(new int[] {
+ 5000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Minimum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseMove.Name = "numericUpDownMouseMove";
+ this.numericUpDownMouseMove.Size = new System.Drawing.Size(56, 20);
+ this.numericUpDownMouseMove.TabIndex = 5;
+ this.numericUpDownMouseMove.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownMouseMove.Value = new decimal(new int[] {
+ 16,
+ 0,
+ 0,
+ 0});
+ //
+ // MouseCommand
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(432, 231);
+ this.Controls.Add(this.groupBoxMouseScroll);
+ this.Controls.Add(this.groupBoxMouseClick);
+ this.Controls.Add(this.groupBoxMouseMove);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(440, 258);
+ this.Name = "MouseCommand";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Mouse Command";
+ this.groupBoxMouseScroll.ResumeLayout(false);
+ this.groupBoxMouseClick.ResumeLayout(false);
+ this.groupBoxMouseMove.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button buttonCancel;
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.GroupBox groupBoxMouseScroll;
+ private System.Windows.Forms.CheckBox checkBoxMouseScrollDown;
+ private System.Windows.Forms.CheckBox checkBoxMouseScrollUp;
+ private System.Windows.Forms.GroupBox groupBoxMouseClick;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickRight;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickMiddle;
+ private System.Windows.Forms.CheckBox checkBoxMouseClickLeft;
+ private System.Windows.Forms.GroupBox groupBoxMouseMove;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveLeft;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveDown;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveRight;
+ private System.Windows.Forms.CheckBox checkBoxMouseMoveUp;
+ private System.Windows.Forms.Label labelMouseMove;
+ private System.Windows.Forms.NumericUpDown numericUpDownMouseMove;
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace IrssUtils.Forms
+{
+
+ public partial class MouseCommand : Form
+ {
+
+ #region Properties
+
+ public string CommandString
+ {
+ get
+ {
+ StringBuilder command = new StringBuilder();
+ command.Append(Common.CmdPrefixMouse);
+
+ if (checkBoxMouseClickLeft.Checked) command.Append(Common.MouseClickLeft);
+ else if (checkBoxMouseClickRight.Checked) command.Append(Common.MouseClickRight);
+ else if (checkBoxMouseClickMiddle.Checked) command.Append(Common.MouseClickMiddle);
+ else if (checkBoxMouseScrollUp.Checked) command.Append(Common.MouseScrollUp);
+ else if (checkBoxMouseScrollDown.Checked) command.Append(Common.MouseScrollDown);
+ else
+ {
+ if (checkBoxMouseMoveUp.Checked) command.Append(Common.MouseMoveUp);
+ else if (checkBoxMouseMoveDown.Checked) command.Append(Common.MouseMoveDown);
+ else if (checkBoxMouseMoveLeft.Checked) command.Append(Common.MouseMoveLeft);
+ else if (checkBoxMouseMoveRight.Checked) command.Append(Common.MouseMoveRight);
+ else
+ return null;
+
+ command.Append(numericUpDownMouseMove.Value.ToString());
+ }
+
+ return command.ToString();
+ }
+ }
+
+ #endregion Properties
+
+ #region Constructors
+
+ public MouseCommand() : this(null) { }
+ public MouseCommand(string command)
+ {
+ InitializeComponent();
+
+ if (String.IsNullOrEmpty(command))
+ return;
+
+ switch (command)
+ {
+ case Common.MouseClickLeft: checkBoxMouseClickLeft.Checked = true; break;
+ case Common.MouseClickMiddle: checkBoxMouseClickMiddle.Checked = true; break;
+ case Common.MouseClickRight: checkBoxMouseClickRight.Checked = true; break;
+ case Common.MouseScrollDown: checkBoxMouseScrollDown.Checked = true; break;
+ case Common.MouseScrollUp: checkBoxMouseScrollUp.Checked = true; break;
+
+ default:
+ if (command.StartsWith(Common.MouseMoveDown)) checkBoxMouseMoveDown.Checked = true;
+ else if (command.StartsWith(Common.MouseMoveLeft)) checkBoxMouseMoveLeft.Checked = true;
+ else if (command.StartsWith(Common.MouseMoveRight)) checkBoxMouseMoveRight.Checked = true;
+ else if (command.StartsWith(Common.MouseMoveUp)) checkBoxMouseMoveUp.Checked = true;
+
+ numericUpDownMouseMove.Value = Decimal.Parse(command.Substring(command.IndexOf(" ")));
+ break;
+ }
+ }
+
+ #endregion
+
+ #region Buttons
+
+ private void buttonOK_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ #endregion Buttons
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.resx
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.resx (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.resx 2007-07-20 14:43:12 UTC (rev 748)
@@ -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/Common/IrssUtils/Graphics/ClickLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickLeft.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickMiddle.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickMiddle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickRight.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ClickRight.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveDown.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveDown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveLeft.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveLeft.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveRight.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveRight.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveUp.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/MoveUp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollDown.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollDown.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollUp.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Common/IrssUtils/Graphics/ScrollUp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-07-20 12:06:11 UTC (rev 747)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-07-20 14:43:12 UTC (rev 748)
@@ -42,6 +42,12 @@
<ItemGroup>
<Compile Include="CDRom.cs" />
<Compile Include="Common.cs" />
+ <Compile Include="Forms\MouseCommand.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Forms\MouseCommand.Designer.cs">
+ <DependentUpon>MouseCommand.cs</DependentUpon>
+ </Compile>
<Compile Include="Forms\TcpMessageCommand.cs">
<SubType>Form</SubType>
</Compile>
@@ -92,6 +98,11 @@
</Compile>
<Compile Include="IrssLog.cs" />
<Compile Include="Mouse.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
<Compile Include="SystemRegistry.cs" />
<Compile Include="TransceiverInfo.cs" />
<Compile Include="Win32.cs" />
@@ -99,6 +110,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="Forms\MouseCommand.resx">
+ <DependentUpon>MouseCommand.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="Forms\TcpMessageCommand.resx">
<DependentUpon>TcpMessageCommand.cs</DependentUpon>
<SubType>Designer</SubType>
@@ -131,7 +146,23 @@
<DependentUpon>ServerAddress.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <Content Include="Graphics\ClickLeft.png" />
+ <Content Include="Graphics\ClickMiddle.png" />
+ <Content Include="Graphics\ClickRight.png" />
+ <Content Include="Graphics\MoveDown.png" />
+ <Content Include="Graphics\MoveLeft.png" />
+ <Content Include="Graphics\MoveRight.png" />
+ <Content Include="Graphics\MoveUp.png" />
+ <Content Include="Graphics\ScrollDown.png" />
+ <Content Include="Graphics\ScrollUp.png" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs 2007-07-20 14:43:12 UTC (rev 748)
@@ -0,0 +1,126 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace IrssUtils.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("IrssUtils.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Bitmap ClickLeft {
+ get {
+ object obj = ResourceManager.GetObject("ClickLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ClickMiddle {
+ get {
+ object obj = ResourceManager.GetObject("ClickMiddle", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ClickRight {
+ get {
+ object obj = ResourceManager.GetObject("ClickRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveDown {
+ get {
+ object obj = ResourceManager.GetObject("MoveDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveLeft {
+ get {
+ object obj = ResourceManager.GetObject("MoveLeft", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveRight {
+ get {
+ object obj = ResourceManager.GetObject("MoveRight", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap MoveUp {
+ get {
+ object obj = ResourceManager.GetObject("MoveUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ScrollDown {
+ get {
+ object obj = ResourceManager.GetObject("ScrollDown", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap ScrollUp {
+ get {
+ object obj = ResourceManager.GetObject("ScrollUp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.resx
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.resx (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.resx 2007-07-20 14:43:12 UTC (rev 748)
@@ -0,0 +1,148 @@
+<?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.Formatter...
[truncated message content] |
|
From: <an...@us...> - 2007-08-02 15:40:58
|
Revision: 784
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=784&view=rev
Author: and-81
Date: 2007-08-02 08:40:55 -0700 (Thu, 02 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
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/Applications/Translator/Configuration.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.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/MappedEvent.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/ProgramSettings.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/IClientChannel.cs
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/IInterProcessConnection.cs
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/InterProcessIOException.cs
trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/NamedPipeNative.cs
trunk/plugins/IR Server Suite/IPC/Named Pipes/PipeMessage.cs
trunk/plugins/IR Server Suite/IPC/Named Pipes/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/InputMapper/InputHandler.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MappedEvent.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.resx
trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs
Removed Paths:
-------------
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -22,7 +22,7 @@
#region Enumerations
/// <summary>
- /// A list of MCE remote buttons
+ /// A list of MCE remote buttons.
/// </summary>
public enum MceButton
{
@@ -174,6 +174,8 @@
case "Blast Success":
case "Blast Failure":
case "Start Learn":
+ case "Keyboard Event":
+ case "Mouse Event":
return;
case "Clients":
@@ -204,10 +206,10 @@
return;
}
- case "Remote Button":
+ case "Remote Event":
{
string keyCode = Encoding.ASCII.GetString(received.Data);
- RemoteButtonPressed(keyCode);
+ RemoteHandlerCallback(keyCode);
return;
}
@@ -355,9 +357,9 @@
return true;
}
- void RemoteButtonPressed(string keyCode)
+ void RemoteHandlerCallback(string keyCode)
{
- string text = String.Format("Remote Button \"{0}\"", keyCode);
+ string text = String.Format("Remote Event \"{0}\"", keyCode);
this.Invoke(_AddStatusLine, new Object[] { text });
}
@@ -572,7 +574,7 @@
BitConverter.GetBytes(keyCode).CopyTo(data, 0);
BitConverter.GetBytes(0).CopyTo(data, 4);
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Button", data);
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Event", data);
PipeAccess.SendMessage(Common.ServerPipeName, _serverAddress, message.ToString());
}
catch (Exception ex)
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -33,7 +33,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.2")]
-[assembly: AssemblyFileVersion("1.0.3.2")]
+[assembly: AssemblyVersion("1.0.3.3")]
+[assembly: AssemblyFileVersion("1.0.3.3")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -31,6 +31,7 @@
static string _blastSpeed = "None";
static bool _treatAsChannelNumber = false;
+ static int _padChannelNumber = 0;
#endregion Variables
@@ -74,6 +75,10 @@
_treatAsChannelNumber = true;
continue;
+ case "-pad":
+ int.TryParse(args[++index], out _padChannelNumber);
+ continue;
+
default:
irCommands.Add(args[index]);
continue;
@@ -109,8 +114,19 @@
if (_treatAsChannelNumber)
{
Info("Processing channel: {0}", command);
- foreach (char digit in command)
+
+ StringBuilder channelNumber = new StringBuilder(command);
+
+ if (_padChannelNumber > 0)
{
+ for (int index = 0; index < _padChannelNumber - command.Length; index++)
+ channelNumber.Insert(0, '0');
+
+ Info("Padding channel number: {0} becomes {1}", command, channelNumber.ToString());
+ }
+
+ foreach (char digit in channelNumber.ToString())
+ {
if (digit == '~')
{
Thread.Sleep(500);
@@ -172,13 +188,15 @@
{
IrssLog.Debug("Show Help");
- Console.WriteLine("IRBlast.exe -host <server> -port [port] -speed [speed] [-channel] <commands>");
+ Console.WriteLine("IRBlast -host <server> [-port x] [-speed x] [-pad x] [-channel] <commands>");
Console.WriteLine("");
Console.WriteLine("Use -host to specify the computer that is hosting the IR Server.");
Console.WriteLine("Use -port to blast to a particular blaster port (Optional).");
Console.WriteLine("Use -speed to set the blaster speed (Optional).");
Console.WriteLine("Use -channel to tell IR Blast to break apart the following IR Command and");
Console.WriteLine(" use each digit for a separate IR blast (Optional).");
+ Console.WriteLine("Use -pad to tell IR Blast to pad channel numbers to a certain length");
+ Console.WriteLine(" (Optional, Requires -channel).");
Console.WriteLine("Use a tilde ~ between commands to insert half second pauses.");
Console.WriteLine("");
Console.WriteLine("");
@@ -194,10 +212,10 @@
Console.WriteLine("This would blast the \"Turn on surround.IR\" command on the MEDIAPC computer");
Console.WriteLine("to blaster port 2 at the default blaster speed.");
Console.WriteLine("");
- Console.WriteLine("IRBlast -host HTPC -channel 302");
+ Console.WriteLine("IRBlast -host HTPC -pad 4 -channel 302");
Console.WriteLine("");
- Console.WriteLine("This would blast the 3.IR, 0.IR, and 2.IR commands on the HTPC computer to");
- Console.WriteLine("the default blaster port at the default blaster speed.");
+ Console.WriteLine("This would blast the 0.IR (for padding), 3.IR, 0.IR, and 2.IR commands on");
+ Console.WriteLine("the HTPC computer to the default blaster port at the default blaster speed.");
Console.WriteLine("");
Console.WriteLine("");
}
@@ -435,7 +453,9 @@
{
switch (received.Name)
{
- case "Remote Button":
+ case "Remote Event":
+ case "Keyboard Event":
+ case "Mouse Event":
break;
case "Blast Success":
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -33,7 +33,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.2")]
-[assembly: AssemblyFileVersion("1.0.3.2")]
+[assembly: AssemblyVersion("1.0.3.3")]
+[assembly: AssemblyFileVersion("1.0.3.3")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -32,6 +32,7 @@
static string _blastSpeed = "None";
static bool _treatAsChannelNumber = false;
+ static int _padChannelNumber = 0;
#endregion Variables
@@ -73,6 +74,10 @@
_treatAsChannelNumber = true;
continue;
+ case "-pad":
+ int.TryParse(args[++index], out _padChannelNumber);
+ continue;
+
default:
irCommands.Add(args[index]);
continue;
@@ -108,8 +113,19 @@
if (_treatAsChannelNumber)
{
IrssLog.Info("Processing channel: {0}", command);
- foreach (char digit in command)
+
+ StringBuilder channelNumber = new StringBuilder(command);
+
+ if (_padChannelNumber > 0)
{
+ for (int index = 0; index < _padChannelNumber - command.Length; index++)
+ channelNumber.Insert(0, '0');
+
+ IrssLog.Info("Padding channel number: {0} becomes {1}", command, channelNumber.ToString());
+ }
+
+ foreach (char digit in channelNumber.ToString())
+ {
if (digit == '~')
{
Thread.Sleep(500);
@@ -141,7 +157,7 @@
}
}
- else
+ else // Give help ...
{
ShowHelp();
}
@@ -399,7 +415,9 @@
{
switch (received.Name)
{
- case "Remote Button":
+ case "Remote Event":
+ case "Keyboard Event":
+ case "Mouse Event":
break;
case "Blast Success":
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -33,7 +33,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.2")]
-[assembly: AssemblyFileVersion("1.0.3.2")]
+[assembly: AssemblyVersion("1.0.3.3")]
+[assembly: AssemblyFileVersion("1.0.3.3")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-02 15:40:55 UTC (rev 784)
@@ -120,10 +120,6 @@
<Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project>
<Name>IrssUtils</Name>
</ProjectReference>
- <ProjectReference Include="..\..\Common\MPUtils\MPUtils.csproj">
- <Project>{08F57DD7-2C6E-484E-9CC5-835F70C5BC64}</Project>
- <Name>MPUtils</Name>
- </ProjectReference>
<ProjectReference Include="..\..\IPC\Named Pipes\Named Pipes.csproj">
<Project>{F4EA6055-7133-4F18-8971-E19ADEB482C1}</Project>
<Name>Named Pipes</Name>
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -46,7 +46,7 @@
#region Constants
- public static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml";
+ static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml";
#endregion Constants
@@ -98,7 +98,7 @@
/// <summary>
/// Start the server
/// </summary>
- /// <returns>success</returns>
+ /// <returns>success.</returns>
internal bool Start()
{
try
@@ -202,7 +202,11 @@
}
if (_pluginReceive != null && _pluginReceive.CanReceive)
- _pluginReceive.RemoteButtonCallback += new RemoteButtonHandler(RemoteButtonPressed);
+ {
+ _pluginReceive.RemoteCallback += new RemoteHandler(RemoteHandlerCallback);
+ _pluginReceive.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback);
+ _pluginReceive.MouseCallback += new MouseHandler(MouseHandlerCallback);
+ }
_notifyIcon.Visible = true;
@@ -233,7 +237,11 @@
}
if (_pluginReceive != null && _pluginReceive.CanReceive)
- _pluginReceive.RemoteButtonCallback -= new RemoteButtonHandler(RemoteButtonPressed);
+ {
+ _pluginReceive.RemoteCallback -= new RemoteHandler(RemoteHandlerCallback);
+ _pluginReceive.KeyboardCallback -= new KeyboardHandler(KeyboardHandlerCallback);
+ _pluginReceive.MouseCallback -= new MouseHandler(MouseHandlerCallback);
+ }
// Stop Plugin(s)
try
@@ -486,36 +494,102 @@
catch { }
}
- void RemoteButtonPressed(string keyCode)
+ void RemoteHandlerCallback(string keyCode)
{
- IrssLog.Debug("Remote Button Pressed: {0}", keyCode);
-
+ IrssLog.Debug("Remote Event: {0}", keyCode);
+
byte[] bytes = Encoding.ASCII.GetBytes(keyCode);
switch (_mode)
{
case IRServerMode.ServerMode:
{
- PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Button", bytes);
+ PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Event", bytes);
SendToAll(message);
break;
}
case IRServerMode.RelayMode:
{
- PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Button", bytes);
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Remote Event", bytes);
SendTo(Common.ServerPipeName, _hostComputer, message);
break;
}
case IRServerMode.RepeaterMode:
{
- IrssLog.Debug("Remote button press ignored, IR Server is in Repeater Mode.");
+ IrssLog.Debug("Remote event ignored, IR Server is in Repeater Mode.");
break;
}
}
}
+ void KeyboardHandlerCallback(int vKey, bool keyUp)
+ {
+ IrssLog.Debug("Keyboard Event: {0}, keyUp: {1}", vKey, keyUp);
+
+ byte[] bytes = new byte[8];
+ BitConverter.GetBytes(vKey).CopyTo(bytes, 0);
+ BitConverter.GetBytes(keyUp).CopyTo(bytes, 4);
+
+ switch (_mode)
+ {
+ case IRServerMode.ServerMode:
+ {
+ PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Keyboard Event", bytes);
+ SendToAll(message);
+ break;
+ }
+
+ case IRServerMode.RelayMode:
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Keyboard Event", bytes);
+ SendTo(Common.ServerPipeName, _hostComputer, message);
+ break;
+ }
+
+ case IRServerMode.RepeaterMode:
+ {
+ IrssLog.Debug("Keyboard event ignored, IR Server is in Repeater Mode.");
+ break;
+ }
+ }
+ }
+
+ void MouseHandlerCallback(int deltaX, int deltaY, int buttons)
+ {
+ IrssLog.Debug("Mouse Event - deltaX: {0}, deltaY: {1}, buttons: {2}", deltaX, deltaY, buttons);
+
+ byte[] bytes = new byte[12];
+ BitConverter.GetBytes(deltaX).CopyTo(bytes, 0);
+ BitConverter.GetBytes(deltaY).CopyTo(bytes, 4);
+ BitConverter.GetBytes(buttons).CopyTo(bytes, 8);
+
+ switch (_mode)
+ {
+ case IRServerMode.ServerMode:
+ {
+ PipeMessage message = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Mouse Event", bytes);
+ SendToAll(message);
+ break;
+ }
+
+ case IRServerMode.RelayMode:
+ {
+ PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Forward Mouse Event", bytes);
+ SendTo(Common.ServerPipeName, _hostComputer, message);
+ break;
+ }
+
+ case IRServerMode.RepeaterMode:
+ {
+ IrssLog.Debug("Mouse event ignored, IR Server is in Repeater Mode.");
+ break;
+ }
+ }
+ }
+
+
void SendToAll(PipeMessage message)
{
IrssLog.Debug("SendToAll({0})", message.ToString());
@@ -814,28 +888,14 @@
}
byte[] data = null;
- FileStream fileStream = null;
try
{
- string tempFile = Path.GetTempFileName();
-
- LearnStatus status = _pluginTransmit.Learn(tempFile);
+ LearnStatus status = _pluginTransmit.Learn(out data);
switch (status)
{
case LearnStatus.Success:
- fileStream = new FileStream(tempFile, FileMode.Open);
-
- if (fileStream != null && fileStream.Length != 0)
- {
- data = new byte[fileStream.Length];
- fileStream.Read(data, 0, (int)fileStream.Length);
- }
-
- fileStream.Close();
- fileStream = null;
-
- File.Delete(tempFile);
+ IrssLog.Info("Learn IR success");
break;
case LearnStatus.Failure:
@@ -850,9 +910,6 @@
catch (Exception ex)
{
IrssLog.Error(ex.ToString());
-
- if (fileStream != null)
- fileStream.Close();
}
return data;
@@ -866,7 +923,9 @@
{
switch (received.Name)
{
- case "Remote Button":
+ case "Remote Event":
+ case "Keyboard Event":
+ case "Mouse Event":
break;
case "Register Success":
@@ -883,9 +942,9 @@
break;
}
- case "Forward Remote Button":
+ case "Forward Remote Event":
{
- PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Button", received.Data);
+ PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Remote Event", received.Data);
if (_mode == IRServerMode.RelayMode)
{
forward.Name = received.Name;
@@ -898,6 +957,36 @@
break;
}
+ case "Forward Keyboard Event":
+ {
+ PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Keyboard Event", received.Data);
+ if (_mode == IRServerMode.RelayMode)
+ {
+ forward.Name = received.Name;
+ SendTo(Common.ServerPipeName, _hostComputer, forward);
+ }
+ else
+ {
+ SendToAllExcept(received.FromPipe, received.FromServer, forward);
+ }
+ break;
+ }
+
+ case "Forward Mouse Event":
+ {
+ PipeMessage forward = new PipeMessage(Common.ServerPipeName, Environment.MachineName, "Mouse Event", received.Data);
+ if (_mode == IRServerMode.RelayMode)
+ {
+ forward.Name = received.Name;
+ SendTo(Common.ServerPipeName, _hostComputer, forward);
+ }
+ else
+ {
+ SendToAllExcept(received.FromPipe, received.FromServer, forward);
+ }
+ break;
+ }
+
case "List":
{
if (_mode != IRServerMode.RelayMode)
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -34,8 +34,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.3.2")]
-[assembly: AssemblyFileVersion("1.0.3.2")]
+[assembly: AssemblyVersion("1.0.3.3")]
+[assembly: AssemblyFileVersion("1.0.3.3")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -9,7 +9,10 @@
namespace Translator
{
-
+
+ /// <summary>
+ /// Translator configuration.
+ /// </summary>
[XmlRoot]
public class Configuration
{
@@ -26,6 +29,9 @@
#region Properties
+ /// <summary>
+ /// IR Server host.
+ /// </summary>
[XmlElement]
public string ServerHost
{
@@ -33,6 +39,9 @@
set { _serverHost = value; }
}
+ /// <summary>
+ /// System wide button mappings.
+ /// </summary>
[XmlArray]
public List<ButtonMapping> SystemWideMappings
{
@@ -40,6 +49,9 @@
set { _systemWideMappings = value; }
}
+ /// <summary>
+ /// Program settings.
+ /// </summary>
[XmlArray]
public List<ProgramSettings> Programs
{
@@ -47,6 +59,9 @@
set { _programSettings = value; }
}
+ /// <summary>
+ /// Mapped events.
+ /// </summary>
[XmlArray]
public List<MappedEvent> Events
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -431,7 +431,7 @@
}
else if (radioButtonWindowTitle.Checked)
{
- WindowList windowList = new WindowList();
+ IrssUtils.Forms.WindowList windowList = new IrssUtils.Forms.WindowList();
if (windowList.ShowDialog(this) == DialogResult.OK)
textBoxMsgTarget.Text = windowList.SelectedWindowTitle;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -46,13 +46,16 @@
this.comboBoxWindowStyle = new System.Windows.Forms.ComboBox();
this.labelWindowStyle = new System.Windows.Forms.Label();
this.checkBoxIgnoreSystemWide = new System.Windows.Forms.CheckBox();
+ this.checkBoxForceFocus = new System.Windows.Forms.CheckBox();
+ this.groupBoxOptions = new System.Windows.Forms.GroupBox();
+ this.groupBoxOptions.SuspendLayout();
this.SuspendLayout();
//
// textBoxApp
//
this.textBoxApp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxApp.Location = new System.Drawing.Point(8, 56);
+ this.textBoxApp.Location = new System.Drawing.Point(8, 72);
this.textBoxApp.Name = "textBoxApp";
this.textBoxApp.Size = new System.Drawing.Size(336, 20);
this.textBoxApp.TabIndex = 3;
@@ -60,7 +63,7 @@
// buttonLocate
//
this.buttonLocate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonLocate.Location = new System.Drawing.Point(352, 56);
+ this.buttonLocate.Location = new System.Drawing.Point(352, 72);
this.buttonLocate.Name = "buttonLocate";
this.buttonLocate.Size = new System.Drawing.Size(24, 20);
this.buttonLocate.TabIndex = 4;
@@ -72,7 +75,7 @@
//
this.labelApplication.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelApplication.Location = new System.Drawing.Point(8, 40);
+ this.labelApplication.Location = new System.Drawing.Point(8, 56);
this.labelApplication.Name = "labelApplication";
this.labelApplication.Size = new System.Drawing.Size(336, 16);
this.labelApplication.TabIndex = 2;
@@ -80,27 +83,28 @@
//
// labelAppDisplayName
//
+ this.labelAppDisplayName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelAppDisplayName.Location = new System.Drawing.Point(8, 8);
this.labelAppDisplayName.Name = "labelAppDisplayName";
- this.labelAppDisplayName.Size = new System.Drawing.Size(144, 20);
+ this.labelAppDisplayName.Size = new System.Drawing.Size(368, 16);
this.labelAppDisplayName.TabIndex = 0;
this.labelAppDisplayName.Text = "Application display name:";
- this.labelAppDisplayName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBoxDisplayName
//
this.textBoxDisplayName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxDisplayName.Location = new System.Drawing.Point(152, 8);
+ this.textBoxDisplayName.Location = new System.Drawing.Point(8, 24);
this.textBoxDisplayName.Name = "textBoxDisplayName";
- this.textBoxDisplayName.Size = new System.Drawing.Size(224, 20);
+ this.textBoxDisplayName.Size = new System.Drawing.Size(368, 20);
this.textBoxDisplayName.TabIndex = 1;
//
// labelStartupFolder
//
this.labelStartupFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartupFolder.Location = new System.Drawing.Point(8, 88);
+ this.labelStartupFolder.Location = new System.Drawing.Point(8, 104);
this.labelStartupFolder.Name = "labelStartupFolder";
this.labelStartupFolder.Size = new System.Drawing.Size(336, 16);
this.labelStartupFolder.TabIndex = 5;
@@ -109,7 +113,7 @@
// buttonStartupFolder
//
this.buttonStartupFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartupFolder.Location = new System.Drawing.Point(352, 104);
+ this.buttonStartupFolder.Location = new System.Drawing.Point(352, 120);
this.buttonStartupFolder.Name = "buttonStartupFolder";
this.buttonStartupFolder.Size = new System.Drawing.Size(24, 20);
this.buttonStartupFolder.TabIndex = 7;
@@ -121,7 +125,7 @@
//
this.textBoxAppStartFolder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxAppStartFolder.Location = new System.Drawing.Point(8, 104);
+ this.textBoxAppStartFolder.Location = new System.Drawing.Point(8, 120);
this.textBoxAppStartFolder.Name = "textBoxAppStartFolder";
this.textBoxAppStartFolder.Size = new System.Drawing.Size(336, 20);
this.textBoxAppStartFolder.TabIndex = 6;
@@ -130,7 +134,7 @@
//
this.labelAppParams.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelAppParams.Location = new System.Drawing.Point(8, 136);
+ this.labelAppParams.Location = new System.Drawing.Point(8, 152);
this.labelAppParams.Name = "labelAppParams";
this.labelAppParams.Size = new System.Drawing.Size(368, 16);
this.labelAppParams.TabIndex = 8;
@@ -140,7 +144,7 @@
//
this.textBoxApplicationParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxApplicationParameters.Location = new System.Drawing.Point(8, 152);
+ this.textBoxApplicationParameters.Location = new System.Drawing.Point(8, 168);
this.textBoxApplicationParameters.Name = "textBoxApplicationParameters";
this.textBoxApplicationParameters.Size = new System.Drawing.Size(368, 20);
this.textBoxApplicationParameters.TabIndex = 9;
@@ -148,10 +152,10 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(224, 248);
+ this.buttonOK.Location = new System.Drawing.Point(224, 336);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(72, 24);
- this.buttonOK.TabIndex = 15;
+ this.buttonOK.TabIndex = 14;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -160,10 +164,10 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(304, 248);
+ this.buttonCancel.Location = new System.Drawing.Point(304, 336);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(72, 24);
- this.buttonCancel.TabIndex = 16;
+ this.buttonCancel.TabIndex = 15;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -171,20 +175,20 @@
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonTest.Location = new System.Drawing.Point(8, 248);
+ this.buttonTest.Location = new System.Drawing.Point(8, 336);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(72, 24);
- this.buttonTest.TabIndex = 14;
+ this.buttonTest.TabIndex = 13;
this.buttonTest.Text = "Test";
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
//
// checkBoxShellExecute
//
- this.checkBoxShellExecute.Location = new System.Drawing.Point(8, 216);
+ this.checkBoxShellExecute.Location = new System.Drawing.Point(16, 24);
this.checkBoxShellExecute.Name = "checkBoxShellExecute";
this.checkBoxShellExecute.Size = new System.Drawing.Size(176, 24);
- this.checkBoxShellExecute.TabIndex = 12;
+ this.checkBoxShellExecute.TabIndex = 0;
this.checkBoxShellExecute.Text = "Start using ShellExecute";
this.checkBoxShellExecute.UseVisualStyleBackColor = true;
//
@@ -194,7 +198,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxWindowStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxWindowStyle.FormattingEnabled = true;
- this.comboBoxWindowStyle.Location = new System.Drawing.Point(96, 184);
+ this.comboBoxWindowStyle.Location = new System.Drawing.Point(96, 200);
this.comboBoxWindowStyle.MaxDropDownItems = 4;
this.comboBoxWindowStyle.Name = "comboBoxWindowStyle";
this.comboBoxWindowStyle.Size = new System.Drawing.Size(152, 21);
@@ -202,7 +206,7 @@
//
// labelWindowStyle
//
- this.labelWindowStyle.Location = new System.Drawing.Point(8, 184);
+ this.labelWindowStyle.Location = new System.Drawing.Point(8, 200);
this.labelWindowStyle.Name = "labelWindowStyle";
this.labelWindowStyle.Size = new System.Drawing.Size(88, 21);
this.labelWindowStyle.TabIndex = 10;
@@ -211,22 +215,44 @@
//
// checkBoxIgnoreSystemWide
//
- this.checkBoxIgnoreSystemWide.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.checkBoxIgnoreSystemWide.Location = new System.Drawing.Point(200, 216);
+ this.checkBoxIgnoreSystemWide.Location = new System.Drawing.Point(16, 56);
this.checkBoxIgnoreSystemWide.Name = "checkBoxIgnoreSystemWide";
this.checkBoxIgnoreSystemWide.Size = new System.Drawing.Size(176, 24);
- this.checkBoxIgnoreSystemWide.TabIndex = 13;
+ this.checkBoxIgnoreSystemWide.TabIndex = 2;
this.checkBoxIgnoreSystemWide.Text = "Ignore System-Wide mappings";
this.checkBoxIgnoreSystemWide.UseVisualStyleBackColor = true;
//
+ // checkBoxForceFocus
+ //
+ this.checkBoxForceFocus.Location = new System.Drawing.Point(208, 24);
+ this.checkBoxForceFocus.Name = "checkBoxForceFocus";
+ this.checkBoxForceFocus.Size = new System.Drawing.Size(152, 24);
+ this.checkBoxForceFocus.TabIndex = 1;
+ this.checkBoxForceFocus.Text = "Force window focus";
+ this.checkBoxForceFocus.UseVisualStyleBackColor = true;
+ //
+ // groupBoxOptions
+ //
+ this.groupBoxOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxOptions.Controls.Add(this.checkBoxShellExecute);
+ this.groupBoxOptions.Controls.Add(this.checkBoxForceFocus);
+ this.groupBoxOptions.Controls.Add(this.checkBoxIgnoreSystemWide);
+ this.groupBoxOptions.Location = new System.Drawing.Point(8, 232);
+ this.groupBoxOptions.Name = "groupBoxOptions";
+ this.groupBoxOptions.Size = new System.Drawing.Size(368, 88);
+ this.groupBoxOptions.TabIndex = 12;
+ this.groupBoxOptions.TabStop = false;
+ this.groupBoxOptions.Text = "Options";
+ //
// EditProgramForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(384, 281);
- this.Controls.Add(this.checkBoxIgnoreSystemWide);
+ this.ClientSize = new System.Drawing.Size(384, 369);
+ this.Controls.Add(this.groupBoxOptions);
this.Controls.Add(this.buttonTest);
- this.Controls.Add(this.checkBoxShellExecute);
this.Controls.Add(this.comboBoxWindowStyle);
this.Controls.Add(this.labelWindowStyle);
this.Controls.Add(this.buttonCancel);
@@ -248,6 +274,7 @@
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Application";
+ this.groupBoxOptions.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -272,5 +299,7 @@
private System.Windows.Forms.ComboBox comboBoxWindowStyle;
private System.Windows.Forms.Label labelWindowStyle;
private System.Windows.Forms.CheckBox checkBoxIgnoreSystemWide;
+ private System.Windows.Forms.CheckBox checkBoxForceFocus;
+ private System.Windows.Forms.GroupBox groupBoxOptions;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -6,6 +6,7 @@
using System.Drawing;
using System.IO;
using System.Text;
+using System.Threading;
using System.Windows.Forms;
using IrssUtils;
@@ -48,6 +49,11 @@
get { return checkBoxShellExecute.Checked; }
set { checkBoxShellExecute.Checked = value; }
}
+ public bool ForceWindowFocus
+ {
+ get { return checkBoxForceFocus.Checked; }
+ set { checkBoxForceFocus.Checked = value; }
+ }
public bool IgnoreSystemWide
{
get { return checkBoxIgnoreSystemWide.Checked; }
@@ -66,13 +72,14 @@
if (progSettings != null)
{
- DisplayName = progSettings.Name;
- Filename = progSettings.Filename;
- StartupFolder = progSettings.Folder;
- Parameters = progSettings.Arguments;
- StartState = progSettings.WindowState;
- UseShellExecute = progSettings.UseShellExecute;
- IgnoreSystemWide = progSettings.IgnoreSystemWide;
+ DisplayName = progSettings.Name;
+ Filename = progSettings.Filename;
+ StartupFolder = progSettings.Folder;
+ Parameters = progSettings.Arguments;
+ StartState = progSettings.WindowState;
+ UseShellExecute = progSettings.UseShellExecute;
+ ForceWindowFocus = progSettings.ForceWindowFocus;
+ IgnoreSystemWide = progSettings.IgnoreSystemWide;
}
}
@@ -114,15 +121,33 @@
try
{
Process process = new Process();
- process.StartInfo.FileName = Filename;
- process.StartInfo.WorkingDirectory = StartupFolder;
- process.StartInfo.Arguments = Parameters;
- process.StartInfo.WindowStyle = StartState;
- process.StartInfo.UseShellExecute = UseShellExecute;
+ process.StartInfo.FileName = Filename;
+ process.StartInfo.WorkingDirectory = StartupFolder;
+ process.StartInfo.Arguments = Parameters;
+ process.StartInfo.WindowStyle = StartState;
+ process.StartInfo.UseShellExecute = UseShellExecute;
IrssLog.Info("Launching program {0}", DisplayName);
process.Start();
+
+ // Give new process focus ...
+ if (StartState != ProcessWindowStyle.Hidden && ForceWindowFocus)
+ {
+ IntPtr processWindow = IntPtr.Zero;
+ while (!process.HasExited)
+ {
+ processWindow = process.MainWindowHandle;
+ if (processWindow != IntPtr.Zero)
+ {
+ Win32.SetForegroundWindow(processWindow);
+ break;
+ }
+
+ Thread.Sleep(500);
+ }
+ }
+
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -61,7 +61,7 @@
{
PipeMessage received = PipeMessage.FromString(message);
- if (received.Name == "Remote Button")
+ if (received.Name == "Remote Event")
{
_keyCode = Encoding.ASCII.GetString(received.Data);
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -20,7 +20,7 @@
#region Enumerations
/// <summary>
- /// A list of MCE remote buttons
+ /// A list of MCE remote buttons.
/// </summary>
public enum MceButton
{
@@ -881,7 +881,7 @@
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
- MessageBox.Show(this, "Translator\nVersion 1.0.3.2 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ MessageBox.Show(this, "Translator\nVersion 1.0.3.3 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
#endregion Menu
Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.Designer.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -1,70 +0,0 @@
-namespace Translator
-{
- partial class WindowList
- {
- /// <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.listBoxWindows = new System.Windows.Forms.ListBox();
- this.SuspendLayout();
- //
- // listBoxWindows
- //
- this.listBoxWindows.Dock = System.Windows.Forms.DockStyle.Fill;
- this.listBoxWindows.FormattingEnabled = true;
- this.listBoxWindows.HorizontalScrollbar = true;
- this.listBoxWindows.IntegralHeight = false;
- this.listBoxWindows.Location = new System.Drawing.Point(0, 0);
- this.listBoxWindows.Name = "listBoxWindows";
- this.listBoxWindows.Size = new System.Drawing.Size(292, 376);
- this.listBoxWindows.TabIndex = 0;
- this.listBoxWindows.DoubleClick += new System.EventHandler(this.listBoxWindows_DoubleClick);
- this.listBoxWindows.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.listBoxWindows_KeyPress);
- //
- // WindowList
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(292, 376);
- this.Controls.Add(this.listBoxWindows);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "WindowList";
- this.ShowIcon = false;
- this.ShowInTaskbar = false;
- this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Window List";
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.ListBox listBoxWindows;
- }
-}
\ No newline at end of file
Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -1,83 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Runtime.InteropServices;
-using System.Text;
-using System.Windows.Forms;
-
-namespace Translator
-{
-
- public partial class WindowList : Form
- {
-
- #region Interop
-
- public delegate bool EnumWindowsProc(int hWnd, int lParam);
-
- [DllImport("user32.dll")]
- private static extern int GetWindowText(int hWnd, StringBuilder title, int size);
-
- [DllImport("user32.dll")]
- private static extern int EnumWindows(EnumWindowsProc ewp, int lParam);
-
- #endregion Interop
-
- #region Properties
-
- public string SelectedWindowTitle
- {
- get { return listBoxWindows.SelectedItem as string; }
- }
-
- #endregion Properties
-
- #region Constructor
-
- public WindowList()
- {
- InitializeComponent();
-
- PopulateList();
- }
-
- #endregion Constructor
-
- void PopulateList()
- {
- EnumWindowsProc ewp = new EnumWindowsProc(AddWindow);
-
- EnumWindows(ewp, 0);
- }
-
- bool AddWindow(int hWnd, int lParam)
- {
- StringBuilder title = new StringBuilder(256);
- GetWindowText(hWnd, title, 256);
-
- if (title.Length != 0)
- listBoxWindows.Items.Add(title.ToString());
-
- return true;
- }
-
- private void listBoxWindows_DoubleClick(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
-
- private void listBoxWindows_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == 27)
- {
- this.DialogResult = DialogResult.Cancel;
- this.Close();
- }
- }
-
- }
-
-}
Deleted: trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/WindowList.resx 2007-08-02 15:40:55 UTC (rev 784)
@@ -1,120 +0,0 @@
-<?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
Modified: trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs 2007-08-02 00:09:20 UTC (rev 783)
+++ trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs 2007-08-02 15:40:55 UTC (rev 784)
@@ -9,72 +9,24 @@
#region Enumerations
/// <summary>
- /// A list of events that can be mapped in the Event Mapper
+ /// A list of events that can be mapped in the Event Mapper.
/// </summary>
public enum MappingEvent
{
None,
- //Time_Schedule,
- //Program_Launch,
Translator_Start,
Translator_Quit,
PC_Shutdown,
PC_Suspend,
PC_Resume,
PC_Logoff,
+ Scheduled_Event,
}
- #region TODO
- /*
- public enum ScheduleRepeatDelay
- {
- // Repeat
- In_1_Minute,
- In_5_Minutes,
- In_10_Minutes,
- In_15_Minutes,
- In_30_Minutes,
- In_45_Minutes,
- In_1_Hour,
- In_2_Hours,
- In_6_Hours,
- In_12_Hours,
- In_24_Hours,
- In_48_Hours,
- In_7_Days,
- In_14_Days,
- In_21_Days,
- In_28_Days,
- In_60_Days,
- In_365_Days,
-
- // When
- At_Noon,
- At_Midnight,
- At_6_AM,
- At_6_PM,
-
- // Repeat?
- Weekdays,
- Weekends,
- Mondays,
- Tuesdays,
- Wednesdays,
- Thursdays,
- Fridays,
- Saturdays,
- Sundays,
-
-
- }
- */
-
- #endregion TODO
-
#endregion Enumerations
/// <summary>
- /// MappedEvent class is used to pass events into the Event Mapper feature
+ /// MappedEvent class is used to pass events into the Event Mapper feature.
/// </summary>
public class MappedEvent
{
@@ -83,13 +35,15 @@
MappingEvent _eventType;
string _command;
-
+
+ //EventSchedule _schedule;
+
#endregion Variables
#region Properties
/// <summary>
- /// Type of event
+ /// Type of event.
/// </summary>
[XmlAttribute]
public MappingEvent EventType
@@ -99,7 +53,7 @@
}
/// <summary>
- /// Command to execute when mapped event occurs
+ /// Command to execute when mapped event occurs.
/// </summary>
[XmlAttribute]
public string Command
@@ -113,15 +67,15 @@
#region Constructors
/// <summary>
- /// Default constructor
+ /// Default constructor.
/// </summary>
public MappedEvent() : this(MappingEvent.None, String.Empty) { }
/// <summary>
- /// Used to run the Event Mapper
+ /// Used to run the Event Mapper.
/// </summary>
- /// <param name="eventType">Event to act on</param>
- /// <param name="command">Command to execute when event occurs</param>
+ /// <param name="eventType">Event to act on.</param>
+ /// <param name="command">Command to execute when event occurs.</param...
[truncated message content] |
|
From: <an...@us...> - 2007-08-03 16:49:09
|
Revision: 788
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=788&view=rev
Author: and-81
Date: 2007-08-03 09:49:07 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs
trunk/plugins/IR Server Suite/Applications/Translator/Configuration.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/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceReplacementTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx
Removed Paths:
-------------
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Program.cs
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -85,8 +85,11 @@
// Setup taskbar icon
_notifyIcon = new NotifyIcon();
_notifyIcon.ContextMenuStrip = new ContextMenuStrip();
- _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup)));
- _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
+
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripLabel("IR Server"));
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator());
+ _notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(ClickSetup));
+ _notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(ClickQuit));
_notifyIcon.Icon = Properties.Resources.Icon16;
_notifyIcon.Text = "IR Server";
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/ButtonMapping.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -5,6 +5,9 @@
namespace Translator
{
+ /// <summary>
+ /// Stores the relevant information for mapping a remote button to a command.
+ /// </summary>
public class ButtonMapping
{
@@ -18,6 +21,9 @@
#region Properties
+ /// <summary>
+ /// Remote button key code.
+ /// </summary>
[XmlAttribute]
public string KeyCode
{
@@ -25,6 +31,9 @@
set { _keyCode = value; }
}
+ /// <summary>
+ /// Remote button description.
+ /// </summary>
[XmlAttribute]
public string Description
{
@@ -32,6 +41,9 @@
set { _description = value; }
}
+ /// <summary>
+ /// Command to execute for the remote button.
+ /// </summary>
[XmlAttribute]
public string Command
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Configuration.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -84,7 +84,7 @@
#endregion Constructors
- #region Methods
+ #region Static Methods
/// <summary>
/// Save the supplied configuration to file.
@@ -129,7 +129,7 @@
}
}
- #endregion Methods
+ #endregion Static Methods
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -173,6 +173,9 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.tabPageMisc = new System.Windows.Forms.TabPage();
+ this.labelMiscCommand = new System.Windows.Forms.Label();
+ this.comboBoxMiscCommand = new System.Windows.Forms.ComboBox();
this.groupBoxButton.SuspendLayout();
this.groupBoxSet.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -196,6 +199,7 @@
this.groupBoxMouseClick.SuspendLayout();
this.groupBoxMouseMove.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).BeginInit();
+ this.tabPageMisc.SuspendLayout();
this.SuspendLayout();
//
// groupBoxButton
@@ -307,6 +311,7 @@
this.tabControl.Controls.Add(this.tabPageMessage);
this.tabControl.Controls.Add(this.tabPageKeystrokes);
this.tabControl.Controls.Add(this.tabPageMouse);
+ this.tabControl.Controls.Add(this.tabPageMisc);
this.tabControl.Location = new System.Drawing.Point(8, 24);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
@@ -1671,6 +1676,36 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
+ // tabPageMisc
+ //
+ this.tabPageMisc.Controls.Add(this.labelMiscCommand);
+ this.tabPageMisc.Controls.Add(this.comboBoxMiscCommand);
+ this.tabPageMisc.Location = new System.Drawing.Point(4, 22);
+ this.tabPageMisc.Name = "tabPageMisc";
+ this.tabPageMisc.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageMisc.Size = new System.Drawing.Size(432, 206);
+ this.tabPageMisc.TabIndex = 7;
+ this.tabPageMisc.Text = "Misc";
+ this.tabPageMisc.UseVisualStyleBackColor = true;
+ //
+ // labelMiscCommand
+ //
+ this.labelMiscCommand.Location = new System.Drawing.Point(8, 16);
+ this.labelMiscCommand.Name = "labelMiscCommand";
+ this.labelMiscCommand.Size = new System.Drawing.Size(88, 21);
+ this.labelMiscCommand.TabIndex = 0;
+ this.labelMiscCommand.Text = "Command:";
+ this.labelMiscCommand.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // comboBoxMiscCommand
+ //
+ this.comboBoxMiscCommand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxMiscCommand.FormattingEnabled = true;
+ this.comboBoxMiscCommand.Location = new System.Drawing.Point(96, 16);
+ this.comboBoxMiscCommand.Name = "comboBoxMiscCommand";
+ this.comboBoxMiscCommand.Size = new System.Drawing.Size(328, 21);
+ this.comboBoxMiscCommand.TabIndex = 1;
+ //
// ButtonMappingForm
//
this.AcceptButton = this.buttonOK;
@@ -1719,6 +1754,7 @@
this.groupBoxMouseClick.ResumeLayout(false);
this.groupBoxMouseMove.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseMove)).EndInit();
+ this.tabPageMisc.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -1868,6 +1904,9 @@
private System.Windows.Forms.ToolStripMenuItem altToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem controlToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem shiftToolStripMenuItem;
+ private System.Windows.Forms.TabPage tabPageMisc;
+ private System.Windows.Forms.Label labelMiscCommand;
+ private System.Windows.Forms.ComboBox comboBoxMiscCommand;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -49,9 +49,9 @@
{
InitializeComponent();
- _keyCode = keyCode;
- _description = description;
- _command = command;
+ _keyCode = keyCode;
+ _description = description;
+ _command = command;
}
#endregion Constructors
@@ -130,12 +130,27 @@
comboBoxWindowStyle.Items.AddRange(Enum.GetNames(typeof(ProcessWindowStyle)));
comboBoxWindowStyle.SelectedIndex = 0;
+ // Setup Misc tab
+ comboBoxMiscCommand.Items.Clear();
+ comboBoxMiscCommand.Items.Add(Common.UITextEject);
+ comboBoxMiscCommand.Items.Add(Common.UITextStandby);
+ comboBoxMiscCommand.Items.Add(Common.UITextHibernate);
+ comboBoxMiscCommand.Items.Add(Common.UITextReboot);
+ comboBoxMiscCommand.Items.Add(Common.UITextShutdown);
+
+
if (!String.IsNullOrEmpty(_command))
{
+ string prefix = _command;
+ string suffix = String.Empty;
+
int find = _command.IndexOf(": ");
- string prefix = _command.Substring(0, find + 2);
- string suffix = _command.Substring(find + 2);
+ if (find != -1)
+ {
+ prefix = _command.Substring(0, find + 2);
+ suffix = _command.Substring(find + 2);
+ }
switch (prefix)
{
@@ -242,6 +257,25 @@
}
break;
}
+
+ default:
+ {
+ tabControl.SelectTab(tabPageMisc);
+ switch (_command)
+ {
+ case Common.CmdPrefixHibernate:
+ comboBoxMiscCommand.SelectedItem = Common.UITextHibernate;
+ break;
+
+ default:
+ if (prefix.Equals(Common.CmdPrefixEject, StringComparison.InvariantCultureIgnoreCase))
+ {
+ comboBoxMiscCommand.SelectedItem = Common.UITextEject;
+ }
+ break;
+ }
+ break;
+ }
}
}
@@ -393,6 +427,28 @@
textBoxCommand.Text = _command = newCommand.ToString();
break;
}
+
+ case "tabPageMisc":
+ {
+ string newCommand = comboBoxMiscCommand.SelectedItem as string;
+
+ switch (newCommand)
+ {
+ case Common.UITextEject:
+ textBoxCommand.Text = _command = Common.CmdPrefixEject;
+ break;
+
+ case Common.UITextHibernate:
+ textBoxCommand.Text = _command = Common.CmdPrefixHibernate;
+ break;
+
+
+ }
+
+
+
+ break;
+ }
}
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -46,6 +46,8 @@
comboBoxCommands.Items.Add(Common.UITextWindowMsg);
comboBoxCommands.Items.Add(Common.UITextTcpMsg);
comboBoxCommands.Items.Add(Common.UITextKeys);
+ comboBoxCommands.Items.Add(Common.UITextEject);
+
//TODO: Add Shutdown and Reboot
comboBoxCommands.Items.Add(Common.UITextStandby);
comboBoxCommands.Items.Add(Common.UITextHibernate);
@@ -105,6 +107,11 @@
writer.WriteAttributeString("command", Common.XmlTagKeys);
writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixKeys.Length));
}
+ else if (item.StartsWith(Common.CmdPrefixEject))
+ {
+ writer.WriteAttributeString("command", Common.XmlTagEject);
+ writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixEject.Length));
+ }
else if (item.StartsWith(Common.CmdPrefixStandby))
{
writer.WriteAttributeString("command", Common.XmlTagStandby);
@@ -172,6 +179,10 @@
listBoxMacro.Items.Add(Common.CmdPrefixKeys + commandProperty);
break;
+ case Common.XmlTagEject:
+ listBoxMacro.Items.Add(Common.CmdPrefixEject + commandProperty);
+ break;
+
case Common.XmlTagStandby:
listBoxMacro.Items.Add(Common.CmdPrefixStandby);
break;
@@ -250,6 +261,14 @@
listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString);
}
+ else if (selected == Common.UITextEject)
+ {
+ EjectCommand ejectCommand = new EjectCommand();
+ if (ejectCommand.ShowDialog(this) == DialogResult.Cancel)
+ return;
+
+ listBoxMacro.Items.Add(Common.CmdPrefixEject + ejectCommand.CommandString);
+ }
else if (selected == Common.UITextStandby)
{
listBoxMacro.Items.Add(Common.CmdPrefixStandby);
@@ -422,6 +441,17 @@
listBoxMacro.Items.Insert(index, Common.CmdPrefixKeys + keysCommand.CommandString);
listBoxMacro.SelectedIndex = index;
}
+ else if (selected.StartsWith(Common.CmdPrefixEject))
+ {
+ EjectCommand ejectCommand = new EjectCommand(selected.Substring(Common.CmdPrefixEject.Length));
+ if (ejectCommand.ShowDialog(this) == DialogResult.Cancel)
+ return;
+
+ int index = listBoxMacro.SelectedIndex;
+ listBoxMacro.Items.RemoveAt(index);
+ listBoxMacro.Items.Insert(index, Common.CmdPrefixEject + ejectCommand.CommandString);
+ listBoxMacro.SelectedIndex = index;
+ }
else if (selected.StartsWith(Common.CmdPrefixBlast))
{
string[] commands = Common.SplitBlastCommand(selected.Substring(Common.CmdPrefixBlast.Length));
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -194,6 +194,8 @@
string[] macroList = Program.GetMacroList(false);
if (macroList != null && macroList.Length > 0)
listBoxMacro.Items.AddRange(macroList);
+
+ Program.UpdateNotifyMenu();
}
List<ButtonMapping> GetCurrentSettings()
@@ -307,6 +309,35 @@
Configuration.Save(Program.Config, Program.ConfigFile);
}
+ protected override void WndProc(ref Message m)
+ {
+ try
+ {
+ if (m.Msg == (int)Win32.WindowsMessage.WM_COPYDATA)
+ {
+ IrssLog.Info("Received WM_COPYDATA message");
+
+ Win32.COPYDATASTRUCT dataStructure = (Win32.COPYDATASTRUCT)m.GetLParam(typeof(Win32.COPYDATASTRUCT));
+
+ if (dataStructure.dwData != 24)
+ return;
+
+ byte[] dataBytes = new byte[dataStructure.cbData];
+ IntPtr lpData = new IntPtr(dataStructure.lpData);
+ System.Runtime.InteropServices.Marshal.Copy(lpData, dataBytes, 0, dataStructure.cbData);
+ string strData = Encoding.Default.GetString(dataBytes);
+
+ Program.ProcessCommand(strData);
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ base.WndProc(ref m);
+ }
+
#region Controls
private void listViewButtons_DoubleClick(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.IO.Ports;
@@ -111,6 +112,10 @@
static TransceiverInfo _transceiverInfo = new TransceiverInfo();
+ //static Thread _focusWatcher;
+ static IntPtr _ownWindowHandle = IntPtr.Zero;
+ static IntPtr _currentForegroundWindow = IntPtr.Zero;
+
#endregion Variables
#region Properties
@@ -143,9 +148,49 @@
#region Main
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
[STAThread]
- static void Main()
+ static void Main(string[] args)
{
+ if (args.Length > 0)
+ {
+ for (int index = 0; index < args.Length; index++)
+ {
+ switch (args[index].ToLowerInvariant())
+ {
+ case "-macro":
+ SendCopyDataMessage("Translator", Common.CmdPrefixMacro + args[++index]);
+ continue;
+
+ case "-eject":
+ SendCopyDataMessage("Translator", Common.CmdPrefixEject + args[++index]);
+ continue;
+
+ case "-shutdown":
+ SendCopyDataMessage("Translator", Common.CmdPrefixShutdown);
+ continue;
+
+ case "-reboot":
+ SendCopyDataMessage("Translator", Common.CmdPrefixReboot);
+ continue;
+
+ case "-standby":
+ SendCopyDataMessage("Translator", Common.CmdPrefixStandby);
+ continue;
+
+ case "-hibernate":
+ SendCopyDataMessage("Translator", Common.CmdPrefixHibernate);
+ continue;
+
+ //TODO: Add more command line options.
+ }
+ }
+
+ return;
+ }
+
// Check for multiple instances.
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1)
return;
@@ -184,7 +229,16 @@
// Setup main form ...
_mainForm = new MainForm();
+ _ownWindowHandle = _mainForm.Handle;
+ // Start the window focus watcher thread
+ /*
+ _focusWatcher = new Thread(new ThreadStart(FocusWatcherThread));
+ _focusWatcher.Name = "Translator - Focus watcher";
+ _focusWatcher.IsBackground = true;
+ _focusWatcher.Start();
+ */
+
// Start server communications ...
if (StartComms())
{
@@ -204,13 +258,89 @@
StopComms();
+ //if (_focusWatcher.IsAlive)
+ //_focusWatcher.Abort();
+
IrssLog.Close();
}
+ static void FocusWatcherThread()
+ {
+ try
+ {
+ while (true)
+ {
+ UpdateForegroundWindow();
+ Thread.Sleep(2000);
+ }
+ }
+ catch
+ {
+ }
+ }
+
+ static void UpdateForegroundWindow()
+ {
+ try
+ {
+ IntPtr hWnd = Win32.GetForegroundWindow();
+
+ if (hWnd == IntPtr.Zero)
+ return;
+
+ if (hWnd == _mainForm.Handle)
+ return;
+/*
+ string windowTitle = Win32.GetWindowTitle(hWnd);
+ if (windowTitle.StartsWith("Translator", StringComparison.InvariantCultureIgnoreCase))
+ return;
+
+ int procID;
+ Win32.GetWindowThreadProcessId(hWnd, out procID);
+ Process proc = Process.GetProcessById(procID);
+ if (proc.MainModule.ModuleName.Equals("Translator.exe", StringComparison.InvariantCultureIgnoreCase))
+ return;
+ */
+ _currentForegroundWindow = hWnd;
+ }
+ catch
+ {
+ }
+ }
+
#endregion Main
#region Implementation
+ static void ShowTranslatorMenu()
+ {
+ UpdateForegroundWindow();
+ _notifyIcon.ContextMenuStrip.Show(Screen.PrimaryScreen.Bounds.Width / 4, Screen.PrimaryScreen.Bounds.Height / 4);
+ //_notifyIcon.ContextMenuStrip.Focus();
+ }
+
+ static void SendCopyDataMessage(string targetWindow, string data)
+ {
+ Win32.COPYDATASTRUCT copyData;
+
+ copyData.dwData = 24;
+ copyData.lpData = Win32.VarPtr(data).ToInt32();
+ copyData.cbData = data.Length;
+
+ IntPtr windowHandle = Win32.FindWindow(null, targetWindow);
+ if (windowHandle != IntPtr.Zero)
+ {
+ IntPtr result;
+ Win32.SendMessageTimeout(windowHandle, (int)Win32.WindowsMessage.WM_COPYDATA, IntPtr.Zero, Win32.VarPtr(copyData), Win32.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out result);
+
+ if (result == IntPtr.Zero)
+ {
+ int lastError = Marshal.GetLastWin32Error();
+ throw new Win32Exception(lastError);
+ }
+ }
+ }
+
static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e)
{
switch (e.Mode)
@@ -243,6 +373,9 @@
{
_notifyIcon.ContextMenuStrip.Items.Clear();
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripLabel("Translator"));
+ _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator());
+
if (Config.Programs.Count > 0)
{
ToolStripMenuItem launch = new ToolStripMenuItem("&Launch");
@@ -277,6 +410,7 @@
_notifyIcon.ContextMenuStrip.Items.Add(macros);
}
+ /**/
ToolStripMenuItem actions = new ToolStripMenuItem("&Actions");
actions.DropDownItems.Add("Next Window", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("Last Window", null, new EventHandler(ClickAction));
@@ -285,25 +419,54 @@
actions.DropDownItems.Add("Minimize Window", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("Restore Window", null, new EventHandler(ClickAction));
+ actions.DropDownItems.Add(new ToolStripSeparator());
+
actions.DropDownItems.Add("System Standby", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Hibernate", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Reboot", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Logoff", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Shutdown", null, new EventHandler(ClickAction));
+
+ actions.DropDownItems.Add(new ToolStripSeparator());
actions.DropDownItems.Add("Volume Up", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("Volume Down", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("Volume Mute", null, new EventHandler(ClickAction));
+ actions.DropDownItems.Add(new ToolStripSeparator());
+ ToolStripMenuItem ejectMenu = new ToolStripMenuItem("Eject");
+ DriveInfo[] drives = DriveInfo.GetDrives();
+ foreach (DriveInfo drive in drives)
+ if (drive.DriveType == DriveType.CDRom)
+ ejectMenu.DropDownItems.Add(drive.Name, null, new EventHandler(ClickEjectAction));
+ actions.DropDownItems.Add(ejectMenu);
+
_notifyIcon.ContextMenuStrip.Items.Add(actions);
+ /**/
_notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator());
-
_notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(ClickSetup));
_notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(ClickQuit));
}
+ /**/
+ static bool SendMessageToWindow(IntPtr hWnd, Win32.WindowsMessage msg, int wParam, int lParam)
+ {
+ IntPtr result;
+ Win32.SendMessageTimeout(hWnd, (int)msg, new IntPtr(wParam), new IntPtr(lParam), Win32.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out result);
+
+ if (result == IntPtr.Zero)
+ {
+ int lastError = Marshal.GetLastWin32Error();
+ if (lastError != 0)
+ throw new Win32Exception(lastError);
+ }
+
+ return true;
+ }
+ /**/
+
static void ClickProgram(object sender, EventArgs e)
{
IrssLog.Info("Click Launch Program");
@@ -371,7 +534,6 @@
MessageBox.Show(ex.Message, "Macro failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
-
static void ClickAction(object sender, EventArgs e)
{
IrssLog.Info("Click Action");
@@ -385,50 +547,98 @@
switch (menuItem.Text)
{
case "Next Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_NEXTWINDOW,
+ 0);
break;
case "Last Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_PREVWINDOW,
+ 0);
break;
case "Close Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_CLOSE,
+ 0);
break;
case "Maximize Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_MAXIMIZE,
+ 0);
break;
case "Minimize Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_MINIMIZE,
+ 0);
break;
case "Restore Window":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_SYSCOMMAND,
+ (int)Win32.SysCommand.SC_RESTORE,
+ 0);
break;
-
case "System Standby":
+ Application.SetSuspendState(PowerState.Suspend, true, false);
break;
case "System Hibernate":
+ Application.SetSuspendState(PowerState.Hibernate, true, false);
break;
case "System Reboot":
+ Win32.ExitWindowsEx(Win32.ExitWindows.Reboot | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
break;
case "System Logoff":
+ Win32.ExitWindowsEx(Win32.ExitWindows.LogOff | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
break;
case "System Shutdown":
+ Win32.ExitWindowsEx(Win32.ExitWindows.ShutDown | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
break;
case "Volume Up":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_APPCOMMAND,
+ (int)Win32.AppCommand.APPCOMMAND_VOLUME_UP,
+ 0);
break;
case "Volume Down":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_APPCOMMAND,
+ (int)Win32.AppCommand.APPCOMMAND_VOLUME_DOWN,
+ 0);
break;
case "Volume Mute":
+ SendMessageToWindow(
+ _currentForegroundWindow,
+ Win32.WindowsMessage.WM_APPCOMMAND,
+ (int)Win32.AppCommand.APPCOMMAND_VOLUME_MUTE,
+ 0);
break;
-
default:
throw new Exception("Unknown action: " + menuItem.Text);
}
@@ -440,6 +650,16 @@
}
}
+ static void ClickEjectAction(object sender, EventArgs e)
+ {
+ IrssLog.Info("Click Eject Action");
+
+ ToolStripMenuItem menuItem = sender as ToolStripMenuItem;
+ if (menuItem == null)
+ return;
+
+ CDRom.Open(menuItem.Text);
+ }
static void ClickSetup(object sender, EventArgs e)
{
@@ -978,7 +1198,10 @@
{
ProcessCommand(mappedEvent.Command);
}
- catch (Exception ex) { IrssLog.Error(ex.ToString()); }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
}
}
}
@@ -1054,6 +1277,12 @@
break;
}
+ case Common.XmlTagEject:
+ {
+ Common.ProcessEjectCommand(commandProperty);
+ break;
+ }
+
case Common.XmlTagStandby:
{
Application.SetSuspendState(PowerState.Suspend, true, false);
@@ -1181,6 +1410,11 @@
string keyCommand = command.Substring(Common.CmdPrefixKeys.Length);
Common.ProcessKeyCommand(keyCommand);
}
+ else if (command.StartsWith(Common.CmdPrefixEject)) // Eject Command
+ {
+ string ejectCommand = command.Substring(Common.CmdPrefixEject.Length);
+ Common.ProcessEjectCommand(ejectCommand);
+ }
else if (command.StartsWith(Common.CmdPrefixMouse)) // Mouse Command
{
string mouseCommand = command.Substring(Common.CmdPrefixMouse.Length);
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -122,6 +122,8 @@
public const string CmdPrefixMouse = "Mouse: ";
+ public const string CmdPrefixEject = "Eject: ";
+
#endregion Command Prefixes
#region XML Tags
@@ -148,6 +150,8 @@
public const string XmlTagMouse = "MOUSE";
+ public const string XmlTagEject = "EJECT";
+
#endregion XML Tags
#region User Interface Text
@@ -173,6 +177,8 @@
public const string UITextMouse = "Mouse Command";
+ public const string UITextEject = "Eject CD";
+
#endregion User Interface Text
#region Mouse Commands
@@ -481,6 +487,16 @@
}
}
+ /// <summary>
+ /// Given a CD-ROM drive letter this method will eject the CD tray.
+ /// </summary>
+ /// <param name="command">The drive letter of the CD-ROM drive to eject the tray on.</param>
+ public static void ProcessEjectCommand(string command)
+ {
+ if (CDRom.IsCDRom(command))
+ CDRom.Open(command);
+ }
+
#endregion Command Execution
#region Misc
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.Designer.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -0,0 +1,110 @@
+namespace IrssUtils.Forms
+{
+
+ partial class EjectCommand
+ {
+
+ /// <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.buttonCancel = new System.Windows.Forms.Button();
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.labelDrive = new System.Windows.Forms.Label();
+ this.comboBoxDrive = new System.Windows.Forms.ComboBox();
+ this.SuspendLayout();
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.Location = new System.Drawing.Point(80, 56);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.Size = new System.Drawing.Size(64, 24);
+ this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.Text = "Cancel";
+ this.buttonCancel.UseVisualStyleBackColor = true;
+ this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+ //
+ // buttonOK
+ //
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonOK.Location = new System.Drawing.Point(8, 56);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(64, 24);
+ this.buttonOK.TabIndex = 2;
+ this.buttonOK.Text = "OK";
+ this.buttonOK.UseVisualStyleBackColor = true;
+ this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+ //
+ // labelDrive
+ //
+ this.labelDrive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelDrive.Location = new System.Drawing.Point(8, 8);
+ this.labelDrive.Name = "labelDrive";
+ this.labelDrive.Size = new System.Drawing.Size(136, 16);
+ this.labelDrive.TabIndex = 0;
+ this.labelDrive.Text = "Select drive to eject:";
+ //
+ // comboBoxDrive
+ //
+ this.comboBoxDrive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.comboBoxDrive.FormattingEnabled = true;
+ this.comboBoxDrive.Location = new System.Drawing.Point(8, 24);
+ this.comboBoxDrive.Name = "comboBoxDrive";
+ this.comboBoxDrive.Size = new System.Drawing.Size(136, 21);
+ this.comboBoxDrive.TabIndex = 1;
+ //
+ // EjectCommand
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(152, 89);
+ this.Controls.Add(this.comboBoxDrive);
+ this.Controls.Add(this.labelDrive);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(160, 116);
+ this.Name = "EjectCommand";
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Eject Command";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button buttonCancel;
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.Label labelDrive;
+ private System.Windows.Forms.ComboBox comboBoxDrive;
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -0,0 +1,68 @@
+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;
+
+namespace IrssUtils.Forms
+{
+
+ public partial class EjectCommand : Form
+ {
+
+ #region Properties
+
+ public string CommandString
+ {
+ get
+ {
+ return comboBoxDrive.Text;
+ }
+ }
+
+ #endregion Properties
+
+ #region Constructors
+
+ public EjectCommand() : this(null) { }
+ public EjectCommand(string command)
+ {
+ InitializeComponent();
+
+ DriveInfo[] drives = DriveInfo.GetDrives();
+ foreach (DriveInfo drive in drives)
+ {
+ if (drive.DriveType == DriveType.CDRom)
+ {
+ comboBoxDrive.Items.Add(drive.Name);
+ if (drive.Name == command)
+ comboBoxDrive.SelectedItem = drive.Name;
+ }
+ }
+
+ }
+
+ #endregion
+
+ #region Buttons
+
+ private void buttonOK_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ #endregion Buttons
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx (rev 0)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/EjectCommand.resx 2007-08-03 16:49:07 UTC (rev 788)
@@ -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
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/KeysCommand.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -31,7 +31,7 @@
{
InitializeComponent();
- if (command != null)
+ if (!String.IsNullOrEmpty(command))
textBoxKeystrokes.Text = command;
}
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MessageCommand.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -52,7 +52,7 @@
#region Constructors
- public MessageCommand() : this(new string[] { "active", String.Empty, Win32.WM_USER.ToString(), "0", "0" }) { }
+ public MessageCommand() : this(new string[] { "active", String.Empty, ((int)Win32.WindowsMessage.WM_USER).ToString(), "0", "0" }) { }
public MessageCommand(string[] commands)
{
InitializeComponent();
@@ -104,7 +104,9 @@
}
else if (radioButtonWindowTitle.Checked)
{
- // TODO: Locate Window
+ WindowList windowList = new WindowList();
+ if (windowList.ShowDialog(this) == DialogResult.OK)
+ textBoxMsgTarget.Text = windowList.SelectedWindowTitle;
}
}
@@ -122,11 +124,11 @@
private void wMAPPToolStripMenuItem_Click(object sender, EventArgs e)
{
- numericUpDownMsg.Value = new decimal(Win32.WM_APP);
+ numericUpDownMsg.Value = new decimal((int)Win32.WindowsMessage.WM_APP);
}
private void wMUSERToolStripMenuItem_Click(object sender, EventArgs e)
{
- numericUpDownMsg.Value = new decimal(Win32.WM_USER);
+ numericUpDownMsg.Value = new decimal((int)Win32.WindowsMessage.WM_USER);
}
private void radioButtonActiveWindow_CheckedChanged(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/WindowList.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -13,18 +13,6 @@
public partial class WindowList : Form
{
- #region Interop
-
- public delegate bool EnumWindowsProc(int hWnd, int lParam);
-
- [DllImport("user32.dll")]
- private static extern int GetWindowText(int hWnd, StringBuilder title, int size);
-
- [DllImport("user32.dll")]
- private static extern int EnumWindows(EnumWindowsProc ewp, int lParam);
-
- #endregion Interop
-
#region Properties
public string SelectedWindowTitle
@@ -47,18 +35,17 @@
void PopulateList()
{
- EnumWindowsProc ewp = new EnumWindowsProc(AddWindow);
+ Win32.EnumWindowsProc ewp = new Win32.EnumWindowsProc(AddWindow);
- EnumWindows(ewp, 0);
+ Win32.EnumWindows(ewp, 0);
}
- bool AddWindow(int hWnd, int lParam)
+ bool AddWindow(IntPtr hWnd, int lParam)
{
- StringBuilder title = new StringBuilder(256);
- GetWindowText(hWnd, title, 256);
+ string title = Win32.GetWindowTitle(hWnd);
- if (title.Length != 0)
- listBoxWindows.Items.Add(title.ToString());
+ if (!String.IsNullOrEmpty(title))
+ listBoxWindows.Items.Add(title);
return true;
}
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-03 16:49:07 UTC (rev 788)
@@ -42,6 +42,12 @@
<ItemGroup>
<Compile Include="CDRom.cs" />
<Compile Include="Common.cs" />
+ <Compile Include="Forms\EjectCommand.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Forms\EjectCommand.Designer.cs">
+ <DependentUpon>EjectCommand.cs</DependentUpon>
+ </Compile>
<Compile Include="Forms\MouseCommand.cs">
<SubType>Form</SubType>
</Compile>
@@ -117,6 +123,10 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="Forms\EjectCommand.resx">
+ <DependentUpon>EjectCommand.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
<EmbeddedResource Include="Forms\MouseCommand.resx">
<DependentUpon>MouseCommand.cs</DependentUpon>
<SubType>Designer</SubType>
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -2,6 +2,7 @@
using System.Collections;
using System.Runtime.InteropServices;
using System.Security;
+using System.Text;
namespace IrssUtils
{
@@ -12,29 +13,16 @@
public static class Win32
{
- #region Constants
-
- /// <summary>
- /// Windows Message (USER).
- /// </summary>
- public const int WM_USER = 0x0400;
-
- /// <summary>
- /// Windows Message (APP).
- /// </summary>
- public const int WM_APP = 0x8000;
-
- #endregion Constants
-
#region Enumerations
- public enum WindowsMessages
+ public enum WindowsMessage
{
WM_ACTIVATE = 0x6,
WM_ACTIVATEAPP = 0x1C,
WM_AFXFIRST = 0x360,
WM_AFXLAST = 0x37F,
WM_APP = 0x8000,
+ WM_APPCOMMAND = 0x319,
WM_ASKCBFORMATNAME = 0x30C,
WM_CANCELJOURNAL = 0x4B,
WM_CANCELMODE = 0x1F,
@@ -240,29 +228,167 @@
WM_XBUTTONUP = 0x20C
}
+ public enum SysCommand
+ {
+ SC_SIZE = 0xF000,
+ SC_MOVE = 0xF010,
+ SC_MINIMIZE = 0xF020,
+ SC_MAXIMIZE = 0xF030,
+ SC_NEXTWINDOW = 0xF040,
+ SC_PREVWINDOW = 0xF050,
+ SC_CLOSE = 0xF060,
+ SC_VSCROLL = 0xF070,
+ SC_HSCROLL = 0xF080,
+ SC_MOUSEMENU = 0xF090,
+ SC_KEYMENU = 0xF100,
+ SC_ARRANGE = 0xF110,
+ SC_RESTORE = 0xF120,
+ SC_TASKLIST = 0xF130,
+ SC_SCREENSAVE = 0xF140,
+ SC_HOTKEY = 0xF150,
+ SC_DEFAULT = 0xF160,
+ SC_MONITORPOWER = 0xF170,
+ SC_CONTEXTHELP = 0xF180,
+ SC_SEPARATOR = 0xF00F,
+
+ SCF_ISSECURE = 0x00000001,
+
+ SC_ICON = SC_MINIMIZE,
+ SC_ZOOM = SC_MAXIMIZE,
+ }
+
+ public enum AppCommand
+ {
+ APPCOMMAND_BROWSER_BACKWARD = 1,
+ APPCOMMAND_BROWSER_FORWARD = 2,
+ APPCOMMAND_BROWSER_REFRESH = 3,
+ APPCOMMAND_BROWSER_STOP = 4,
+ APPCOMMAND_BROWSER_SEARCH = 5,
+ APPCOMMAND_BROWSER_FAVORITES = 6,
+ APPCOMMAND_BROWSER_HOME = 7,
+ APPCOMMAND_VOLUME_MUTE = 8,
+ APPCOMMAND_VOLUME_DOWN = 9,
+ APPCOMMAND_VOLUME_UP = 10,
+ APPCOMMAND_MEDIA_NEXTTRACK = 11,
+ APPCOMMAND_MEDIA_PREVIOUSTRACK = 12,
+ APPCOMMAND_MEDIA_STOP = 13,
+ APPCOMMAND_MEDIA_PLAY_PAUSE = 4143,
+ APPCOMMAND_MEDIA_PLAY = 4142,
+ APPCOMMAND_MEDIA_PAUSE = 4143,
+ APPCOMMAND_MEDIA_RECORD = 4144,
+ APPCOMMAND_MEDIA_FASTFORWARD = 4145,
+ APPCOMMAND_MEDIA_REWIND = 4146,
+ APPCOMMAND_MEDIA_CHANNEL_UP = 4147,
+ APPCOMMAND_MEDIA_CHANNEL_DOWN = 4148,
+ }
+
+ [Flags]
+ public enum SendMessageTimeoutFlags
+ {
+ SMTO_NORMAL = 0x0000,
+ SMTO_BLOCK = 0x0001,
+ SMTO_ABORTIFHUNG = 0x0002,
+ SMTO_NOTIMEOUTIFNOTHUNG = 0x0008,
+ }
+
+ [Flags]
+ public enum ShutdownReason
+ {
+ MajorApplication = 0x00040000,
+ MajorHardware = 0x00010000,
+ MajorLegacyApi = 0x00070000,
+ MajorOperatingSystem = 0x00020000,
+ MajorOther = 0x00000000,
+ MajorPower = 0x00060000,
+ MajorSoftware = 0x00030000,
+ MajorSystem = 0x00050000,
+
+ MinorBlueScreen = 0x0000000F,
+ MinorCordUnplugged = 0x0000000b,
+ MinorDisk = 0x00000007,
+ MinorEnvironment = 0x0000000c,
+ MinorHardwareDriver = 0x0000000d,
+ MinorHotfix = 0x00000011,
+ MinorHung = 0x00000005,
+ MinorInstallation = 0x00000002,
+ MinorMaintenance = 0x00000001,
+ MinorMMC = 0x00000019,
+ MinorNetworkConnectivity = 0x00000014,
+ MinorNetworkCard = 0x00000009,
+ MinorOther = 0x00000000,
+ MinorOtherDriver = 0x0000000e,
+ MinorPowerSupply = 0x0000000a,
+ MinorProcessor = 0x00000008,
+ MinorReconfig = 0x00000004,
+ MinorSecurity = 0x00000013,
+ MinorSecurityFix = 0x00000012,
+ MinorSecurityFixUninstall = 0x00000018,
+ MinorServicePack = 0x00000010,
+ MinorServicePackUninstall = 0x00000016,
+ MinorTermSrv = 0x00000020,
+ MinorUnstable = 0x00000006,
+ MinorUpgrade = 0x00000003,
+ MinorWMI = 0x00000015,
+
+ FlagUserDefined = 0x40000000,
+ //FlagPlanned = 0x80000000,
+ }
+
+ [Flags]
+ public enum ExitWindows
+ {
+ // ONE of the following five:
+ LogOff = 0x00,
+ ShutDown = 0x01,
+ Reboot = 0x02,
+ PowerOff = 0x08,
+ RestartApps = 0x40,
+ // Optionally include ONE of the following two:
+ Force = 0x04,
+ ForceIfHung = 0x10,
+ }
+
#endregion Enumerations
+ #region Structures
+
+ [StructLayout(LayoutKind.Sequential)]
+ public struct COPYDATASTRUCT
+ {
+ public int dwData;
+ public int cbData;
+ public int lpData;
+ }
+
+ #endregion Structures
+
+ #region Delegates
+
+ public delegate bool EnumWindowsProc(IntPtr hWnd, int lParam);
+
+ #endregion Delegates
+
#region Interop
[DllImport("user32.dll")]
+ public static extern int EnumWindows(EnumWindowsProc ewp, int lParam);
+
+ [DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetForegroundWindow(IntPtr hWnd);
- [Flags]
- public enum SendMessageTimeoutFlags : int
- {
- SMTO_NORMAL = 0x0000,
- SMTO_BLOCK = 0x0001,
- SMTO_ABORTIFHUNG = 0x0002,
- SMTO_NOTIMEOUTIFNOTHUNG = 0x0008,
- }
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
+ static extern int GetWindowTextLength(IntPtr hWnd);
+ [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
+ static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern IntPtr SendMessageTimeout(
- IntPtr windowHandle,
+ IntPtr hWnd,
int msg,
IntPtr wParam,
IntPtr lParam,
@@ -273,10 +399,14 @@
//[DllImport("user32.dll", SetLastError = false)]
//public static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam);
- [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
- public static extern int RegisterWindowMessage(string lpString);
+ //[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
+ //public static extern int RegisterWindowMessage(string lpString);
[DllImport("user32.dll", SetLastError = true)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ public static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason);
+
+ [DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", SetLastError = true)]
@@ -314,6 +444,17 @@
#region Methods
+ public static string GetWindowTitle(IntPtr hWnd)
+ {
+ int length = GetWindowTextLength(hWnd);
+
+ StringBuilder windowTitle = new StringBuilder(length + 1);
+
+ GetWindowText(hWnd, windowTitle, windowTitle.Capacity);
+
+ return windowTitle.ToString();
+ }
+
/// <summary>
/// Given a 32-bit integer this method returns the High Word (upper 16 bits).
/// </summary>
@@ -387,6 +528,46 @@
}
}
+ /// <summary>
+ /// Get an IntPtr pointing to any object.
+ /// </summary>
+ /// <param name="o">Object to get pointer for.</param>
+ /// <returns>Pointer to object.</returns>
+ public static IntPtr VarPtr(object o)
+ {
+ GCHandle handle = GCHandle.Alloc(o, GCHandleType.Pinned);
+ IntPtr ptr = handle.AddrOfPinnedObject();
+ handle.Free();
+ return ptr;
+ }
+
+ /*
+ public static void ActivateWindowByHandle(IntPtr hWnd)
+ {
+ WindowPlacement windowPlacement;
+ GetWindowPlacement(hWnd, out windowPlacement);
+
+ switch (windowPlacement.showCmd)
+ {
+ case SW_HIDE: //Window is hidden
+ ShowWindow(hWnd, SW_RESTORE);
+ break;
+ case SW_SHOWMINIMIZED: //Window is minimized
+ // if the window is minimized, then we need to restore it to its
+ // previous size. we also take into account whether it was
+ // previously maximized.
+ int showCmd = (windowPlacement.flags == WPF_RESTORETOMAXIMIZED) ? SW_SHOWMAXIMIZED : SW_SHOWNORMAL;
+ ShowWindow(hWnd, showCmd);
+ break;
+ default:
+ // if it's not minimized, then we just call SetForegroundWindow to
+ // bring it to the front.
+ SetForegroundWindow(hWnd);
+ break;
+ }
+ }
+ */
+
#endregion Methods
}
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-08-03 11:33:59 UTC (rev 787)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MceIrApi.cs 2007-08-03 16:49:07 UTC (rev 788)
@@ -16,74 +16,72 @@
#region Constants
- public const int ID_MCEIR_KEYCODE = 0x37FF0;
+ const int ID_MCEIR_KEYCODE = 0x37FF0;
#endregion
#region Enumerations
/// <summary>
- /// The blaster port to send IR codes to
+ /// The blaster port to send IR codes to.
/// </summary>
public enum BlasterPort
{
/// <summary>
- /// Send IR codes to both blaster ports
+ /// Send IR codes to both blaster ports.
/// </summary>
Both = 0,
/// <summary>
- /// Send IR codes to blaster port 1 only
+ /// Send IR codes to blaster port 1 only.
/// </summary>
Port_1 = 1,
/// <summary>
- /// Send IR codes to blaster port 2 only
+ /// Send IR codes to blaster port 2 only.
/// </summary>
Port_2 = 2
}
/// <summary>
- /// Type of blaster in use
+ /// Type of blaster in use.
/// </summary>
public enum BlasterType
{
/// <summary>
- /// Device is a first party Microsoft MCE transceiver
+ /// Device is a first party Microsoft MCE transceiver.
/// </summary>
Microsoft = 0,
/// <summary>
- /// Device is an third party SMK MCE transceiver
+ /// Device is an third party SMK MCE transceiver.
/// </summary>
SMK = 1
}
/// <summary>
- /// Speed to transmit IR codes at
+ /// Speed to transmit IR codes at.
/// </summary>
public enum BlasterSpeed
{
/// <summa...
[truncated message content] |
|
From: <an...@us...> - 2007-08-07 04:32:22
|
Revision: 803
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=803&view=rev
Author: and-81
Date: 2007-08-06 21:32:21 -0700 (Mon, 06 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj
trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj
trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj
trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj
trunk/plugins/IR Server Suite/IPC/Named Pipes/Named Pipes.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MCE Replacement Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DeviceAccess.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IRCodeConversion.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IRDecoder.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Microsoft MCE Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/NotifyWindow.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/RemoteDetectionData.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10 Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.csproj
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MP Blast Zone Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MP Control Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2 Blaster Plugin.csproj
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3 Blaster Plugin.csproj
Added Paths:
-----------
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceIrCode.cs
Property Changed:
----------------
trunk/plugins/IR Server Suite/Common/MPUtils/
trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/
trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/
trunk/plugins/IR Server Suite/IPC/Named Pipes/
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/Debug Client.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -33,6 +33,23 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</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>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/IR Blast.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -35,6 +35,24 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</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>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/IR Blast (No Window).csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -35,6 +35,24 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</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>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IR Server.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -56,6 +56,25 @@
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</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>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="DevAge.Core, Version=4.6.2660.128, Culture=neutral, PublicKeyToken=faad465d84242dbf, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -1,4 +1,14 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -36,6 +46,14 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray Launcher.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -36,6 +36,25 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -1,4 +1,14 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -34,6 +44,14 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Virtual Remote Skin Editor.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -32,6 +32,23 @@
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -32,6 +32,24 @@
</DocumentationFile>
<UseVSHostingProcess>false</UseVSHostingProcess>
</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>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Property changes on: trunk/plugins/IR Server Suite/Common/MPUtils
___________________________________________________________________
Name: svn:ignore
- *.suo
*.user
thumbs.db
+ *.suo
*.user
thumbs.db
bin
obj
Modified: trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -32,6 +32,24 @@
<DocumentationFile>
</DocumentationFile>
</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>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="Core, Version=0.2.2.9991, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
Property changes on: trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm
___________________________________________________________________
Name: svn:ignore
- *.suo
*.user
thumbs.db
+ *.suo
*.user
thumbs.db
bin
obj
Modified: trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IPC/AppModule.InterProcessComm/AppModule.InterProcessComm.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -76,6 +76,27 @@
<ErrorReport>prompt</ErrorReport>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Property changes on: trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes
___________________________________________________________________
Name: svn:ignore
- *.suo
*.user
thumbs.db
+ *.suo
*.user
thumbs.db
bin
obj
Modified: trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/AppModule.NamedPipes.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -76,6 +76,27 @@
<ErrorReport>prompt</ErrorReport>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <BaseAddress>285212672</BaseAddress>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <BaseAddress>285212672</BaseAddress>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System">
<Name>System</Name>
Property changes on: trunk/plugins/IR Server Suite/IPC/Named Pipes
___________________________________________________________________
Name: svn:ignore
- *.suo
*.user
thumbs.db
+ *.suo
*.user
thumbs.db
bin
obj
Modified: trunk/plugins/IR Server Suite/IPC/Named Pipes/Named Pipes.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IPC/Named Pipes/Named Pipes.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IPC/Named Pipes/Named Pipes.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -38,6 +38,25 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionREMOTE Receiver.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -34,6 +34,25 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -35,6 +35,25 @@
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -33,6 +33,25 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTrans Transceiver.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -34,6 +34,25 @@
<UseVSHostingProcess>false</UseVSHostingProcess>
<DebugSymbols>false</DebugSymbols>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -33,6 +33,25 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MCE Replacement Transceiver.csproj
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MCE Replacement Transceiver.csproj 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/MCE Replacement Transceiver.csproj 2007-08-07 04:32:21 UTC (rev 803)
@@ -33,6 +33,25 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <OutputPath>bin\x86\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\x86\Release\</OutputPath>
+ <Optimize>true</Optimize>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DebugType>
+ </DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs 2007-08-06 23:24:24 UTC (rev 802)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs 2007-08-07 04:32:21 UTC (rev 803)
@@ -38,24 +38,47 @@
this.groupBoxTimes = new System.Windows.Forms.GroupBox();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
this.comboBoxBlasterType = new System.Windows.Forms.ComboBox();
+ this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown();
+ this.numericUpDownKeyHeldDelay = new System.Windows.Forms.NumericUpDown();
+ this.numericUpDownKeyRepeatDelay = new System.Windows.Forms.NumericUpDown();
+ this.checkBoxHandleKeyboardLocal = new System.Windows.Forms.CheckBox();
+ this.checkBoxHandleMouseLocal = new System.Windows.Forms.CheckBox();
+ this.numericUpDownMouseSensitivity = new System.Windows.Forms.NumericUpDown();
this.labelBlasterType = new System.Windows.Forms.Label();
- this.groupBoxBlaster = new System.Windows.Forms.GroupBox();
- this.groupBoxLearnTimeout = new System.Windows.Forms.GroupBox();
this.labelLearnIRTimeout = new System.Windows.Forms.Label();
- this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown();
+ this.tabControl = new System.Windows.Forms.TabControl();
+ this.tabPageBasic = new System.Windows.Forms.TabPage();
+ this.tabPageRemote = new System.Windows.Forms.TabPage();
+ this.checkBoxEnableRemote = new System.Windows.Forms.CheckBox();
+ this.tabPageKeyboard = new System.Windows.Forms.TabPage();
+ this.checkBoxEnableKeyboard = new System.Windows.Forms.CheckBox();
+ this.groupBoxKeypressTiming = new System.Windows.Forms.GroupBox();
+ this.labelKeyRepeatDelay = new System.Windows.Forms.Label();
+ this.labelKeyHeldDelay = new System.Windows.Forms.Label();
+ this.tabPageMouse = new System.Windows.Forms.TabPage();
+ this.labelMouseSensitivity = new System.Windows.Forms.Label();
+ this.checkBoxEnableMouse = new System.Windows.Forms.CheckBox();
+ this.checkBoxLearnAsPronto = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).BeginInit();
this.groupBoxTimes.SuspendLayout();
- this.groupBoxBlaster.SuspendLayout();
- this.groupBoxLearnTimeout.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyHeldDelay)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyRepeatDelay)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseSensitivity)).BeginInit();
+ this.tabControl.SuspendLayout();
+ this.tabPageBasic.SuspendLayout();
+ this.tabPageRemote.SuspendLayout();
+ this.tabPageKeyboard.SuspendLayout();
+ this.groupBoxKeypressTiming.SuspendLayout();
+ this.tabPageMouse.SuspendLayout();
this.SuspendLayout();
//
// labelButtonRepeatDelay
//
this.labelButtonRepeatDelay.Location = new System.Drawing.Point(8, 24);
this.labelButtonRepeatDelay.Name = "labelButtonRepeatDelay";
- this.labelButtonRepeatDelay.Size = new System.Drawing.Size(120, 20);
+ this.labelButtonRepeatDelay.Size = new System.Drawing.Size(128, 20);
this.labelButtonRepeatDelay.TabIndex = 0;
this.labelButtonRepeatDelay.Text = "Button repeat delay:";
this.labelButtonRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -64,7 +87,7 @@
//
this.labelButtonHeldDelay.Location = new System.Drawing.Point(8, 56);
this.labelButtonHeldDelay.Name = "labelButtonHeldDelay";
- this.labelButtonHeldDelay.Size = new System.Drawing.Size(120, 20);
+ this.labelButtonHeldDelay.Size = new System.Drawing.Size(128, 20);
this.labelButtonHeldDelay.TabIndex = 2;
this.labelButtonHeldDelay.Text = "Button held delay:";
this.labelButtonHeldDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -82,11 +105,6 @@
0,
0,
0});
- this.numericUpDownButtonRepeatDelay.Minimum = new decimal(new int[] {
- 50,
- 0,
- 0,
- 0});
this.numericUpDownButtonRepeatDelay.Name = "numericUpDownButtonRepeatDelay";
this.numericUpDownButtonRepeatDelay.Size = new System.Drawing.Size(80, 20);
this.numericUpDownButtonRepeatDelay.TabIndex = 1;
@@ -113,11 +131,6 @@
0,
0,
0});
- this.numericUpDownButtonHeldDelay.Minimum = new decimal(new int[] {
- 50,
- 0,
- 0,
- 0});
this.numericUpDownButtonHeldDelay.Name = "numericUpDownButtonHeldDelay";
this.numericUpDownButtonHeldDelay.Size = new System.Drawing.Size(80, 20);
this.numericUpDownButtonHeldDelay.TabIndex = 3;
@@ -132,10 +145,10 @@
//
// buttonOK
//
- this.buttonOK.Location = new System.Drawing.Point(96, 232);
+ this.buttonOK.Location = new System.Drawing.Point(120, 208);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 2;
+ this.buttonOK.TabIndex = 1;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -143,10 +156,10 @@
// buttonCancel
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(168, 232);
+ this.buttonCancel.Location = new System.Drawing.Point(192, 208);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.TabIndex = 2;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -157,7 +170,7 @@
this.groupBoxTimes.Controls.Add(this.numericUpDownButtonHeldDelay);
this.groupBoxTimes.Controls.Add(this.labelButtonHeldDelay);
this.groupBoxTimes.Controls.Add(this.numericUpDownButtonRepeatDelay);
- this.groupBoxTimes.Location = new System.Drawing.Point(8, 72);
+ this.groupBoxTimes.Location = new System.Drawing.Point(8, 40);
this.groupBoxTimes.Name = "groupBoxTimes";
this.groupBoxTimes.Size = new System.Drawing.Size(224, 88);
this.groupBoxTimes.TabIndex = 1;
@@ -168,52 +181,12 @@
//
this.comboBoxBlasterType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxBlasterType.FormattingEnabled = true;
- this.comboBoxBlasterType.Location = new System.Drawing.Point(128, 24);
+ this.comboBoxBlasterType.Location = new System.Drawing.Point(144, 40);
this.comboBoxBlasterType.Name = "comboBoxBlasterType";
this.comboBoxBlasterType.Size = new System.Drawing.Size(88, 21);
this.comboBoxBlasterType.TabIndex = 1;
this.toolTips.SetToolTip(this.comboBoxBlasterType, "Choose between Microsoft or SMK manufactured MCE IR transceivers");
//
- // labelBlasterType
- //
- this.labelBlasterType.Location = new System.Drawing.Point(8, 24);
- this.labelBlasterType.Name = "labelBlasterType";
- this.labelBlasterType.Size = new System.Drawing.Size(120, 21);
- this.labelBlasterType.TabIndex = 0;
- this.labelBlasterType.Text = "Blaster manufacturer:";
- this.labelBlasterType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // groupBoxBlaster
- //
- this.groupBoxBlaster.Controls.Add(this.labelBlasterType);
- this.groupBoxBlaster.Controls.Add(this.comboBoxBlasterType);
- this.groupBoxBlaster.Location = new System.Drawing.Point(8, 8);
- this.groupBoxBlaster.Name = "groupBoxBlaster";
- this.groupBoxBlaster.Size = new System.Drawing.Size(224, 56);
- this.groupBoxBlaster.TabIndex = 0;
- this.groupBoxBlaster.TabStop = false;
- this.groupBoxBlaster.Text = "Blaster setup";
- //
- // groupBoxLearnTimeout
- //
- this.groupBoxLearnTimeout.Controls.Add(this.labelLearnIRTimeout);
- this.groupBoxLearnTimeout.Controls.Add(this.numericUpDownLearnTimeout);
- this.groupBoxLearnTimeout.Location = new System.Drawing.Point(8, 168);
- this.groupBoxLearnTimeout.Name = "groupBoxLearnTimeout";
- this.groupBoxLearnTimeout.Size = new System.Drawing.Size(224, 56);
- this.groupBoxLearnTimeout.TabIndex = 5;
- this.groupBoxLearnTimeout.TabStop = false;
- this.groupBoxLearnTimeout.Text = "Learn IR timeout (in milliseconds)";
- //
- // labelLearnIRTimeout
- //
- this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 24);
- this.labelLearnIRTimeout.Name = "labelLearnIRTimeout";
- this.labelLearnIRTimeout.Size = new System.Drawing.Size(120, 20);
- this.labelLearnIRTimeout.TabIndex = 2;
- this.labelLearnIRTimeout.Text = "Learn IR timeout:";
- this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// numericUpDownLearnTimeout
//
this.numericUpDownLearnTimeout.Increment = new decimal(new int[] {
@@ -221,7 +194,7 @@
0,
0,
0});
- this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(136, 24);
+ this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(144, 72);
this.numericUpDownLearnTimeout.Maximum = new decimal(new int[] {
60000,
0,
@@ -233,7 +206,7 @@
0,
0});
this.numericUpDownLearnTimeout.Name = "numericUpDownLearnTimeout";
- this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(88, 20);
this.numericUpDownLearnTimeout.TabIndex = 3;
this.numericUpDownLearnTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDownLearnTimeout.ThousandsSeparator = true;
@@ -244,17 +217,287 @@
0,
0});
//
+ // numericUpDownKeyHeldDelay
+ //
+ this.numericUpDownKeyHeldDelay.Increment = new decimal(new int[] {
+ 50,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownKeyHeldDelay.Location = new System.Drawing.Point(136, 56);
+ this.numericUpDownKeyHeldDelay.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownKeyHeldDelay.Name = "numericUpDownKeyHeldDelay";
+ this.numericUpDownKeyHeldDelay.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownKeyHeldDelay.TabIndex = 3;
+ this.numericUpDownKeyHeldDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownKeyHeldDelay.ThousandsSeparator = true;
+ this.toolTips.SetToolTip(this.numericUpDownKeyHeldDelay, "When a key is held this is the time between repeats");
+ this.numericUpDownKeyHeldDelay.Value = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ //
+ // numericUpDownKeyRepeatDelay
+ //
+ this.numericUpDownKeyRepeatDelay.Increment = new decimal(new int[] {
+ 50,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownKeyRepeatDelay.Location = new System.Drawing.Point(136, 24);
+ this.numericUpDownKeyRepeatDelay.Maximum = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownKeyRepeatDelay.Name = "numericUpDownKeyRepeatDelay";
+ this.numericUpDownKeyRepeatDelay.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownKeyRepeatDelay.TabIndex = 1;
+ this.numericUpDownKeyRepeatDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.numericUpDownKeyRepeatDelay.ThousandsSeparator = true;
+ this.toolTips.SetToolTip(this.numericUpDownKeyRepeatDelay, "When a key is held this is the time between the first press and the first repeat");
+ this.numericUpDownKeyRepeatDelay.Value = new decimal(new int[] {
+ 1000,
+ 0,
+ 0,
+ 0});
+ //
+ // checkBoxHandleKeyboardLocal
+ //
+ this.checkBoxHandleKeyboardLocal.Checked = true;
+ this.checkBoxHandleKeyboardLocal.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBoxHandleKeyboardLocal.Location = new System.Drawing.Point(8, 136);
+ this.checkBoxHandleKeyboardLocal.Name = "checkBoxHandleKeyboardLocal";
+ this.checkBoxHandleKeyboardLocal.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxHandleKeyboardLocal.TabIndex = 2;
+ this.checkBoxHandleKeyboardLocal.Text = "Handle keyboard locally";
+ this.toolTips.SetToolTip(this.checkBoxHandleKeyboardLocal, "Act on key presses locally (on the machine IR Server is running on)");
+ this.checkBoxHandleKeyboardLocal.UseVisualStyleBackColor = true;
+ //
+ // checkBoxHandleMouseLocal
+ //
+ this.checkBoxHandleMouseLocal.Checked = true;
+ this.checkBoxHandleMouseLocal.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBoxHandleMouseLocal.Location = new System.Drawing.Point(8, 40);
+ this.checkBoxHandleMouseLocal.Name = "checkBoxHandleMouseLocal";
+ this.checkBoxHandleMouseLocal.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxHandleMouseLocal.TabIndex = 1;
+ this.checkBoxHandleMouseLocal.Text = "Handle mouse locally";
+ this.toolTips.SetToolTip(this.checkBoxHandleMouseLocal, "Act on mouse locally (on the machine IR Server is running on)");
+ this.checkBoxHandleMouseLocal.UseVisualStyleBackColor = true;
+ //
+ // numericUpDownMouseSensitivity
+ //
+ this.numericUpDownMouseSensitivity.DecimalPlaces = 1;
+ this.numericUpDownMouseSensitivity.Increment = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 65536});
+ this.numericUpDownMouseSensitivity.Location = new System.Drawing.Point(152, 80);
+ this.numericUpDownMouseSensitivity.Maximum = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownMouseSensitivity.Minimum = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ -2147483648});
+ this.numericUpDownMouseSensitivity.Name = "numericUpDownMouseSensitivity";
+ this.numericUpDownMouseSensitivity.Size = new System.Drawing.Size(80, 20);
+ this.numericUpDownMouseSensitivity.TabIndex = 3;
+ this.numericUpDownMouseSensitivity.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.toolTips.SetToolTip(this.numericUpDownMouseSensitivity, "Multiply mouse movements by this number");
+ this.numericUpDownMouseSensitivity.Value = new decimal(new int[] {
+ 10,
+ 0,
+ 0,
+ 65536});
+ //
+ // labelBlasterType
+ //
+ this.labelBlasterType.Location = new System.Drawing.Point(8, 40);
+ this.labelBlasterType.Name = "labelBlasterType";
+ this.labelBlasterType.Size = new System.Drawing.Size(136, 21);
+ this.labelBlasterType.TabIndex = 0;
+ this.labelBlasterType.Text = "Blaster manufacturer:";
+ this.labelBlasterType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelLearnIRTimeout
+ //
+ this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 72);
+ this.labelLearnIRTimeout.Name = "labelLearnIRTimeout";
+ this.labelLearnIRTimeout.Size = new System.Drawing.Size(136, 20);
+ this.labelLearnIRTimeout.TabIndex = 2;
+ this.labelLearnIRTimeout.Text = "Learn IR timeout:";
+ this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // tabControl
+ //
+ this.tabControl.Controls.Add(this.tabPageBasic);
+ this.tabControl.Controls.Add(this.tabPageRemote);
+ this.tabControl.Controls.Add(this.tabPageKeyboard);
+ this.tabControl.Controls.Add(this.tabPageMouse);
+ this.tabControl.Location = new System.Drawing.Point(8, 8);
+ this.tabControl.Name = "tabControl";
+ this.tabControl.SelectedIndex = 0;
+ this.tabControl.Size = new System.Drawing.Size(248, 192);
+ this.tabControl.TabIndex = 0;
+ //
+ // tabPageBasic
+ //
+ this.tabPageBasic.Controls.Add(this.checkBoxLearnAsPronto);
+ this.tabPageBasic.Controls.Add(this.labelLearnIRTimeout);
+ this.tabPageBasic.Controls.Add(this.labelBlasterType);
+ this.tabPageBasic.Controls.Add(this.numericUpDownLearnTimeout);
+ this.tabPageBasic.Controls.Add(this.comboBoxBlasterType);
+ this.tabPageBasic.Location = new System.Drawing.Point(4, 22);
+ this.tabPageBasic.Name = "tabPageBasic";
+ this.tabPageBasic.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageBasic.Size = new System.Drawing.Size(240, 166);
+ this.tabPageBasic.TabIndex = 0;
+ this.tabPageBasic.Text = "Basic";
+ this.tabPageBasic.UseVisualStyleBackColor = true;
+ //
+ // tabPageRemote
+ //
+ this.tabPageRemote.Controls.Add(this.checkBoxEnableRemote);
+ this.tabPageRemote.Controls.Add(this.groupBoxTimes);
+ this.tabPageRemote.Location = new System.Drawing.Point(4, 22);
+ this.tabPageRemote.Name = "tabPageRemote";
+ this.tabPageRemote.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageRemote.Size = new System.Drawing.Size(240, 166);
+ this.tabPageRemote.TabIndex = 1;
+ this.tabPageRemote.Text = "Remote";
+ this.tabPageRemote.UseVisualStyleBackColor = true;
+ //
+ // checkBoxEnableRemote
+ //
+ this.checkBoxEnableRemote.Checked = true;
+ this.checkBoxEnableRemote.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBoxEnableRemote.Location = new System.Drawing.Point(8, 8);
+ this.checkBoxEnableRemote.Name = "checkBoxEnableRemote";
+ this.checkBoxEnableRemote.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxEnableRemote.TabIndex = 0;
+ this.checkBoxEnableRemote.Text = "Enable remote control input";
+ this.checkBoxEnableRemote.UseVisualStyleBackColor = true;
+ //
+ // tabPageKeyboard
+ //
+ this.tabPageKeyboard.Controls.Add(this.checkBoxHandleKeyboardLocal);
+ this.tabPageKeyboard.Controls.Add(this.checkBoxEnableKeyboard);
+ this.tabPageKeyboard.Controls.Add(this.groupBoxKeypressTiming);
+ this.tabPageKeyboard.Location = new System.Drawing.Point(4, 22);
+ this.tabPageKeyboard.Name = "tabPageKeyboard";
+ this.tabPageKeyboard.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageKeyboard.Size = new System.Drawing.Size(240, 166);
+ this.tabPageKeyboard.TabIndex = 2;
+ this.tabPageKeyboard.Text = "Keyboard";
+ this.tabPageKeyboard.UseVisualStyleBackColor = true;
+ //
+ // checkBoxEnableKeyboard
+ //
+ this.checkBoxEnableKeyboard.Checked = true;
+ this.checkBoxEnableKeyboard.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBoxEnableKeyboard.Location = new System.Drawing.Point(8, 8);
+ this.checkBoxEnableKeyboard.Name = "checkBoxEnableKeyboard";
+ this.checkBoxEnableKeyboard.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxEnableKeyboard.TabIndex = 0;
+ this.checkBoxEnableKeyboard.Text = "Enable keyboard input";
+ this.checkBoxEnableKeyboard.UseVisualStyleBackColor = true;
+ //
+ // groupBoxKeypressTiming
+ //
+ this.groupBoxKeypressTiming.Controls.Add(this.labelKeyRepeatDelay);
+ this.groupBoxKeypressTiming.Controls.Add(this.numericUpDownKeyHeldDelay);
+ this.groupBoxKeypressTiming.Controls.Add(this.labelKeyHeldDelay);
+ this.groupBoxKeypressTiming.Controls.Add(this.numericUpDownKeyRepeatDelay);
+ this.groupBoxKeypressTiming.Location = new System.Drawing.Point(8, 40);
+ this.groupBoxKeypressTiming.Name = "groupBoxKeypressTiming";
+ this.groupBoxKeypressTiming.Size = new System.Drawing.Size(224, 88);
+ this.groupBoxKeypressTiming.TabIndex = 1;
+ this.groupBoxKeypressTiming.TabStop = false;
+ this.groupBoxKeypressTiming.Text = "Key press timing (in milliseconds)";
+ //
+ // labelKeyRepeatDelay
+ //
+ this.labelKeyRepeatDelay.Location = new System.Drawing.Point(8, 24);
+ this.labelKeyRepeatDelay.Name = "labelKeyRepeatDelay";
+ this.labelKeyRepeatDelay.Size = new System.Drawing.Size(128, 20);
+ this.labelKeyRepeatDelay.TabIndex = 0;
+ this.labelKeyRepeatDelay.Text = "Key repeat delay:";
+ this.labelKeyRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelKeyHeldDelay
+ //
+ this.labelKeyHeldDelay.Location = new System.Drawing.Point(8, 56);
+ this.labelKeyHeldDelay.Name = "labelKeyHeldDelay";
+ this.labelKeyHeldDelay.Size = new System.Drawing.Size(128, 20);
+ this.labelKeyHeldDelay.TabIndex = 2;
+ this.labelKeyHeldDelay.Text = "Key held delay:";
+ this.labelKeyHeldDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // tabPageMouse
+ //
+ this.tabPageMouse.Controls.Add(this.labelMouseSensitivity);
+ this.tabPageMouse.Controls.Add(this.numericUpDownMouseSensitivity);
+ this.tabPageMouse.Controls.Add(this.checkBoxHandleMouseLocal);
+ this.tabPageMouse.Controls.Add(this.checkBoxEnableMouse);
+ this.tabPageMouse.Location = new System.Drawing.Point(4, 22);
+ this.tabPageMouse.Name = "tabPageMouse";
+ this.tabPageMouse.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageMouse.Size = new System.Drawing.Size(240, 166);
+ this.tabPageMouse.TabIndex = 3;
+ this.tabPageMouse.Text = "Mouse";
+ this.tabPageMouse.UseVisualStyleBackColor = true;
+ //
+ // labelMouseSensitivity
+ //
+ this.labelMouseSensitivity.Location = new System.Drawing.Point(8, 80);
+ this.labelMouseSensitivity.Name = "labelMouseSensitivity";
+ this.labelMouseSensitivity.Size = new System.Drawing.Size(144, 20);
+ this.labelMouseSensitivity.TabIndex = 2;
+ this.labelMouseSensitivity.Text = "Mouse sensitivity:";
+ this.labelMouseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // checkBoxEnableMouse
+ //
+ this.checkBoxEnableMouse.Checked = true;
+ this.checkBoxEnableMouse.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBoxEnableMouse.Location = new System.Drawing.Point(8, 8);
+ this.checkBoxEnableMouse.Name = "checkBoxEnableMouse";
+ this.checkBoxEnableMouse.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxEnableMouse.TabIndex = 0;
+ this.checkBoxEnableMouse.Text = "Enable mouse input";
+ this.checkBoxEnableMouse.UseVisualStyleBackColor = true;
+ //
+ // checkBoxLearnAsPronto
+ //
+ this.checkBoxLearnAsPronto.Enabled = false;
+ this.checkBoxLearnAsPronto.Location = new System.Drawing.Point(8, 104);
+ this.checkBoxLearnAsPronto.Name = "checkBoxLearnAsPronto";
+ this.checkBoxLearnAsPronto.Size = new System.Drawing.Size(224, 24);
+ this.checkBoxLearnAsPronto.TabIndex = 4;
+ this.checkBoxLearnAsPronto.Text = "Store learned codes in Pronto format";
+ this.toolTips.SetToolTip(this.checkBoxLearnAsPronto, "Store learned IR commands in Philips Pronto format");
+ this.checkBoxLearnAsPronto.UseVisualStyleBackColor = true;
+ //
// Configure
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(240, 263);
+ this.ClientSize = new System.Drawing.Size(264, 239);
this.ControlBox = false;
- this.Controls.Add(this.groupBoxLearnTimeout);
- this.Controls.Add(this.groupBoxBlaster);
- this.Controls.Add(this.groupBoxTimes);
+ this.Controls.Add(this.tabControl);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
@@ -264,9 +507,16 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonHeldDelay)).EndInit();
this.groupBoxTimes.ResumeLayout(false);
- this.groupBoxBlaster.ResumeLayout(false);
- this.groupBoxLearnTimeout.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyHeldDelay)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownKeyRepeatDelay)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMouseSensitivity)).EndInit();
+ this.tabControl.ResumeLayout(false);
+ this.tabPageBasic.ResumeLayout(false);
+ this.tabPageRemote.ResumeLayout(false);
+ this.tabPageKeyboard.ResumeLayout(false);
+ this.groupBoxKeypressTiming.ResumeLayout(false);
+ this.tabPageMouse.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -283,9 +533,25 @@
private System.Windows.Forms.ToolTip toolTips;
private System.Windows.Forms.ComboBox comboBoxBlasterType;
private System.Windows.Forms.Label labelBlasterType;
- private System.Windows.Forms.GroupBox groupBoxBlaster;
- private System.Windows.Forms.GroupBox groupBoxLearnTimeout;
private System.Windows.Forms.Label labelLearnIRTimeout;
private System.Windows.Forms.NumericUpDown numericUpDownLearnTimeout;
+ private System.Windows.Forms.TabControl tabControl;
+ private System.Windows.Forms.TabPage tabPageBasic;
+ private System.Windows.Forms.TabPage tabPageRemote;
+ private System.Windows.Forms.CheckBox checkBoxEnableRemote;
+ private System.Windows.Forms.TabPage tabPageKeyboard;
+ private System.Windows.Forms.GroupBox groupBoxKeypressTiming;
+ private System.Windows.Forms.Label labelKeyRepeatDelay;
+ private System.Windows.Forms.NumericUpDown numericUpDownKeyHeldDelay;
+ private System...
[truncated message content] |
|
From: <an...@us...> - 2007-08-13 15:37:09
|
Revision: 831
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=831&view=rev
Author: and-81
Date: 2007-08-13 08:37:07 -0700 (Mon, 13 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.Designer.cs
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.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/LearnIR.Designer.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SerialCommand.Designer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SerialCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SerialCommand.resx
trunk/plugins/IR Server Suite/Common/IrssUtils/TransceiverInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug USB Receiver/IgorPlug USB Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Receiver/WinLirc Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/BlastCommand.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/BlastCommand.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.Designer.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
Removed Paths:
-------------
trunk/plugins/IR Server Suite/IR Server Plugins/MCE Replacement Transceiver/
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.Designer.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.Designer.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -52,7 +52,6 @@
this.groupBoxSetup = new System.Windows.Forms.GroupBox();
this.comboBoxComputer = new System.Windows.Forms.ComboBox();
this.groupBoxCommands = new System.Windows.Forms.GroupBox();
- this.comboBoxSpeed = new System.Windows.Forms.ComboBox();
this.comboBoxPort = new System.Windows.Forms.ComboBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.buttonHelp = new System.Windows.Forms.Button();
@@ -329,7 +328,6 @@
//
this.groupBoxCommands.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxCommands.Controls.Add(this.comboBoxSpeed);
this.groupBoxCommands.Controls.Add(this.comboBoxPort);
this.groupBoxCommands.Controls.Add(this.buttonCrash);
this.groupBoxCommands.Controls.Add(this.buttonBlast);
@@ -344,16 +342,6 @@
this.groupBoxCommands.TabStop = false;
this.groupBoxCommands.Text = "Commands";
//
- // comboBoxSpeed
- //
- this.comboBoxSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxSpeed.FormattingEnabled = true;
- this.comboBoxSpeed.Location = new System.Drawing.Point(168, 50);
- this.comboBoxSpeed.Name = "comboBoxSpeed";
- this.comboBoxSpeed.Size = new System.Drawing.Size(80, 21);
- this.comboBoxSpeed.TabIndex = 4;
- this.toolTip.SetToolTip(this.comboBoxSpeed, "Speed to blast IR at");
- //
// comboBoxPort
//
this.comboBoxPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -429,7 +417,6 @@
private System.Windows.Forms.GroupBox groupBoxCommands;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.ComboBox comboBoxPort;
- private System.Windows.Forms.ComboBox comboBoxSpeed;
private System.Windows.Forms.ComboBox comboBoxComputer;
private System.Windows.Forms.Button buttonHelp;
}
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -141,10 +141,6 @@
comboBoxPort.Items.Add("None");
comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.Clear();
- comboBoxSpeed.Items.Add("None");
- comboBoxSpeed.SelectedIndex = 0;
-
ArrayList networkPCs = IrssUtils.Win32.GetNetworkComputers();
if (networkPCs != null)
{
@@ -192,10 +188,6 @@
comboBoxPort.Items.Clear();
comboBoxPort.Items.AddRange(_transceiverInfo.Ports);
comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.Clear();
- comboBoxSpeed.Items.AddRange(_transceiverInfo.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
return;
}
@@ -327,7 +319,7 @@
return true;
}
- bool BlastIR(string fileName, string port, string speed)
+ bool BlastIR(string fileName, string port)
{
try
{
@@ -336,14 +328,12 @@
FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);
- byte[] outData = new byte[8 + port.Length + speed.Length + file.Length];
+ byte[] outData = new byte[4 + port.Length + file.Length];
BitConverter.GetBytes(port.Length).CopyTo(outData, 0);
Encoding.ASCII.GetBytes(port).CopyTo(outData, 4);
- BitConverter.GetBytes(speed.Length).CopyTo(outData, 4 + port.Length);
- Encoding.ASCII.GetBytes(speed).CopyTo(outData, 8 + port.Length);
- file.Read(outData, 8 + port.Length + speed.Length, (int)file.Length);
+ file.Read(outData, 4 + port.Length, (int)file.Length);
file.Close();
PipeMessage message = new PipeMessage(_localPipeName, Environment.MachineName, "Blast", outData);
@@ -433,7 +423,7 @@
return;
}
- if (BlastIR(TempIRFile, comboBoxPort.SelectedItem as string, comboBoxSpeed.SelectedItem as string))
+ if (BlastIR(TempIRFile, comboBoxPort.SelectedItem as string))
AddStatusLine("Blasting");
else
AddStatusLine("Can't Blast");
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -850,14 +850,10 @@
if (portLen > 0)
_pluginTransmit.SetPort(Encoding.ASCII.GetString(data, 4, portLen));
- int speedLen = BitConverter.ToInt32(data, 4 + portLen);
- if (speedLen > 0)
- _pluginTransmit.SetSpeed(Encoding.ASCII.GetString(data, 4 + portLen + 4, speedLen));
+ byte[] fileData = new byte[data.Length - (4 + portLen)];
+ for (int index = 4 + portLen; index < data.Length; index++)
+ fileData[index - (4 + portLen)] = data[index];
- byte[] fileData = new byte[data.Length - (4 + portLen + 4 + speedLen)];
- for (int index = (4 + portLen + 4 + speedLen); index < data.Length; index++)
- fileData[index - (4 + portLen + 4 + speedLen)] = data[index];
-
string tempFile = Path.GetTempFileName();
FileStream fileStream = new FileStream(tempFile, FileMode.Create, FileAccess.ReadWrite, FileShare.None);
@@ -1086,7 +1082,6 @@
{
transceiverInfo.Name = _pluginTransmit.Name;
transceiverInfo.Ports = _pluginTransmit.AvailablePorts;
- transceiverInfo.Speeds = _pluginTransmit.AvailableSpeeds;
transceiverInfo.CanLearn = _pluginTransmit.CanLearn;
transceiverInfo.CanTransmit = _pluginTransmit.CanTransmit;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.Designer.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.Designer.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -29,8 +29,6 @@
private void InitializeComponent()
{
this.labelIRFile = new System.Windows.Forms.Label();
- this.labelBlasterSpeed = new System.Windows.Forms.Label();
- this.comboBoxSpeed = new System.Windows.Forms.ComboBox();
this.labelBlasterPort = new System.Windows.Forms.Label();
this.comboBoxPort = new System.Windows.Forms.ComboBox();
this.labelIRCommandFile = new System.Windows.Forms.Label();
@@ -48,24 +46,6 @@
this.labelIRFile.Text = "IR Command:";
this.labelIRFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // labelBlasterSpeed
- //
- this.labelBlasterSpeed.Location = new System.Drawing.Point(8, 72);
- this.labelBlasterSpeed.Name = "labelBlasterSpeed";
- this.labelBlasterSpeed.Size = new System.Drawing.Size(88, 21);
- this.labelBlasterSpeed.TabIndex = 4;
- this.labelBlasterSpeed.Text = "Blaster speed:";
- this.labelBlasterSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // comboBoxSpeed
- //
- this.comboBoxSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxSpeed.FormattingEnabled = true;
- this.comboBoxSpeed.Location = new System.Drawing.Point(96, 72);
- this.comboBoxSpeed.Name = "comboBoxSpeed";
- this.comboBoxSpeed.Size = new System.Drawing.Size(104, 21);
- this.comboBoxSpeed.TabIndex = 5;
- //
// labelBlasterPort
//
this.labelBlasterPort.Location = new System.Drawing.Point(8, 40);
@@ -99,10 +79,10 @@
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonTest.Location = new System.Drawing.Point(8, 112);
+ this.buttonTest.Location = new System.Drawing.Point(8, 72);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(56, 24);
- this.buttonTest.TabIndex = 6;
+ this.buttonTest.TabIndex = 4;
this.buttonTest.Text = "Test";
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
@@ -110,10 +90,10 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(160, 112);
+ this.buttonOK.Location = new System.Drawing.Point(160, 72);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 7;
+ this.buttonOK.TabIndex = 5;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -122,10 +102,10 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(224, 112);
+ this.buttonCancel.Location = new System.Drawing.Point(224, 72);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 8;
+ this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -136,20 +116,18 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(288, 144);
+ this.ClientSize = new System.Drawing.Size(288, 104);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonTest);
this.Controls.Add(this.labelIRCommandFile);
- this.Controls.Add(this.labelBlasterSpeed);
- this.Controls.Add(this.comboBoxSpeed);
this.Controls.Add(this.labelBlasterPort);
this.Controls.Add(this.comboBoxPort);
this.Controls.Add(this.labelIRFile);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(294, 176);
+ this.MinimumSize = new System.Drawing.Size(294, 130);
this.Name = "BlastCommand";
this.ShowIcon = false;
this.ShowInTaskbar = false;
@@ -162,8 +140,6 @@
#endregion
private System.Windows.Forms.Label labelIRFile;
- private System.Windows.Forms.Label labelBlasterSpeed;
- private System.Windows.Forms.ComboBox comboBoxSpeed;
private System.Windows.Forms.Label labelBlasterPort;
private System.Windows.Forms.ComboBox comboBoxPort;
private System.Windows.Forms.Label labelIRCommandFile;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/BlastCommand.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -20,10 +20,9 @@
{
get
{
- return String.Format("{0}|{1}|{2}",
+ return String.Format("{0}|{1}",
labelIRCommandFile.Text,
- comboBoxPort.SelectedItem as string,
- comboBoxSpeed.SelectedItem as string);
+ comboBoxPort.SelectedItem as string);
}
}
@@ -35,7 +34,7 @@
{
InitializeComponent();
- SetupPortsAndSpeeds();
+ SetupPorts();
labelIRCommandFile.Text = file;
}
@@ -43,7 +42,7 @@
{
InitializeComponent();
- SetupPortsAndSpeeds();
+ SetupPorts();
if (commands == null)
return;
@@ -52,20 +51,14 @@
if (comboBoxPort.Items.Contains(commands[1]))
comboBoxPort.SelectedItem = commands[1];
-
- if (comboBoxSpeed.Items.Contains(commands[2]))
- comboBoxSpeed.SelectedItem = commands[2];
}
#endregion Constructors
- void SetupPortsAndSpeeds()
+ void SetupPorts()
{
comboBoxPort.Items.AddRange(Program.TransceiverInformation.Ports);
comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
}
#region Buttons
@@ -92,8 +85,7 @@
try
{
Program.BlastIR(Common.FolderIRCommands + fileName + Common.FileExtensionIR,
- comboBoxPort.SelectedItem as string,
- comboBoxSpeed.SelectedItem as string);
+ comboBoxPort.SelectedItem as string);
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -40,8 +40,6 @@
this.buttonSet = new System.Windows.Forms.Button();
this.tabControl = new System.Windows.Forms.TabControl();
this.tabPageBlastIR = new System.Windows.Forms.TabPage();
- this.labelBlasterSpeed = new System.Windows.Forms.Label();
- this.comboBoxSpeed = new System.Windows.Forms.ComboBox();
this.buttonLearnIR = new System.Windows.Forms.Button();
this.labelBlasterPort = new System.Windows.Forms.Label();
this.comboBoxIRCode = new System.Windows.Forms.ComboBox();
@@ -169,13 +167,13 @@
this.checkBoxMouseMoveUp = new System.Windows.Forms.CheckBox();
this.labelMouseMove = new System.Windows.Forms.Label();
this.numericUpDownMouseMove = new System.Windows.Forms.NumericUpDown();
+ this.tabPageMisc = new System.Windows.Forms.TabPage();
+ this.labelMiscCommand = new System.Windows.Forms.Label();
+ this.comboBoxMiscCommand = new System.Windows.Forms.ComboBox();
this.buttonTest = new System.Windows.Forms.Button();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.tabPageMisc = new System.Windows.Forms.TabPage();
- this.labelMiscCommand = new System.Windows.Forms.Label();
- this.comboBoxMiscCommand = new System.Windows.Forms.ComboBox();
this.groupBoxButton.SuspendLayout();
this.groupBoxSet.SuspendLayout();
this.tabControl.SuspendLayout();
@@ -320,8 +318,6 @@
//
// tabPageBlastIR
//
- this.tabPageBlastIR.Controls.Add(this.labelBlasterSpeed);
- this.tabPageBlastIR.Controls.Add(this.comboBoxSpeed);
this.tabPageBlastIR.Controls.Add(this.buttonLearnIR);
this.tabPageBlastIR.Controls.Add(this.labelBlasterPort);
this.tabPageBlastIR.Controls.Add(this.comboBoxIRCode);
@@ -335,31 +331,13 @@
this.tabPageBlastIR.Text = "Blast IR";
this.tabPageBlastIR.UseVisualStyleBackColor = true;
//
- // labelBlasterSpeed
- //
- this.labelBlasterSpeed.Location = new System.Drawing.Point(8, 80);
- this.labelBlasterSpeed.Name = "labelBlasterSpeed";
- this.labelBlasterSpeed.Size = new System.Drawing.Size(88, 21);
- this.labelBlasterSpeed.TabIndex = 4;
- this.labelBlasterSpeed.Text = "Blaster speed:";
- this.labelBlasterSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // comboBoxSpeed
- //
- this.comboBoxSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxSpeed.FormattingEnabled = true;
- this.comboBoxSpeed.Location = new System.Drawing.Point(96, 80);
- this.comboBoxSpeed.Name = "comboBoxSpeed";
- this.comboBoxSpeed.Size = new System.Drawing.Size(120, 21);
- this.comboBoxSpeed.TabIndex = 5;
- //
// buttonLearnIR
//
this.buttonLearnIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonLearnIR.Location = new System.Drawing.Point(360, 176);
this.buttonLearnIR.Name = "buttonLearnIR";
this.buttonLearnIR.Size = new System.Drawing.Size(64, 24);
- this.buttonLearnIR.TabIndex = 6;
+ this.buttonLearnIR.TabIndex = 4;
this.buttonLearnIR.Text = "Learn";
this.toolTips.SetToolTip(this.buttonLearnIR, "Click here to add a new IR Command to the list");
this.buttonLearnIR.UseVisualStyleBackColor = true;
@@ -1013,52 +991,52 @@
this.toolStripSeparator2,
this.specialKeysToolStripMenuItem});
this.contextMenuStripKeystrokes.Name = "contextMenuStripKeystrokes";
- this.contextMenuStripKeystrokes.Size = new System.Drawing.Size(145, 148);
+ this.contextMenuStripKeystrokes.Size = new System.Drawing.Size(139, 148);
//
// cutToolStripMenuItem
//
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
- this.cutToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.cutToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.cutToolStripMenuItem.Text = "Cut";
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
//
// copyToolStripMenuItem
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
- this.copyToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.copyToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.copyToolStripMenuItem.Text = "Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// pasteToolStripMenuItem
//
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
- this.pasteToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.pasteToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.pasteToolStripMenuItem.Text = "Paste";
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(141, 6);
+ this.toolStripSeparator1.Size = new System.Drawing.Size(135, 6);
//
// selectAllToolStripMenuItem
//
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
- this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.selectAllToolStripMenuItem.Text = "Select All";
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
//
// selectNoneToolStripMenuItem
//
this.selectNoneToolStripMenuItem.Name = "selectNoneToolStripMenuItem";
- this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.selectNoneToolStripMenuItem.Text = "Select None";
this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
- this.toolStripSeparator2.Size = new System.Drawing.Size(141, 6);
+ this.toolStripSeparator2.Size = new System.Drawing.Size(135, 6);
//
// specialKeysToolStripMenuItem
//
@@ -1084,7 +1062,7 @@
this.scrollLockToolStripMenuItem,
this.tabToolStripMenuItem});
this.specialKeysToolStripMenuItem.Name = "specialKeysToolStripMenuItem";
- this.specialKeysToolStripMenuItem.Size = new System.Drawing.Size(144, 22);
+ this.specialKeysToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
this.specialKeysToolStripMenuItem.Text = "Special Keys";
//
// arrowsToolStripMenuItem
@@ -1095,34 +1073,34 @@
this.leftToolStripMenuItem,
this.rightToolStripMenuItem});
this.arrowsToolStripMenuItem.Name = "arrowsToolStripMenuItem";
- this.arrowsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.arrowsToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.arrowsToolStripMenuItem.Text = "Arrows";
//
// upToolStripMenuItem
//
this.upToolStripMenuItem.Name = "upToolStripMenuItem";
- this.upToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
+ this.upToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.upToolStripMenuItem.Text = "Up";
this.upToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// downToolStripMenuItem
//
this.downToolStripMenuItem.Name = "downToolStripMenuItem";
- this.downToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
+ this.downToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.downToolStripMenuItem.Text = "Down";
this.downToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// leftToolStripMenuItem
//
this.leftToolStripMenuItem.Name = "leftToolStripMenuItem";
- this.leftToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
+ this.leftToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.leftToolStripMenuItem.Text = "Left";
this.leftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// rightToolStripMenuItem
//
this.rightToolStripMenuItem.Name = "rightToolStripMenuItem";
- this.rightToolStripMenuItem.Size = new System.Drawing.Size(112, 22);
+ this.rightToolStripMenuItem.Size = new System.Drawing.Size(105, 22);
this.rightToolStripMenuItem.Text = "Right";
this.rightToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1146,118 +1124,118 @@
this.f15ToolStripMenuItem,
this.f16ToolStripMenuItem});
this.functionKeysToolStripMenuItem.Name = "functionKeysToolStripMenuItem";
- this.functionKeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.functionKeysToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.functionKeysToolStripMenuItem.Text = "Function Keys";
//
// f1ToolStripMenuItem
//
this.f1ToolStripMenuItem.Name = "f1ToolStripMenuItem";
- this.f1ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f1ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f1ToolStripMenuItem.Text = "F1";
this.f1ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f2ToolStripMenuItem
//
this.f2ToolStripMenuItem.Name = "f2ToolStripMenuItem";
- this.f2ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f2ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f2ToolStripMenuItem.Text = "F2";
this.f2ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f3ToolStripMenuItem
//
this.f3ToolStripMenuItem.Name = "f3ToolStripMenuItem";
- this.f3ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f3ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f3ToolStripMenuItem.Text = "F3";
this.f3ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f4ToolStripMenuItem
//
this.f4ToolStripMenuItem.Name = "f4ToolStripMenuItem";
- this.f4ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f4ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f4ToolStripMenuItem.Text = "F4";
this.f4ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f5ToolStripMenuItem
//
this.f5ToolStripMenuItem.Name = "f5ToolStripMenuItem";
- this.f5ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f5ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f5ToolStripMenuItem.Text = "F5";
this.f5ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f6ToolStripMenuItem
//
this.f6ToolStripMenuItem.Name = "f6ToolStripMenuItem";
- this.f6ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f6ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f6ToolStripMenuItem.Text = "F6";
this.f6ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f7ToolStripMenuItem
//
this.f7ToolStripMenuItem.Name = "f7ToolStripMenuItem";
- this.f7ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f7ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f7ToolStripMenuItem.Text = "F7";
this.f7ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f8ToolStripMenuItem
//
this.f8ToolStripMenuItem.Name = "f8ToolStripMenuItem";
- this.f8ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f8ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f8ToolStripMenuItem.Text = "F8";
this.f8ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f9ToolStripMenuItem
//
this.f9ToolStripMenuItem.Name = "f9ToolStripMenuItem";
- this.f9ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f9ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f9ToolStripMenuItem.Text = "F9";
this.f9ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f10ToolStripMenuItem
//
this.f10ToolStripMenuItem.Name = "f10ToolStripMenuItem";
- this.f10ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f10ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f10ToolStripMenuItem.Text = "F10";
this.f10ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f11ToolStripMenuItem
//
this.f11ToolStripMenuItem.Name = "f11ToolStripMenuItem";
- this.f11ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f11ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f11ToolStripMenuItem.Text = "F11";
this.f11ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f12ToolStripMenuItem
//
this.f12ToolStripMenuItem.Name = "f12ToolStripMenuItem";
- this.f12ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f12ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f12ToolStripMenuItem.Text = "F12";
this.f12ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f13ToolStripMenuItem
//
this.f13ToolStripMenuItem.Name = "f13ToolStripMenuItem";
- this.f13ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f13ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f13ToolStripMenuItem.Text = "F13";
this.f13ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f14ToolStripMenuItem
//
this.f14ToolStripMenuItem.Name = "f14ToolStripMenuItem";
- this.f14ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f14ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f14ToolStripMenuItem.Text = "F14";
this.f14ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f15ToolStripMenuItem
//
this.f15ToolStripMenuItem.Name = "f15ToolStripMenuItem";
- this.f15ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f15ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f15ToolStripMenuItem.Text = "F15";
this.f15ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// f16ToolStripMenuItem
//
this.f16ToolStripMenuItem.Name = "f16ToolStripMenuItem";
- this.f16ToolStripMenuItem.Size = new System.Drawing.Size(103, 22);
+ this.f16ToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.f16ToolStripMenuItem.Text = "F16";
this.f16ToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1269,34 +1247,34 @@
this.multiplyToolStripMenuItem,
this.divideToolStripMenuItem});
this.keypadToolStripMenuItem.Name = "keypadToolStripMenuItem";
- this.keypadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.keypadToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.keypadToolStripMenuItem.Text = "Keypad";
//
// addToolStripMenuItem
//
this.addToolStripMenuItem.Name = "addToolStripMenuItem";
- this.addToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
+ this.addToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.addToolStripMenuItem.Text = "Add";
this.addToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// subtractToolStripMenuItem
//
this.subtractToolStripMenuItem.Name = "subtractToolStripMenuItem";
- this.subtractToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
+ this.subtractToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.subtractToolStripMenuItem.Text = "Subtract";
this.subtractToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// multiplyToolStripMenuItem
//
this.multiplyToolStripMenuItem.Name = "multiplyToolStripMenuItem";
- this.multiplyToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
+ this.multiplyToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.multiplyToolStripMenuItem.Text = "Multiply";
this.multiplyToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// divideToolStripMenuItem
//
this.divideToolStripMenuItem.Name = "divideToolStripMenuItem";
- this.divideToolStripMenuItem.Size = new System.Drawing.Size(126, 22);
+ this.divideToolStripMenuItem.Size = new System.Drawing.Size(118, 22);
this.divideToolStripMenuItem.Text = "Divide";
this.divideToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1307,137 +1285,137 @@
this.controlToolStripMenuItem,
this.shiftToolStripMenuItem});
this.modifiersToolStripMenuItem.Name = "modifiersToolStripMenuItem";
- this.modifiersToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.modifiersToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.modifiersToolStripMenuItem.Text = "Modifiers";
//
// altToolStripMenuItem
//
this.altToolStripMenuItem.Name = "altToolStripMenuItem";
- this.altToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.altToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
this.altToolStripMenuItem.Text = "Alt";
this.altToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// controlToolStripMenuItem
//
this.controlToolStripMenuItem.Name = "controlToolStripMenuItem";
- this.controlToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.controlToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
this.controlToolStripMenuItem.Text = "Control";
this.controlToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// shiftToolStripMenuItem
//
this.shiftToolStripMenuItem.Name = "shiftToolStripMenuItem";
- this.shiftToolStripMenuItem.Size = new System.Drawing.Size(120, 22);
+ this.shiftToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
this.shiftToolStripMenuItem.Text = "Shift";
this.shiftToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
- this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
+ this.toolStripSeparator3.Size = new System.Drawing.Size(145, 6);
//
// backspaceToolStripMenuItem
//
this.backspaceToolStripMenuItem.Name = "backspaceToolStripMenuItem";
- this.backspaceToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.backspaceToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.backspaceToolStripMenuItem.Text = "Backspace";
this.backspaceToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// breakToolStripMenuItem
//
this.breakToolStripMenuItem.Name = "breakToolStripMenuItem";
- this.breakToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.breakToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.breakToolStripMenuItem.Text = "Break";
this.breakToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// capsLockToolStripMenuItem
//
this.capsLockToolStripMenuItem.Name = "capsLockToolStripMenuItem";
- this.capsLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.capsLockToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.capsLockToolStripMenuItem.Text = "Caps Lock";
this.capsLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// delToolStripMenuItem
//
this.delToolStripMenuItem.Name = "delToolStripMenuItem";
- this.delToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.delToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.delToolStripMenuItem.Text = "Delete";
this.delToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// endToolStripMenuItem
//
this.endToolStripMenuItem.Name = "endToolStripMenuItem";
- this.endToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.endToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.endToolStripMenuItem.Text = "End";
this.endToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// enterToolStripMenuItem
//
this.enterToolStripMenuItem.Name = "enterToolStripMenuItem";
- this.enterToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.enterToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.enterToolStripMenuItem.Text = "Enter";
this.enterToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// escapeToolStripMenuItem
//
this.escapeToolStripMenuItem.Name = "escapeToolStripMenuItem";
- this.escapeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.escapeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.escapeToolStripMenuItem.Text = "Escape";
this.escapeToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// helpToolStripMenuItem
//
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
- this.helpToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.helpToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.helpToolStripMenuItem.Text = "Help";
this.helpToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// homeToolStripMenuItem
//
this.homeToolStripMenuItem.Name = "homeToolStripMenuItem";
- this.homeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.homeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.homeToolStripMenuItem.Text = "Home";
this.homeToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// insToolStripMenuItem
//
this.insToolStripMenuItem.Name = "insToolStripMenuItem";
- this.insToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.insToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.insToolStripMenuItem.Text = "Insert";
this.insToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// numLockToolStripMenuItem
//
this.numLockToolStripMenuItem.Name = "numLockToolStripMenuItem";
- this.numLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.numLockToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.numLockToolStripMenuItem.Text = "Num Lock";
this.numLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// pageDownToolStripMenuItem
//
this.pageDownToolStripMenuItem.Name = "pageDownToolStripMenuItem";
- this.pageDownToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.pageDownToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.pageDownToolStripMenuItem.Text = "Page Down";
this.pageDownToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// pageUpToolStripMenuItem
//
this.pageUpToolStripMenuItem.Name = "pageUpToolStripMenuItem";
- this.pageUpToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.pageUpToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.pageUpToolStripMenuItem.Text = "Page Up";
this.pageUpToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// scrollLockToolStripMenuItem
//
this.scrollLockToolStripMenuItem.Name = "scrollLockToolStripMenuItem";
- this.scrollLockToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.scrollLockToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.scrollLockToolStripMenuItem.Text = "Scroll Lock";
this.scrollLockToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
// tabToolStripMenuItem
//
this.tabToolStripMenuItem.Name = "tabToolStripMenuItem";
- this.tabToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.tabToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.tabToolStripMenuItem.Text = "Tab";
this.tabToolStripMenuItem.Click += new System.EventHandler(this.KeystrokeToolStripMenuItem_Click);
//
@@ -1641,6 +1619,36 @@
0,
0});
//
+ // tabPageMisc
+ //
+ this.tabPageMisc.Controls.Add(this.labelMiscCommand);
+ this.tabPageMisc.Controls.Add(this.comboBoxMiscCommand);
+ this.tabPageMisc.Location = new System.Drawing.Point(4, 22);
+ this.tabPageMisc.Name = "tabPageMisc";
+ this.tabPageMisc.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageMisc.Size = new System.Drawing.Size(432, 206);
+ this.tabPageMisc.TabIndex = 7;
+ this.tabPageMisc.Text = "Misc";
+ this.tabPageMisc.UseVisualStyleBackColor = true;
+ //
+ // labelMiscCommand
+ //
+ this.labelMiscCommand.Location = new System.Drawing.Point(8, 16);
+ this.labelMiscCommand.Name = "labelMiscCommand";
+ this.labelMiscCommand.Size = new System.Drawing.Size(88, 21);
+ this.labelMiscCommand.TabIndex = 0;
+ this.labelMiscCommand.Text = "Command:";
+ this.labelMiscCommand.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // comboBoxMiscCommand
+ //
+ this.comboBoxMiscCommand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxMiscCommand.FormattingEnabled = true;
+ this.comboBoxMiscCommand.Location = new System.Drawing.Point(96, 16);
+ this.comboBoxMiscCommand.Name = "comboBoxMiscCommand";
+ this.comboBoxMiscCommand.Size = new System.Drawing.Size(328, 21);
+ this.comboBoxMiscCommand.TabIndex = 1;
+ //
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -1676,36 +1684,6 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
- // tabPageMisc
- //
- this.tabPageMisc.Controls.Add(this.labelMiscCommand);
- this.tabPageMisc.Controls.Add(this.comboBoxMiscCommand);
- this.tabPageMisc.Location = new System.Drawing.Point(4, 22);
- this.tabPageMisc.Name = "tabPageMisc";
- this.tabPageMisc.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageMisc.Size = new System.Drawing.Size(432, 206);
- this.tabPageMisc.TabIndex = 7;
- this.tabPageMisc.Text = "Misc";
- this.tabPageMisc.UseVisualStyleBackColor = true;
- //
- // labelMiscCommand
- //
- this.labelMiscCommand.Location = new System.Drawing.Point(8, 16);
- this.labelMiscCommand.Name = "labelMiscCommand";
- this.labelMiscCommand.Size = new System.Drawing.Size(88, 21);
- this.labelMiscCommand.TabIndex = 0;
- this.labelMiscCommand.Text = "Command:";
- this.labelMiscCommand.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // comboBoxMiscCommand
- //
- this.comboBoxMiscCommand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxMiscCommand.FormattingEnabled = true;
- this.comboBoxMiscCommand.Location = new System.Drawing.Point(96, 16);
- this.comboBoxMiscCommand.Name = "comboBoxMiscCommand";
- this.comboBoxMiscCommand.Size = new System.Drawing.Size(328, 21);
- this.comboBoxMiscCommand.TabIndex = 1;
- //
// ButtonMappingForm
//
this.AcceptButton = this.buttonOK;
@@ -1771,8 +1749,6 @@
private System.Windows.Forms.Button buttonSet;
private System.Windows.Forms.TabControl tabControl;
private System.Windows.Forms.TabPage tabPageBlastIR;
- private System.Windows.Forms.Label labelBlasterSpeed;
- private System.Windows.Forms.ComboBox comboBoxSpeed;
private System.Windows.Forms.Button buttonLearnIR;
private System.Windows.Forms.Label labelBlasterPort;
private System.Windows.Forms.ComboBox comboBoxIRCode;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -106,11 +106,6 @@
if (comboBoxPort.Items.Count > 0)
comboBoxPort.SelectedIndex = 0;
- comboBoxSpeed.Items.Clear();
- comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
- if (comboBoxSpeed.Items.Count > 0)
- comboBoxSpeed.SelectedIndex = 0;
-
// Setup Serial tab
comboBoxComPort.Items.Clear();
comboBoxComPort.Items.AddRange(SerialPort.GetPortNames());
@@ -151,7 +146,7 @@
prefix = _command.Substring(0, find + 2);
suffix = _command.Substring(find + 2);
}
-
+
switch (prefix)
{
case Common.CmdPrefixBlast:
@@ -161,7 +156,6 @@
tabControl.SelectTab(tabPageBlastIR);
comboBoxIRCode.SelectedItem = commands[0];
comboBoxPort.SelectedItem = commands[1];
- comboBoxSpeed.SelectedItem = commands[2];
break;
}
@@ -323,11 +317,10 @@
case "tabPageBlastIR":
{
textBoxCommand.Text = _command =
- String.Format("{0}{1}|{2}|{3}",
+ String.Format("{0}{1}|{2}",
Common.CmdPrefixBlast,
comboBoxIRCode.SelectedItem as string,
- comboBoxPort.SelectedItem as string,
- comboBoxSpeed.SelectedItem as string);
+ comboBoxPort.SelectedItem as string);
break;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.Designer.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.Designer.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -38,8 +38,6 @@
this.groupBoxStatus = new System.Windows.Forms.GroupBox();
this.comboBoxPort = new System.Windows.Forms.ComboBox();
this.labelPort = new System.Windows.Forms.Label();
- this.labelSpeed = new System.Windows.Forms.Label();
- this.comboBoxSpeed = new System.Windows.Forms.ComboBox();
this.groupBoxTest = new System.Windows.Forms.GroupBox();
this.groupBoxStatus.SuspendLayout();
this.groupBoxTest.SuspendLayout();
@@ -48,7 +46,7 @@
// buttonDone
//
this.buttonDone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonDone.Location = new System.Drawing.Point(216, 176);
+ this.buttonDone.Location = new System.Drawing.Point(216, 152);
this.buttonDone.Name = "buttonDone";
this.buttonDone.Size = new System.Drawing.Size(56, 24);
this.buttonDone.TabIndex = 5;
@@ -73,7 +71,7 @@
// buttonLearn
//
this.buttonLearn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonLearn.Location = new System.Drawing.Point(8, 176);
+ this.buttonLearn.Location = new System.Drawing.Point(8, 152);
this.buttonLearn.Name = "buttonLearn";
this.buttonLearn.Size = new System.Drawing.Size(56, 24);
this.buttonLearn.TabIndex = 4;
@@ -101,11 +99,12 @@
//
// buttonTest
//
+ this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonTest.Enabled = false;
- this.buttonTest.Location = new System.Drawing.Point(200, 40);
+ this.buttonTest.Location = new System.Drawing.Point(200, 16);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(56, 24);
- this.buttonTest.TabIndex = 4;
+ this.buttonTest.TabIndex = 2;
this.buttonTest.Text = "Test";
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
@@ -126,7 +125,7 @@
//
this.comboBoxPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxPort.FormattingEnabled = true;
- this.comboBoxPort.Location = new System.Drawing.Point(8, 40);
+ this.comboBoxPort.Location = new System.Drawing.Point(64, 16);
this.comboBoxPort.Name = "comboBoxPort";
this.comboBoxPort.Size = new System.Drawing.Size(88, 21);
this.comboBoxPort.TabIndex = 1;
@@ -135,41 +134,21 @@
//
this.labelPort.Location = new System.Drawing.Point(8, 16);
this.labelPort.Name = "labelPort";
- this.labelPort.Size = new System.Drawing.Size(88, 24);
+ this.labelPort.Size = new System.Drawing.Size(56, 21);
this.labelPort.TabIndex = 0;
this.labelPort.Text = "Port:";
this.labelPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // labelSpeed
- //
- this.labelSpeed.Location = new System.Drawing.Point(104, 16);
- this.labelSpeed.Name = "labelSpeed";
- this.labelSpeed.Size = new System.Drawing.Size(88, 24);
- this.labelSpeed.TabIndex = 2;
- this.labelSpeed.Text = "Speed:";
- this.labelSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // comboBoxSpeed
- //
- this.comboBoxSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxSpeed.FormattingEnabled = true;
- this.comboBoxSpeed.Location = new System.Drawing.Point(104, 40);
- this.comboBoxSpeed.Name = "comboBoxSpeed";
- this.comboBoxSpeed.Size = new System.Drawing.Size(88, 21);
- this.comboBoxSpeed.TabIndex = 3;
- //
// groupBoxTest
//
this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxTest.Controls.Add(this.comboBoxPort);
- this.groupBoxTest.Controls.Add(this.labelSpeed);
this.groupBoxTest.Controls.Add(this.buttonTest);
- this.groupBoxTest.Controls.Add(this.comboBoxSpeed);
this.groupBoxTest.Controls.Add(this.labelPort);
this.groupBoxTest.Location = new System.Drawing.Point(8, 96);
this.groupBoxTest.Name = "groupBoxTest";
- this.groupBoxTest.Size = new System.Drawing.Size(264, 72);
+ this.groupBoxTest.Size = new System.Drawing.Size(264, 48);
this.groupBoxTest.TabIndex = 3;
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test";
@@ -179,7 +158,7 @@
this.AcceptButton = this.buttonDone;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(280, 207);
+ this.ClientSize = new System.Drawing.Size(280, 184);
this.Controls.Add(this.groupBoxTest);
this.Controls.Add(this.buttonDone);
this.Controls.Add(this.groupBoxStatus);
@@ -188,7 +167,7 @@
this.Controls.Add(this.textBoxName);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(288, 234);
+ this.MinimumSize = new System.Drawing.Size(288, 220);
this.Name = "LearnIR";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@@ -211,8 +190,6 @@
private System.Windows.Forms.GroupBox groupBoxStatus;
private System.Windows.Forms.ComboBox comboBoxPort;
private System.Windows.Forms.Label labelPort;
- private System.Windows.Forms.Label labelSpeed;
- private System.Windows.Forms.ComboBox comboBoxSpeed;
private System.Windows.Forms.GroupBox groupBoxTest;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/LearnIR.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -53,10 +53,6 @@
comboBoxPort.Items.Clear();
comboBoxPort.Items.AddRange(Program.TransceiverInformation.Ports);
comboBoxPort.SelectedIndex = 0;
-
- comboBoxSpeed.Items.Clear();
- comboBoxSpeed.Items.AddRange(Program.TransceiverInformation.Speeds);
- comboBoxSpeed.SelectedIndex = 0;
}
#endregion Constructor
@@ -163,8 +159,7 @@
try
{
Program.BlastIR(Common.FolderIRCommands + command + Common.FileExtensionIR,
- comboBoxPort.SelectedItem as string,
- comboBoxSpeed.SelectedItem as string);
+ comboBoxPort.SelectedItem as string);
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-13 12:57:24 UTC (rev 830)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-13 15:37:07 UTC (rev 831)
@@ -1232,7 +1232,7 @@
case Common.XmlTagBlast:
{
string[] commands = Common.SplitBlastCommand(commandProperty);
- BlastIR(Common.FolderIRCommands + commands[0] + Common.FileExtensionIR, commands[1], commands[2]);
+ BlastIR(Common.FolderIRCommands + commands[0] + Common.FileExtensionIR, commands[1]);
break;
}
@@ -1345,8 +1345,7 @@
/// </summary>
/// <param name="fileName">File to blast (absolute path).</param>
/// <param name="port">Port to blast to.</param>
- /// <param name="speed">Speed to blast at.</param>
- internal static void BlastIR(string fileName, string port, string speed)
+ internal static void BlastIR(string fileName, string port)
{
if (!_registered)
throw new Exception("Cannot Blast, not registered ...
[truncated message content] |
|
From: <an...@us...> - 2007-08-15 14:22:33
|
Revision: 840
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=840&view=rev
Author: and-81
Date: 2007-08-15 07:22:31 -0700 (Wed, 15 Aug 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.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/EditProgramForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/APipeConnection.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceIrCode.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -41,11 +41,10 @@
[STAThread]
static void Main(string[] args)
{
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "IR Blast.log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
ShowHeader();
try
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -42,11 +42,10 @@
[STAThread]
static void Main(string[] args)
{
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "IR Blast (No Window).log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
try
{
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -40,8 +40,6 @@
// TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "IR Server.log");
-
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.Designer.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -210,7 +210,7 @@
this.groupBoxButton.Controls.Add(this.textBoxButtonDesc);
this.groupBoxButton.Location = new System.Drawing.Point(8, 8);
this.groupBoxButton.Name = "groupBoxButton";
- this.groupBoxButton.Size = new System.Drawing.Size(456, 80);
+ this.groupBoxButton.Size = new System.Drawing.Size(464, 80);
this.groupBoxButton.TabIndex = 0;
this.groupBoxButton.TabStop = false;
this.groupBoxButton.Text = "Button";
@@ -241,7 +241,7 @@
this.textBoxKeyCode.Location = new System.Drawing.Point(88, 16);
this.textBoxKeyCode.Name = "textBoxKeyCode";
this.textBoxKeyCode.ReadOnly = true;
- this.textBoxKeyCode.Size = new System.Drawing.Size(360, 20);
+ this.textBoxKeyCode.Size = new System.Drawing.Size(368, 20);
this.textBoxKeyCode.TabIndex = 1;
this.textBoxKeyCode.TabStop = false;
this.textBoxKeyCode.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -253,7 +253,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxButtonDesc.Location = new System.Drawing.Point(88, 48);
this.textBoxButtonDesc.Name = "textBoxButtonDesc";
- this.textBoxButtonDesc.Size = new System.Drawing.Size(360, 20);
+ this.textBoxButtonDesc.Size = new System.Drawing.Size(368, 20);
this.textBoxButtonDesc.TabIndex = 3;
this.toolTips.SetToolTip(this.textBoxButtonDesc, "Provide a description of this button here");
this.textBoxButtonDesc.TextChanged += new System.EventHandler(this.textBoxButtonDesc_TextChanged);
@@ -269,7 +269,7 @@
this.groupBoxSet.Controls.Add(this.buttonTest);
this.groupBoxSet.Location = new System.Drawing.Point(8, 96);
this.groupBoxSet.Name = "groupBoxSet";
- this.groupBoxSet.Size = new System.Drawing.Size(456, 296);
+ this.groupBoxSet.Size = new System.Drawing.Size(464, 296);
this.groupBoxSet.TabIndex = 1;
this.groupBoxSet.TabStop = false;
this.groupBoxSet.Text = "Command";
@@ -282,7 +282,7 @@
this.textBoxCommand.Location = new System.Drawing.Point(64, 264);
this.textBoxCommand.Name = "textBoxCommand";
this.textBoxCommand.ReadOnly = true;
- this.textBoxCommand.Size = new System.Drawing.Size(328, 20);
+ this.textBoxCommand.Size = new System.Drawing.Size(336, 20);
this.textBoxCommand.TabIndex = 2;
//
// buttonSet
@@ -313,7 +313,7 @@
this.tabControl.Location = new System.Drawing.Point(8, 24);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(440, 232);
+ this.tabControl.Size = new System.Drawing.Size(448, 232);
this.tabControl.TabIndex = 0;
//
// tabPageBlastIR
@@ -1626,7 +1626,7 @@
this.tabPageMisc.Location = new System.Drawing.Point(4, 22);
this.tabPageMisc.Name = "tabPageMisc";
this.tabPageMisc.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageMisc.Size = new System.Drawing.Size(432, 206);
+ this.tabPageMisc.Size = new System.Drawing.Size(440, 206);
this.tabPageMisc.TabIndex = 7;
this.tabPageMisc.Text = "Misc";
this.tabPageMisc.UseVisualStyleBackColor = true;
@@ -1652,7 +1652,7 @@
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonTest.Location = new System.Drawing.Point(400, 264);
+ this.buttonTest.Location = new System.Drawing.Point(408, 264);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(48, 20);
this.buttonTest.TabIndex = 3;
@@ -1665,7 +1665,7 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(408, 400);
+ this.buttonCancel.Location = new System.Drawing.Point(416, 400);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
this.buttonCancel.TabIndex = 3;
@@ -1676,7 +1676,7 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(344, 400);
+ this.buttonOK.Location = new System.Drawing.Point(352, 400);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
this.buttonOK.TabIndex = 2;
@@ -1690,14 +1690,14 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(472, 433);
+ this.ClientSize = new System.Drawing.Size(480, 433);
this.Controls.Add(this.groupBoxButton);
this.Controls.Add(this.groupBoxSet);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(480, 428);
+ this.MinimumSize = new System.Drawing.Size(488, 428);
this.Name = "ButtonMappingForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -91,9 +91,9 @@
private void ButtonMappingForm_Load(object sender, EventArgs e)
{
- textBoxKeyCode.Text = _keyCode;
- textBoxButtonDesc.Text = _description;
- textBoxCommand.Text = _command;
+ textBoxKeyCode.Text = _keyCode;
+ textBoxButtonDesc.Text = _description;
+ textBoxCommand.Text = _command;
// Setup IR Blast tab
SetupIRList();
@@ -127,6 +127,7 @@
// Setup Misc tab
comboBoxMiscCommand.Items.Clear();
+ comboBoxMiscCommand.Items.Add(Common.UITextTranslator);
comboBoxMiscCommand.Items.Add(Common.UITextEject);
comboBoxMiscCommand.Items.Add(Common.UITextStandby);
comboBoxMiscCommand.Items.Add(Common.UITextHibernate);
@@ -261,11 +262,26 @@
comboBoxMiscCommand.SelectedItem = Common.UITextHibernate;
break;
+ case Common.CmdPrefixReboot:
+ comboBoxMiscCommand.SelectedItem = Common.UITextReboot;
+ break;
+
+ case Common.CmdPrefixShutdown:
+ comboBoxMiscCommand.SelectedItem = Common.UITextShutdown;
+ break;
+
+ case Common.CmdPrefixStandby:
+ comboBoxMiscCommand.SelectedItem = Common.UITextStandby;
+ break;
+
+ case Common.CmdPrefixTranslator:
+ comboBoxMiscCommand.SelectedItem = Common.UITextTranslator;
+ break;
+
default:
if (prefix.Equals(Common.CmdPrefixEject, StringComparison.InvariantCultureIgnoreCase))
- {
comboBoxMiscCommand.SelectedItem = Common.UITextEject;
- }
+ //else
break;
}
break;
@@ -435,10 +451,22 @@
textBoxCommand.Text = _command = Common.CmdPrefixHibernate;
break;
+ case Common.UITextReboot:
+ textBoxCommand.Text = _command = Common.CmdPrefixReboot;
+ break;
- }
+ case Common.CmdPrefixShutdown:
+ textBoxCommand.Text = _command = Common.CmdPrefixShutdown;
+ break;
+ case Common.CmdPrefixStandby:
+ textBoxCommand.Text = _command = Common.CmdPrefixStandby;
+ break;
+ case Common.CmdPrefixTranslator:
+ textBoxCommand.Text = _command = Common.CmdPrefixTranslator;
+ break;
+ }
break;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -140,7 +140,7 @@
processWindow = process.MainWindowHandle;
if (processWindow != IntPtr.Zero)
{
- Win32.SetForegroundWindow(processWindow);
+ Win32.SetForegroundWindow(processWindow, true);
break;
}
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -21,71 +21,6 @@
static class Program
{
- #region Enumerations
-
- /// <summary>
- /// A list of MCE remote buttons.
- /// </summary>
- internal enum MceButton
- {
- Custom = -1,
- None = 0,
- TV_Power = 0x7b9a,
- Blue = 0x7ba1,
- Yellow = 0x7ba2,
- Green = 0x7ba3,
- Red = 0x7ba4,
- Teletext = 0x7ba5,
- Radio = 0x7baf,
- Print = 0x7bb1,
- Videos = 0x7bb5,
- Pictures = 0x7bb6,
- Recorded_TV = 0x7bb7,
- Music = 0x7bb8,
- TV = 0x7bb9,
- Guide = 0x7bd9,
- Live_TV = 0x7bda,
- DVD_Menu = 0x7bdb,
- Back = 0x7bdc,
- OK = 0x7bdd,
- Right = 0x7bde,
- Left = 0x7bdf,
- Down = 0x7be0,
- Up = 0x7be1,
- Star = 0x7be2,
- Hash = 0x7be3,
- Replay = 0x7be4,
- Skip = 0x7be5,
- Stop = 0x7be6,
- Pause = 0x7be7,
- Record = 0x7be8,
- Play = 0x7be9,
- Rewind = 0x7bea,
- Forward = 0x7beb,
- Channel_Down = 0x7bec,
- Channel_Up = 0x7bed,
- Volume_Down = 0x7bee,
- Volume_Up = 0x7bef,
- Info = 0x7bf0,
- Mute = 0x7bf1,
- Start = 0x7bf2,
- PC_Power = 0x7bf3,
- Enter = 0x7bf4,
- Escape = 0x7bf5,
- Number_9 = 0x7bf6,
- Number_8 = 0x7bf7,
- Number_7 = 0x7bf8,
- Number_6 = 0x7bf9,
- Number_5 = 0x7bfa,
- Number_4 = 0x7bfb,
- Number_3 = 0x7bfc,
- Number_2 = 0x7bfd,
- Number_1 = 0x7bfe,
- Number_0 = 0x7bff,
- }
-
- #endregion Enumerations
-
#region Constants
internal static readonly string ConfigFile = Common.FolderAppData + "Translator\\Translator.xml";
@@ -113,7 +48,6 @@
static TransceiverInfo _transceiverInfo = new TransceiverInfo();
//static Thread _focusWatcher;
- static IntPtr _ownWindowHandle = IntPtr.Zero;
static IntPtr _currentForegroundWindow = IntPtr.Zero;
#endregion Variables
@@ -156,38 +90,7 @@
{
if (args.Length > 0)
{
- for (int index = 0; index < args.Length; index++)
- {
- switch (args[index].ToLowerInvariant())
- {
- case "-macro":
- SendCopyDataMessage("Translator", Common.CmdPrefixMacro + args[++index]);
- continue;
-
- case "-eject":
- SendCopyDataMessage("Translator", Common.CmdPrefixEject + args[++index]);
- continue;
-
- case "-shutdown":
- SendCopyDataMessage("Translator", Common.CmdPrefixShutdown);
- continue;
-
- case "-reboot":
- SendCopyDataMessage("Translator", Common.CmdPrefixReboot);
- continue;
-
- case "-standby":
- SendCopyDataMessage("Translator", Common.CmdPrefixStandby);
- continue;
-
- case "-hibernate":
- SendCopyDataMessage("Translator", Common.CmdPrefixHibernate);
- continue;
-
- //TODO: Add more command line options.
- }
- }
-
+ ProcessCommandLine(args);
return;
}
@@ -202,8 +105,6 @@
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Translator.log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
_config = Configuration.Load(ConfigFile);
if (_config == null)
_config = new Configuration();
@@ -229,7 +130,6 @@
// Setup main form ...
_mainForm = new MainForm();
- _ownWindowHandle = _mainForm.Handle;
// Start the window focus watcher thread
/*
@@ -264,7 +164,11 @@
IrssLog.Close();
}
- static void FocusWatcherThread()
+ #endregion Main
+
+ #region Implementation
+
+ /*static void FocusWatcherThread()
{
try
{
@@ -277,7 +181,7 @@
catch
{
}
- }
+ }*/
static void UpdateForegroundWindow()
{
@@ -287,20 +191,25 @@
if (hWnd == IntPtr.Zero)
return;
-
+
if (hWnd == _mainForm.Handle)
- return;
-/*
- string windowTitle = Win32.GetWindowTitle(hWnd);
- if (windowTitle.StartsWith("Translator", StringComparison.InvariantCultureIgnoreCase))
return;
- int procID;
- Win32.GetWindowThreadProcessId(hWnd, out procID);
- Process proc = Process.GetProcessById(procID);
- if (proc.MainModule.ModuleName.Equals("Translator.exe", StringComparison.InvariantCultureIgnoreCase))
+ if (hWnd == _notifyIcon.ContextMenuStrip.Handle)
return;
- */
+
+ /*
+ string windowTitle = Win32.GetWindowTitle(hWnd);
+ if (windowTitle.StartsWith("Translator", StringComparison.InvariantCultureIgnoreCase))
+ return;
+
+ int procID;
+ Win32.GetWindowThreadProcessId(hWnd, out procID);
+ Process proc = Process.GetProcessById(procID);
+ if (proc.MainModule.ModuleName.Equals("Translator.exe", StringComparison.InvariantCultureIgnoreCase))
+ return;
+ */
+
_currentForegroundWindow = hWnd;
}
catch
@@ -308,14 +217,49 @@
}
}
- #endregion Main
+ static void ProcessCommandLine(string[] args)
+ {
+ for (int index = 0; index < args.Length; index++)
+ {
+ switch (args[index].ToLowerInvariant())
+ {
+ case "-macro":
+ SendCopyDataMessage("Translator", Common.CmdPrefixMacro + args[++index]);
+ continue;
- #region Implementation
+ case "-eject":
+ SendCopyDataMessage("Translator", Common.CmdPrefixEject + args[++index]);
+ continue;
+ case "-shutdown":
+ SendCopyDataMessage("Translator", Common.CmdPrefixShutdown);
+ continue;
+
+ case "-reboot":
+ SendCopyDataMessage("Translator", Common.CmdPrefixReboot);
+ continue;
+
+ case "-standby":
+ SendCopyDataMessage("Translator", Common.CmdPrefixStandby);
+ continue;
+
+ case "-hibernate":
+ SendCopyDataMessage("Translator", Common.CmdPrefixHibernate);
+ continue;
+
+ //TODO: Add more command line options.
+ }
+ }
+ }
+
static void ShowTranslatorMenu()
{
UpdateForegroundWindow();
+
_notifyIcon.ContextMenuStrip.Show(Screen.PrimaryScreen.Bounds.Width / 4, Screen.PrimaryScreen.Bounds.Height / 4);
+
+ //Win32.SetForegroundWindow(_notifyIcon.ContextMenuStrip.Handle, true);
+
//_notifyIcon.ContextMenuStrip.Focus();
}
@@ -424,15 +368,9 @@
actions.DropDownItems.Add("System Standby", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Hibernate", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Reboot", null, new EventHandler(ClickAction));
- actions.DropDownItems.Add("System Logoff", null, new EventHandler(ClickAction));
+ //actions.DropDownItems.Add("System Logoff", null, new EventHandler(ClickAction));
actions.DropDownItems.Add("System Shutdown", null, new EventHandler(ClickAction));
-
- actions.DropDownItems.Add(new ToolStripSeparator());
- actions.DropDownItems.Add("Volume Up", null, new EventHandler(ClickAction));
- actions.DropDownItems.Add("Volume Down", null, new EventHandler(ClickAction));
- actions.DropDownItems.Add("Volume Mute", null, new EventHandler(ClickAction));
-
actions.DropDownItems.Add(new ToolStripSeparator());
ToolStripMenuItem ejectMenu = new ToolStripMenuItem("Eject");
@@ -442,6 +380,12 @@
ejectMenu.DropDownItems.Add(drive.Name, null, new EventHandler(ClickEjectAction));
actions.DropDownItems.Add(ejectMenu);
+ actions.DropDownItems.Add(new ToolStripSeparator());
+
+ actions.DropDownItems.Add("Volume Up", null, new EventHandler(ClickAction));
+ actions.DropDownItems.Add("Volume Down", null, new EventHandler(ClickAction));
+ actions.DropDownItems.Add("Volume Mute", null, new EventHandler(ClickAction));
+
_notifyIcon.ContextMenuStrip.Items.Add(actions);
/**/
@@ -595,23 +539,25 @@
break;
case "System Standby":
- Application.SetSuspendState(PowerState.Suspend, true, false);
+ Standby();
break;
case "System Hibernate":
- Application.SetSuspendState(PowerState.Hibernate, true, false);
+ Hibernate();
break;
case "System Reboot":
- Win32.ExitWindowsEx(Win32.ExitWindows.Reboot | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
+ Reboot();
break;
+ /*
case "System Logoff":
- Win32.ExitWindowsEx(Win32.ExitWindows.LogOff | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
+ LogOff();
break;
+ */
case "System Shutdown":
- Win32.ExitWindowsEx(Win32.ExitWindows.ShutDown | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
+ ShutDown();
break;
@@ -1063,17 +1009,13 @@
{
try
{
- IntPtr active = Win32.GetForegroundWindow();
-
- if (active.Equals(IntPtr.Zero))
+ int pid = Win32.GetForegroundWindowPID();
+ if (pid == -1)
{
- IrssLog.Debug("No active program (no foreground window)");
+ IrssLog.Debug("Error retreiving foreground window process ID");
return null;
}
- int pid = -1;
- Win32.GetWindowThreadProcessId(active, out pid);
-
string fileName = Path.GetFileName(Process.GetProcessById(pid).MainModule.FileName);
foreach (ProgramSettings progSettings in Config.Programs)
@@ -1174,6 +1116,33 @@
}
+ static void Hibernate()
+ {
+ IrssLog.Info("Hibernate");
+ Application.SetSuspendState(PowerState.Hibernate, true, false);
+ }
+ static void Standby()
+ {
+ IrssLog.Info("Standby");
+ Application.SetSuspendState(PowerState.Suspend, true, false);
+ }
+ static void Reboot()
+ {
+ IrssLog.Info("Reboot");
+ Win32.ExitWindowsEx(Win32.ExitWindows.Reboot | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReasons.FlagUserDefined);
+ }
+ /*static void LogOff()
+ {
+ IrssLog.Info("LogOff");
+ Win32.ExitWindowsEx(Win32.ExitWindows.LogOff | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReason.FlagUserDefined);
+ }*/
+ static void ShutDown()
+ {
+ IrssLog.Info("ShutDown");
+ Win32.ExitWindowsEx(Win32.ExitWindows.ShutDown | Win32.ExitWindows.ForceIfHung, Win32.ShutdownReasons.FlagUserDefined);
+ }
+
+
static void MapEvent(MappingEvent theEvent)
{
if (_inConfiguration)
@@ -1285,15 +1254,27 @@
case Common.XmlTagStandby:
{
- Application.SetSuspendState(PowerState.Suspend, true, false);
+ Standby();
break;
}
case Common.XmlTagHibernate:
{
- Application.SetSuspendState(PowerState.Hibernate, true, false);
+ Hibernate();
break;
}
+
+ case Common.XmlTagShutdown:
+ {
+ ShutDown();
+ break;
+ }
+
+ case Common.XmlTagReboot:
+ {
+ Reboot();
+ break;
+ }
}
}
}
@@ -1415,6 +1396,26 @@
string mouseCommand = command.Substring(Common.CmdPrefixMouse.Length);
Common.ProcessMouseCommand(mouseCommand);
}
+ else if (command.StartsWith(Common.CmdPrefixHibernate)) // Hibernate Command
+ {
+ Hibernate();
+ }
+ else if (command.StartsWith(Common.CmdPrefixReboot)) // Reboot Command
+ {
+ Reboot();
+ }
+ else if (command.StartsWith(Common.CmdPrefixShutdown)) // Shutdown Command
+ {
+ ShutDown();
+ }
+ else if (command.StartsWith(Common.CmdPrefixStandby)) // Standby Command
+ {
+ Standby();
+ }
+ else if (command.StartsWith(Common.CmdPrefixTranslator)) // Translator Command
+ {
+ ShowTranslatorMenu();
+ }
else
{
throw new ArgumentException(String.Format("Cannot process unrecognized command \"{0}\"", command), "command");
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2007-08-15 14:22:31 UTC (rev 840)
@@ -106,12 +106,6 @@
<Compile Include="Forms\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
- <Compile Include="Forms\PopupMenu.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Forms\PopupMenu.Designer.cs">
- <DependentUpon>PopupMenu.cs</DependentUpon>
- </Compile>
<Compile Include="MappedEvent.cs" />
<Compile Include="Program.cs" />
<Compile Include="ProgramSettings.cs" />
@@ -144,10 +138,6 @@
<SubType>Designer</SubType>
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="Forms\PopupMenu.resx">
- <SubType>Designer</SubType>
- <DependentUpon>PopupMenu.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -20,11 +20,10 @@
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Tray Launcher.log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
Tray tray = new Tray();
if (tray.Start())
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -84,11 +84,10 @@
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Virtual Remote.log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
LoadSettings();
if (args.Length > 0) // Command Line Start ...
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -279,11 +279,10 @@
private void MainForm_Load(object sender, EventArgs e)
{
+ // TODO: Change log level to info for release.
IrssLog.LogLevel = IrssLog.Level.Debug;
IrssLog.Open(Common.FolderIrssLogs + "Virtual Remote Skin Editor.log");
- IrssLog.Debug("Platform is {0}", (IntPtr.Size == 4 ? "32-bit" : "64-bit"));
-
UpdateWindowTitle();
comboBoxShortcut.Items.Clear();
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -124,6 +124,8 @@
public const string CmdPrefixEject = "Eject: ";
+ public const string CmdPrefixTranslator = "Show Translator Menu";
+
#endregion Command Prefixes
#region XML Tags
@@ -152,6 +154,8 @@
public const string XmlTagEject = "EJECT";
+ public const string XmlTagTranslator = "TRANSLATOR";
+
#endregion XML Tags
#region User Interface Text
@@ -174,11 +178,14 @@
public const string UITextHibernate = "Hibernate";
public const string UITextReboot = "Reboot";
public const string UITextShutdown = "Shutdown";
+ //public const string UITextLogoff
public const string UITextMouse = "Mouse Command";
public const string UITextEject = "Eject CD";
+ public const string UITextTranslator = "Show Translator Menu";
+
#endregion User Interface Text
#region Mouse Commands
@@ -323,7 +330,7 @@
processWindow = process.MainWindowHandle;
if (processWindow != IntPtr.Zero)
{
- Win32.SetForegroundWindow(processWindow);
+ Win32.SetForegroundWindow(processWindow, true);
break;
}
@@ -372,7 +379,9 @@
{
IntPtr windowHandle = IntPtr.Zero;
- switch (commands[0].ToLowerInvariant())
+ string matchType = commands[0].ToLowerInvariant();
+
+ switch (matchType)
{
case "active":
windowHandle = Win32.GetForegroundWindow();
@@ -383,7 +392,7 @@
{
try
{
- if (proc.MainModule.FileName == commands[1])
+ if (commands[1].Equals(proc.MainModule.FileName, StringComparison.InvariantCultureIgnoreCase))
{
windowHandle = proc.MainWindowHandle;
break;
@@ -410,15 +419,12 @@
//Win32.SendMessage(windowHandle, msg, wordParam, longParam);
- IntPtr result;
+ IntPtr result = IntPtr.Zero;
Win32.SendMessageTimeout(windowHandle, msg, wordParam, longParam, Win32.SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out result);
+ int lastError = Marshal.GetLastWin32Error();
if (result == IntPtr.Zero)
- {
- int lastError = Marshal.GetLastWin32Error();
Marshal.ThrowExceptionForHR(lastError);
- }
-
}
/// <summary>
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/ExternalProgram.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -173,7 +173,7 @@
processWindow = process.MainWindowHandle;
if (processWindow != IntPtr.Zero)
{
- Win32.SetForegroundWindow(processWindow);
+ Win32.SetForegroundWindow(processWindow, true);
break;
}
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -17,7 +17,7 @@
byte bVk,
byte bScan,
uint dwFlags,
- UIntPtr dwExtraInfo);
+ IntPtr dwExtraInfo);
#endregion Interop
@@ -26,7 +26,7 @@
/// <summary>
/// Virtual Key Codes
/// </summary>
- public enum VKey : byte
+ public enum VKey
{
None = 0,
VK_0 = 0x30,
@@ -174,8 +174,7 @@
/// Key Event Types
/// </summary>
[Flags]
- [CLSCompliant(false)]
- public enum KeyEvents : uint
+ public enum KeyEvents
{
KeyDown = 0,
ExtendedKey = 1,
@@ -194,7 +193,7 @@
/// <param name="vKey">Virtual key to press.</param>
public static void KeyDown(VKey vKey)
{
- keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyDown, UIntPtr.Zero);
+ keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyDown, IntPtr.Zero);
}
/// <summary>
@@ -203,7 +202,7 @@
/// <param name="vKey">Virtual key to release.</param>
public static void KeyUp(VKey vKey)
{
- keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyUp, UIntPtr.Zero);
+ keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyUp, IntPtr.Zero);
}
/// <summary>
@@ -213,8 +212,7 @@
/// <param name="scan">Scan code.</param>
/// <param name="flags">Event type.</param>
/// <param name="extraInfo">Pointer to additional information.</param>
- [CLSCompliant(false)]
- public static void Event(VKey vKey, byte scan, KeyEvents flags, UIntPtr extraInfo)
+ public static void Event(VKey vKey, byte scan, KeyEvents flags, IntPtr extraInfo)
{
keybd_event((byte)vKey, scan, (uint)flags, extraInfo);
}
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Mouse.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -23,7 +23,7 @@
/// Used to simulate mouse actions.
/// </summary>
[Flags]
- public enum MouseEvents : int
+ public enum MouseEvents
{
None = 0x0000,
Move = 0x0001,
@@ -40,7 +40,7 @@
/// <summary>
/// Used to simulate mouse wheel scrolling.
/// </summary>
- public enum ScrollDir : int
+ public enum ScrollDir
{
None = 0,
Up = 120,
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -292,46 +292,46 @@
}
[Flags]
- public enum ShutdownReason
+ public enum ShutdownReasons
{
- MajorApplication = 0x00040000,
- MajorHardware = 0x00010000,
- MajorLegacyApi = 0x00070000,
- MajorOperatingSystem = 0x00020000,
- MajorOther = 0x00000000,
- MajorPower = 0x00060000,
- MajorSoftware = 0x00030000,
- MajorSystem = 0x00050000,
+ MajorApplication = 0x00040000,
+ MajorHardware = 0x00010000,
+ MajorLegacyApi = 0x00070000,
+ MajorOperatingSystem = 0x00020000,
+ MajorOther = 0x00000000,
+ MajorPower = 0x00060000,
+ MajorSoftware = 0x00030000,
+ MajorSystem = 0x00050000,
- MinorBlueScreen = 0x0000000F,
- MinorCordUnplugged = 0x0000000b,
- MinorDisk = 0x00000007,
- MinorEnvironment = 0x0000000c,
- MinorHardwareDriver = 0x0000000d,
- MinorHotfix = 0x00000011,
- MinorHung = 0x00000005,
- MinorInstallation = 0x00000002,
- MinorMaintenance = 0x00000001,
- MinorMMC = 0x00000019,
- MinorNetworkConnectivity = 0x00000014,
- MinorNetworkCard = 0x00000009,
- MinorOther = 0x00000000,
- MinorOtherDriver = 0x0000000e,
- MinorPowerSupply = 0x0000000a,
- MinorProcessor = 0x00000008,
- MinorReconfig = 0x00000004,
- MinorSecurity = 0x00000013,
- MinorSecurityFix = 0x00000012,
+ MinorBlueScreen = 0x0000000F,
+ MinorCordUnplugged = 0x0000000b,
+ MinorDisk = 0x00000007,
+ MinorEnvironment = 0x0000000c,
+ MinorHardwareDriver = 0x0000000d,
+ MinorHotfix = 0x00000011,
+ MinorHung = 0x00000005,
+ MinorInstallation = 0x00000002,
+ MinorMaintenance = 0x00000001,
+ MinorMMC = 0x00000019,
+ MinorNetworkConnectivity = 0x00000014,
+ MinorNetworkCard = 0x00000009,
+ MinorOther = 0x00000000,
+ MinorOtherDriver = 0x0000000e,
+ MinorPowerSupply = 0x0000000a,
+ MinorProcessor = 0x00000008,
+ MinorReconfig = 0x00000004,
+ MinorSecurity = 0x00000013,
+ MinorSecurityFix = 0x00000012,
MinorSecurityFixUninstall = 0x00000018,
- MinorServicePack = 0x00000010,
+ MinorServicePack = 0x00000010,
MinorServicePackUninstall = 0x00000016,
- MinorTermSrv = 0x00000020,
- MinorUnstable = 0x00000006,
- MinorUpgrade = 0x00000003,
- MinorWMI = 0x00000015,
+ MinorTermSrv = 0x00000020,
+ MinorUnstable = 0x00000006,
+ MinorUpgrade = 0x00000003,
+ MinorWMI = 0x00000015,
- FlagUserDefined = 0x40000000,
- //FlagPlanned = 0x80000000,
+ FlagUserDefined = 0x40000000,
+ //FlagPlanned = 0x80000000,
}
[Flags]
@@ -343,7 +343,7 @@
Reboot = 0x02,
PowerOff = 0x08,
RestartApps = 0x40,
- // Optionally include ONE of the following two:
+ // Optionally include ONE of the following:
Force = 0x04,
ForceIfHung = 0x10,
}
@@ -376,16 +376,13 @@
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
- [DllImport("user32.dll")]
+ [DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool SetForegroundWindow(IntPtr hWnd);
+ public static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReasons dwReason);
- [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
- static extern int GetWindowTextLength(IntPtr hWnd);
+ [DllImport("user32.dll", SetLastError = true)]
+ public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
- [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
-
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern IntPtr SendMessageTimeout(
IntPtr hWnd,
@@ -402,16 +399,46 @@
//[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
//public static extern int RegisterWindowMessage(string lpString);
- [DllImport("user32.dll", SetLastError = true)]
+ [DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
- public static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason);
+ private static extern bool SetFocus(IntPtr hWnd);
- [DllImport("user32.dll", SetLastError = true)]
- public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static extern bool SetForegroundWindow(IntPtr hWnd);
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static extern bool BringWindowToTop(IntPtr hWnd);
+
+ //[DllImport("user32.dll")]
+ //[return: MarshalAs(UnmanagedType.Bool)]
+ //private static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
+
+ [DllImport("user32.dll")]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ private static extern bool AttachThreadInput(int nThreadId, int nThreadIdTo, bool bAttach);
+
+ //[DllImport("user32.dll")]
+ //[return: MarshalAs(UnmanagedType.Bool)]
+ //private static extern bool IsWindowVisible(IntPtr hWnd);
+
+ //[DllImport("user32.dll")]
+ //[return: MarshalAs(UnmanagedType.Bool)]
+ //private static extern bool IsIconic(IntPtr hWnd);
+
+ [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
+ private static extern int GetWindowTextLength(IntPtr hWnd);
+
+ [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
+ private static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
+
[DllImport("user32.dll", SetLastError = true)]
- public static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
+ private static extern int GetWindowThreadProcessId(IntPtr hWnd, out int lpdwProcessId);
+ [DllImport("kernel32.dll")]
+ private static extern int GetCurrentThreadId();
+
#region Net API
[DllImport("netapi32.dll", CharSet = CharSet.Auto, SetLastError = true), SuppressUnmanagedCodeSecurityAttribute]
@@ -444,6 +471,11 @@
#region Methods
+ /// <summary>
+ /// Get the window title for a specified window handle.
+ /// </summary>
+ /// <param name="hWnd">Handle to a window.</param>
+ /// <returns>Window title.</returns>
public static string GetWindowTitle(IntPtr hWnd)
{
int length = GetWindowTextLength(hWnd);
@@ -456,6 +488,65 @@
}
/// <summary>
+ /// Takes a given window from whatever state it is in and makes it the foreground window.
+ /// </summary>
+ /// <param name="hWnd">Handle to window.</param>
+ /// <param name="force">Force from a minimized or hidden state.</param>
+ /// <returns>Success.</returns>
+ public static bool SetForegroundWindow(IntPtr hWnd, bool force)
+ {
+ IntPtr fgWindow = GetForegroundWindow();
+
+ if (hWnd == fgWindow || SetForegroundWindow(hWnd))
+ return true;
+
+ if (force == false)
+ return false;
+
+ if (fgWindow == IntPtr.Zero)
+ return false;
+
+ int fgWindowPID = -1;
+ GetWindowThreadProcessId(fgWindow, out fgWindowPID);
+
+ if (fgWindowPID == -1)
+ return false;
+
+ int curThreadID = GetCurrentThreadId();
+
+ // if we don't attach successfully to the windows thread then we're out of options
+ if (!AttachThreadInput(curThreadID, fgWindowPID, true))
+ return false;
+
+ SetForegroundWindow(hWnd);
+ BringWindowToTop(hWnd);
+ SetFocus(hWnd);
+
+ AttachThreadInput(curThreadID, fgWindowPID, false);
+
+ // we've done all that we can so base our return value on whether we have succeeded or not
+ return (GetForegroundWindow() == hWnd);
+ }
+
+ /// <summary>
+ /// Get the Process ID of the current foreground window.
+ /// </summary>
+ /// <returns>Process ID.</returns>
+ public static int GetForegroundWindowPID()
+ {
+ int pid = -1;
+
+ IntPtr active = GetForegroundWindow();
+
+ if (active.Equals(IntPtr.Zero))
+ return pid;
+
+ GetWindowThreadProcessId(active, out pid);
+
+ return pid;
+ }
+
+ /// <summary>
/// Given a 32-bit integer this method returns the High Word (upper 16 bits).
/// </summary>
/// <param name="n">32-bit integer.</param>
Modified: trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/APipeConnection.cs
===================================================================
--- trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/APipeConnection.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IPC/AppModule.NamedPipes/APipeConnection.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -134,7 +134,7 @@
/// </summary>
/// <param name="disposing">A boolean indicating how the method is called.</param>
#endregion
- protected void Dispose(bool disposing) {
+ protected virtual void Dispose(bool disposing) {
if(!this.disposed) {
NamedPipeWrapper.Close(this.Handle);
}
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -55,7 +55,7 @@
static extern SafeFileHandle CreateFile(
[MarshalAs(UnmanagedType.LPTStr)] string fileName,
uint fileAccess,
- [MarshalAs(UnmanagedType.U4)] EFileShare fileShare,
+ [MarshalAs(UnmanagedType.U4)] EFileShares fileShare,
//[In, Out, MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(SecurityAttributesMarshaler))] SecurityAttributes lpSecurityAttributes,
IntPtr sa,
[MarshalAs(UnmanagedType.U4)] ECreationDisposition creationDisposition,
@@ -66,24 +66,22 @@
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool CancelIo(SafeFileHandle handle);
- [CLSCompliant(false)]
[Flags]
- public enum EFileShare : uint
+ public enum EFileShares
{
None = 0x00000000,
Read = 0x00000001,
Write = 0x00000002,
- Delete = 0x00000004
+ Delete = 0x00000004,
}
- [CLSCompliant(false)]
- public enum ECreationDisposition : uint
+ public enum ECreationDisposition
{
New = 1,
CreateAlways = 2,
OpenExisting = 3,
OpenAlways = 4,
- TruncateExisting = 5
+ TruncateExisting = 5,
}
[Flags]
@@ -294,7 +292,7 @@
if (devicePath == null)
throw new Exception("No device detected");
- SafeFileHandle deviceHandle = CreateFile(devicePath, GENERIC_READ, EFileShare.Read | EFileShare.Write, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.Overlapped, IntPtr.Zero);
+ SafeFileHandle deviceHandle = CreateFile(devicePath, GENERIC_READ, EFileShares.Read | EFileShares.Write, IntPtr.Zero, ECreationDisposition.OpenExisting, EFileAttributes.Overlapped, IntPtr.Zero);
int lastError = Marshal.GetLastWin32Error();
if (lastError != 0)
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -49,7 +49,7 @@
/// <summary>
/// Infrared command learning timed out.
/// </summary>
- Timeout
+ Timeout,
}
#endregion Enumerations
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Keyboard.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -17,7 +17,7 @@
byte bVk,
byte bScan,
uint dwFlags,
- UIntPtr dwExtraInfo);
+ IntPtr dwExtraInfo);
#endregion Interop
@@ -26,7 +26,7 @@
/// <summary>
/// Virtual Key Codes.
/// </summary>
- public enum VKey : byte
+ public enum VKey
{
None = 0,
VK_0 = 0x30,
@@ -174,7 +174,7 @@
/// Key Event Types.
/// </summary>
[Flags]
- public enum KeyEvents : uint
+ public enum KeyEvents
{
KeyDown = 0,
ExtendedKey = 1,
@@ -193,7 +193,7 @@
/// <param name="vKey">Virtual key to press.</param>
public static void KeyDown(VKey vKey)
{
- keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyDown, UIntPtr.Zero);
+ keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyDown, IntPtr.Zero);
}
/// <summary>
@@ -202,7 +202,7 @@
/// <param name="vKey">Virtual key to release.</param>
public static void KeyUp(VKey vKey)
{
- keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyUp, UIntPtr.Zero);
+ keybd_event((byte)vKey, 0, (uint)KeyEvents.KeyUp, IntPtr.Zero);
}
/// <summary>
@@ -212,7 +212,7 @@
/// <param name="scan">Scan code.</param>
/// <param name="flags">Event type.</param>
/// <param name="extraInfo">Pointer to additional information.</param>
- public static void Event(VKey vKey, byte scan, KeyEvents flags, UIntPtr extraInfo)
+ public static void Event(VKey vKey, byte scan, KeyEvents flags, IntPtr extraInfo)
{
keybd_event((byte)vKey, scan, (uint)flags, extraInfo);
}
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceDetectionData.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -23,17 +23,17 @@
}
[Flags]
- public enum KeyModifiers : uint
+ public enum KeyModifiers
{
- None = 0,
- LeftControl = 1,
- LeftShift = 2,
- LeftAlt = 4,
- LeftWin = 8,
- RightControl = 16,
- RightShift = 32,
- RightAlt = 64,
- RightWin = 128,
+ None = 0,
+ LeftControl = 1,
+ LeftShift = 2,
+ LeftAlt = 4,
+ LeftWin = 8,
+ RightControl = 16,
+ RightShift = 32,
+ RightAlt = 64,
+ RightWin = 128,
}
#endregion Enumerations
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceIrCode.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceIrCode.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MceIrCode.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -12,7 +12,7 @@
#region Constants
- public const int DefaultCarrierFrequency = 36000;
+ public const int DefaultCarrierFrequency = 38000;
#endregion Constants
@@ -48,11 +48,8 @@
#region Constructors
public MceIrCode() : this(MceIrCode.DefaultCarrierFrequency, null) { }
-
public MceIrCode(int carrier) : this(carrier, null) { }
-
public MceIrCode(byte[] data) : this(MceIrCode.DefaultCarrierFrequency, data) { }
-
public MceIrCode(int carrier, byte[] data)
{
_carrier = carrier;
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Mouse.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -23,7 +23,7 @@
/// Used to simulate mouse actions.
/// </summary>
[Flags]
- public enum MouseEvents : int
+ public enum MouseEvents
{
None = 0x0000,
Move = 0x0001,
@@ -34,17 +34,17 @@
MiddleDown = 0x0020,
MiddleUp = 0x0040,
Scroll = 0x0800,
- Absolute = 0x8000
+ Absolute = 0x8000,
}
/// <summary>
/// Used to simulate mouse wheel scrolling.
/// </summary>
- public enum ScrollDir : int
+ public enum ScrollDir
{
None = 0,
Up = 120,
- Down = -120
+ Down = -120,
}
#endregion Enumerations
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Pronto.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -14,7 +14,7 @@
#region Enumerations
- enum CodeType : ushort
+ enum CodeType
{
RawOscillated = 0x0000,
RawUnmodulated = 0x0100,
@@ -33,7 +33,7 @@
YamahaNEC = 0x9001,
}
- enum CarrierFrequency : ushort
+ enum CarrierFrequency
{
Khz38 = 0x006D,
Khz36 = 0x0073,
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs 2007-08-15 14:22:31 UTC (rev 840)
@@ -75,7 +75,7 @@
PosixSemantics = 0x01000000,
OpenReparsePoint = 0x00200000,
OpenNoRecall = 0x00100000,
- FirstPipeInstance = 0x00080000
+ FirstPipeInstance = 0x00080000,
}
[StructLayout(LayoutKind.Sequential)]
Modified: trunk/plugins/IR Server Suite/IR Server Suite.sln
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-08-15 14:08:45 UTC (rev 839)
+++ trunk/plugins/IR Server Suite/IR Server Suite.sln 2007-08-15 14:22:31 UTC (rev 840)
@@ -69,126 +69,248 @@
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IR Blast (No Window)", "Applications\IR Blast (No Window)\IR Blast (No Window).csproj", "{54E0E8FA-09C3-4755-B9CE-E7E5DDA3E932}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IrssComms", "Common\IrssComms\IrssComms.csproj", "{BCAFDF45-70DD-46FD-8B98-880DDA585AD2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Debug|x86.ActiveCfg = Debug|x86
{D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Debug|x86.Build.0 = Debug|x86
+ {D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Release|Any CPU.Build.0 = Release|Any CPU
{D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Release|x86.ActiveCfg = Release|x86
{D2A1F8D6-A9D3-4BFA-913B-8806642BD0DA}.Release|x86.Build.0 = Release|x86
+ {0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Debug|x86.ActiveCfg = Debug|x86
{0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Debug|x86.Build.0 = Debug|x86
+ {0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Release|Any CPU.Build.0 = Release|Any CPU
{0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Release|x86.ActiveCfg = Release|x86
{0C894165-4BE8-4CF7-8F92-2B6DF68EB43A}.Release|x86.Build.0 = Release|x86
+ {4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Debug|x86.ActiveCfg = Debug|x86
{4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Debug|x86.Build.0 = Debug|x86
+ {4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Release|Any CPU.Build.0 = Release|Any CPU
{4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Release|x86.ActiveCfg = Release|x86
{4CD051F4-F2B5-47B3-8647-F47C2E4DC131}.Release|x86.Build.0 = Release|x86
+ {A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Debug|x86.ActiveCfg = Debug|x86
{A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Debug|x86.Build.0 = Debug|x86
+ {A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Release|Any CPU.Build.0 = Release|Any CPU
{A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Release|x86.ActiveCfg = Release|x86
{A8B8B9C6-9E88-486B-AE9C-F2D945ED05A6}.Release|x86.Build.0 = Release|x86
+ {46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Debug|x86.ActiveCfg = Debug|x86
{46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Debug|x86.Build.0 = Debug|x86
+ {46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Release|Any CPU.Build.0 = Release|Any CPU
{46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Release|x86.ActiveCfg = Release|x86
{46C08F6B-F3C8-461B-9B6F-3BFD4AAAFD63}.Release|x86.Build.0 = Release|x86
+ {D871AB9A-71B3-4D63-8320-084BAD75064E}.Debug|Any CPU.ActiveCfg = Debug|An...
[truncated message content] |