|
From: <an...@us...> - 2007-12-02 09:18:00
|
Revision: 1115
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1115&view=rev
Author: and-81
Date: 2007-12-02 01:17:53 -0800 (Sun, 02 Dec 2007)
Log Message:
-----------
Modified Paths:
--------------
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/Skins/web.html
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
trunk/plugins/IR Server Suite/Documentation/Virtual Remote/index.html
trunk/plugins/IR Server Suite/Documentation/new.html
trunk/plugins/IR Server Suite/IR Server Suite.nsi
trunk/plugins/IR Server Suite/IR Server Suite.sln
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/Web Remote/
trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/
trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx
trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj
trunk/plugins/IR Server Suite/Applications/Web Remote/WebServer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Display.cs
trunk/plugins/ShortcutFileSupport/
trunk/plugins/ShortcutFileSupport/AssemblyInfo.cs
trunk/plugins/ShortcutFileSupport/FileIcon.cs
trunk/plugins/ShortcutFileSupport/LnkPlayer.cs
trunk/plugins/ShortcutFileSupport/ShellLink.cs
trunk/plugins/ShortcutFileSupport/ShortcutFileSupport Plugin.csproj
Removed Paths:
-------------
trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -72,11 +72,8 @@
}
}
- bool LoadSkinXml(string xmlFile)
+ void LoadSkinXml(string xmlFile)
{
- if (!File.Exists(xmlFile))
- return false;
-
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
@@ -109,8 +106,6 @@
}
Program.Buttons = (RemoteButton[])buttons.ToArray(typeof(RemoteButton));
-
- return true;
}
void SetSkinList()
@@ -141,7 +136,7 @@
string skinFile = String.Format("{0}\\Skins\\{1}.png", Program.InstallFolder, skin);
if (!File.Exists(skinFile))
- throw new FileNotFoundException("Skin graphic file not found", skin);
+ throw new FileNotFoundException("Skin graphic file not found", skinFile);
// 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", Program.InstallFolder, skin);
@@ -155,14 +150,12 @@
throw new FileNotFoundException("Skin file not found", xmlFile);
}
- if (LoadSkinXml(xmlFile))
- {
- this.BackgroundImage = new Bitmap(skinFile);
- this.ClientSize = new System.Drawing.Size(this.BackgroundImage.Width, this.BackgroundImage.Height);
- Program.RemoteSkin = skin;
- }
- else
- throw new FileNotFoundException("Failed to load skin, file not found", xmlFile);
+ LoadSkinXml(xmlFile);
+
+ this.BackgroundImage = new Bitmap(skinFile);
+ this.ClientSize = new Size(this.BackgroundImage.Width, this.BackgroundImage.Height);
+
+ Program.RemoteSkin = skin;
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -25,7 +25,6 @@
#region Constants
const string DefaultSkin = "MCE";
- const int DefaultWebPort = 2481;
static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml";
@@ -45,10 +44,6 @@
static RemoteButton[] _buttons;
- static WebServer _webServer;
-
- static int _webPort;
-
#endregion Variables
#region Properties
@@ -194,15 +189,8 @@
}
if (clientStarted)
- {
- _webServer = new WebServer(_webPort);
- _webServer.Run();
-
Application.Run(new MainForm());
- _webServer.Stop();
- }
-
SaveSettings();
}
@@ -252,14 +240,12 @@
_serverHost = "localhost";
_remoteSkin = DefaultSkin;
- _webPort = DefaultWebPort;
return;
}
try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } catch { _serverHost = "localhost"; }
try { _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value; } catch { _remoteSkin = DefaultSkin; }
- try { _webPort = int.Parse(doc.DocumentElement.Attributes["WebPort"].Value); } catch { _webPort = DefaultWebPort; }
}
static void SaveSettings()
{
@@ -275,7 +261,6 @@
writer.WriteAttributeString("ServerHost", _serverHost);
writer.WriteAttributeString("RemoteSkin", _remoteSkin);
- writer.WriteAttributeString("WebPort", _webPort.ToString());
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html 2007-12-02 09:17:53 UTC (rev 1115)
@@ -1,7 +1,22 @@
<HEAD>
-<TITLE>Virtual Remote</TITLE>
+<META HTTP-EQUIV="pragma" CONTENT="no-cache">
+<META HTTP-EQUIV="expires" CONTENT="0">
+
+<TITLE>Web Remote</TITLE>
+<SCRIPT LANGUAGE="JavaScript1.2">
+// <!--
+
+function SendMessage(message)
+{
+ xmlhttp = new XMLHttpRequest();
+ xmlhttp.open("GET", message, true);
+ xmlhttp.send(null);
+}
+
+// -->
+</SCRIPT>
</HEAD>
<BODY STYLE="margin: 0;">
-<IMG SRC="REMOTE_SKIN" BORDER="0" USEMAP="#REMOTE_MAP">
+<IMG SRC="REMOTE_SKIN.PNG" BORDER="0" USEMAP="#REMOTE_MAP">
</BODY>
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-12-02 09:17:53 UTC (rev 1115)
@@ -59,7 +59,6 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
@@ -77,7 +76,6 @@
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="RemoteButton.cs" />
- <Compile Include="WebServer.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Icon.ico" />
Deleted: trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -1,279 +0,0 @@
-using System;
-using System.Net;
-using System.Net.Sockets;
-using System.IO;
-using System.Text;
-using System.Threading;
-using System.Web;
-
-namespace VirtualRemote
-{
-
- /// <summary>
- /// Provides a Web front-end to the Virtual Remote.
- /// </summary>
- public class WebServer
- {
-
- #region Constants
-
- const string ServerName = "Virtual Remote";
-
- const string ButtonClickPrefix = "click?";
-
- #endregion Constants
-
- #region Variables
-
- int _serverPort;
-
- Socket _serverSocket;
- NetworkStream _networkStream;
- TextReader _networkReader;
-
- Thread _runningThread;
-
- #endregion Variables
-
- #region Constructor
-
- /// <summary>
- /// Initializes a new instance of the <see cref="WebServer"/> class.
- /// </summary>
- /// <param name="port">The port to serve on.</param>
- public WebServer(int port)
- {
- _serverPort = port;
- }
-
- #endregion Constructor
-
- #region Public Methods
-
- /// <summary>
- /// Runs the Web Server.
- /// </summary>
- public void Run()
- {
- if (_runningThread != null)
- _runningThread.Abort();
-
- _runningThread = new Thread(new ThreadStart(RunThread));
- _runningThread.IsBackground = true;
- _runningThread.Start();
- }
-
- /// <summary>
- /// Stops the Web Server.
- /// </summary>
- public void Stop()
- {
- if (_runningThread != null)
- {
- try
- {
- _runningThread.Abort();
- }
- finally
- {
- _runningThread = null;
- }
- }
- }
-
- #endregion Public Methods
-
- #region Implementation
-
- void RunThread()
- {
- try
- {
- _serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
- IPEndPoint ipe = new IPEndPoint(IPAddress.Any, _serverPort);
- _serverSocket.Bind(ipe);
-
- while (true)
- {
- Socket socket = AcceptConnection();
- string command = HttpUtility.UrlDecode(GetCommand());
-
- if (command.StartsWith("GET", StringComparison.OrdinalIgnoreCase))
- {
- string commandElement = GetCommandElement(command);
- DoGet(commandElement);
- }
-
- _networkStream.Flush();
- _networkStream.Close();
- }
-
- }
- finally
- {
- _serverSocket.Close();
- }
- }
-
- string CreateImageMap()
- {
- StringBuilder imageMap = new StringBuilder();
- imageMap.AppendLine("<MAP NAME=\"REMOTE_MAP\">");
-
- foreach (RemoteButton button in Program.Buttons)
- {
- string area = String.Format(
- "<AREA SHAPE=\"rect\" COORDS=\"{0},{1},{2},{3}\" TITLE=\"{4}\" HREF=\"{5}{6}\">",
- button.Left, button.Top, button.Left + button.Width, button.Top + button.Height,
- button.Name,
- ButtonClickPrefix, button.Code);
-
- imageMap.AppendLine(area);
- }
-
- imageMap.AppendLine("<AREA SHAPE=\"default\" NOHREF>");
- imageMap.AppendLine("</MAP>");
-
- return imageMap.ToString();
- }
-
- void DoGet(string argument)
- {
- string url = GetUrl(argument);
-
- if (url.StartsWith("/"))
- url = url.Substring(1);
-
- if (url.Length == 0)
- url = "INDEX.HTML";
-
- if (url.StartsWith(ButtonClickPrefix, StringComparison.OrdinalIgnoreCase))
- {
- string command = url.Substring(ButtonClickPrefix.Length);
-
- Program.ButtonPress(command);
-
- url = "INDEX.HTML";
- }
-
- switch (url.ToUpperInvariant())
- {
- case "INDEX.HTML":
- SendOK("text/html; charset=utf-8");
- SendString("<HTML>");
- SendFile(String.Format("{0}\\Skins\\web.html", Program.InstallFolder));
- SendString(CreateImageMap());
- SendString("</HTML>");
- break;
-
- case "REMOTE_SKIN":
- SendOK("image/png");
- SendFile(String.Format("{0}\\Skins\\{1}.png", Program.InstallFolder, Program.RemoteSkin));
- break;
-
- default:
- SendError(404, "File Not Found");
- break;
- }
- }
-
- string GetUrl(string argument)
- {
- StringBuilder outputString = new StringBuilder();
-
- for (int index = 0; index < argument.Length; index++)
- {
- char curChar = argument[index];
-
- if (Char.IsWhiteSpace(curChar))
- break;
-
- outputString.Append(curChar);
- }
-
- return outputString.ToString();
- }
-
- Socket AcceptConnection()
- {
-
- _serverSocket.Listen(1);
- Socket socket = _serverSocket.Accept();
-
- _networkStream = new NetworkStream(socket, FileAccess.ReadWrite, true);
- _networkReader = new StreamReader(_networkStream);
- IPEndPoint ep = (IPEndPoint)socket.RemoteEndPoint;
-
- return socket;
- }
-
- string GetCommand()
- {
- string buf;
- string command = String.Empty;
- bool first = true;
-
- while ((buf = _networkReader.ReadLine()) != null && buf.Length > 0)
- {
- if (first)
- {
- command = buf;
- first = false;
- }
- }
-
- return command;
- }
-
- string GetCommandElement(string command)
- {
- string[] commandElements = command.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
- return commandElements[1];
- }
-
- void SendFile(string path)
- {
- byte[] buffer = new byte[2048];
-
- int byteCount;
- using (FileStream fileStream = File.OpenRead(path))
- {
- while ((byteCount = fileStream.Read(buffer, 0, buffer.Length)) > 0)
- {
- _networkStream.Write(buffer, 0, byteCount);
- }
- }
- }
-
- void SendString(string message, params object[] args)
- {
- string output = String.Format(message, args);
-
- byte[] outputBytes = Encoding.ASCII.GetBytes(output);
-
- _networkStream.Write(outputBytes, 0, outputBytes.Length);
- }
-
- void SendError(int errorNumber, string errorString)
- {
- SendString("HTTP/1.1 {0} {1}\r\n", errorNumber, errorString);
- SendString("Date:{0}\r\n", DateTime.Now);
- SendString("Server:{0}\r\n", ServerName);
- SendString("Content-Type: text/html; charset=utf-8\r\n");
- SendString("Connection: close\r\n");
- }
-
- void SendOK(string contentType)
- {
- SendString("HTTP/1.1 200 OK\r\n");
- SendString("Date:{0}\r\n", DateTime.Now);
- SendString("Server:{0}\r\n", ServerName);
- SendString("Content-Type: {0}\r\n\r\n", contentType);
- }
-
- #endregion Implementation
-
- }
-
-}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,539 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+using System.Web;
+using System.Windows.Forms;
+using System.Xml;
+
+#if TRACE
+using System.Diagnostics;
+#endif
+
+using IrssComms;
+using IrssUtils;
+using IrssUtils.Forms;
+
+namespace WebRemote
+{
+
+ /// <summary>
+ /// Web Remote.
+ /// </summary>
+ public static class Program
+ {
+
+ #region Constants
+
+ internal const string ButtonClickPrefix = "send?";
+
+ const string DefaultSkin = "MCE";
+ const int DefaultWebPort = 2481;
+
+ static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Web Remote.xml";
+
+ #endregion Constants
+
+ #region Variables
+
+ static NotifyIcon _notifyIcon;
+
+ static bool _inConfiguration;
+
+ static Client _client;
+
+ static bool _registered;
+ static string _serverHost;
+ static string _installFolder;
+ static string _remoteSkin;
+
+ static RemoteButton[] _buttons;
+
+ static WebServer _webServer;
+ static int _webPort;
+
+ static string _imageFile;
+ static string _imageMap;
+ static string _webFile;
+
+ #endregion Variables
+
+ #region Properties
+
+ internal static string InstallFolder
+ {
+ get { return _installFolder; }
+ }
+
+ internal static string RemoteSkin
+ {
+ get { return _remoteSkin; }
+ }
+
+ internal static string ImageFile
+ {
+ get { return _imageFile; }
+ }
+
+ internal static string ImageMap
+ {
+ get { return _imageMap; }
+ }
+
+ internal static string WebFile
+ {
+ get { return _webFile; }
+ }
+
+ #endregion Properties
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ // Check for multiple instances.
+ if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1)
+ return;
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+
+#if DEBUG
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+#else
+ IrssLog.LogLevel = IrssLog.Level.Info;
+#endif
+ IrssLog.Open(Common.FolderIrssLogs + "Web Remote.log");
+
+ Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
+
+ LoadSettings();
+
+ if (String.IsNullOrEmpty(_serverHost))
+ {
+ ServerAddress serverAddress = new ServerAddress();
+ serverAddress.ShowDialog();
+
+ _serverHost = serverAddress.ServerHost;
+ }
+
+ bool clientStarted = false;
+
+ IPAddress serverIP = Client.GetIPFromName(_serverHost);
+ IPEndPoint endPoint = new IPEndPoint(serverIP, IrssComms.Server.DefaultPort);
+
+ try
+ {
+ clientStarted = StartClient(endPoint);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ clientStarted = false;
+ }
+
+ if (clientStarted)
+ {
+ ContextMenuStrip contextMenu = new ContextMenuStrip();
+ contextMenu.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup)));
+ contextMenu.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
+
+ _notifyIcon = new NotifyIcon();
+ _notifyIcon.ContextMenuStrip = contextMenu;
+ _notifyIcon.DoubleClick += new EventHandler(ClickSetup);
+ _notifyIcon.Icon = Properties.Resources.Icon;
+ _notifyIcon.Text = "Web Remote";
+
+ ChangeSkin();
+
+ try
+ {
+ _webServer = new WebServer(_webPort);
+ _webServer.Run();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ _notifyIcon.Visible = true;
+
+ Application.Run();
+
+ _notifyIcon.Visible = false;
+
+ if (_webServer != null)
+ _webServer.Stop();
+ }
+
+ SaveSettings();
+
+ StopClient();
+
+ Application.ThreadException -= new ThreadExceptionEventHandler(Application_ThreadException);
+
+ IrssLog.Close();
+ }
+
+ /// <summary>
+ /// Handles unhandled exceptions.
+ /// </summary>
+ /// <param name="sender">Sender.</param>
+ /// <param name="e">Event args.</param>
+ public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
+ {
+ IrssLog.Error(e.Exception.ToString());
+ }
+
+ static bool Configure()
+ {
+ Setup setup = new Setup();
+
+ setup.ServerHost = _serverHost;
+ setup.RemoteSkin = _remoteSkin;
+ setup.WebPort = _webPort;
+
+ if (setup.ShowDialog() == DialogResult.OK)
+ {
+ _serverHost = setup.ServerHost;
+ _remoteSkin = setup.RemoteSkin;
+ _webPort = setup.WebPort;
+
+ SaveSettings();
+
+ return true;
+ }
+
+ return false;
+ }
+
+ static void ClickSetup(object sender, EventArgs e)
+ {
+ IrssLog.Info("Setup");
+
+ _inConfiguration = true;
+
+ if (_webServer != null)
+ {
+ _webServer.Stop();
+ _webServer = null;
+ }
+
+ if (Configure())
+ ChangeSkin();
+
+ try
+ {
+ _webServer = new WebServer(_webPort);
+ _webServer.Run();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ MessageBox.Show(ex.ToString(), "Web Remote - Setup Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+
+ _inConfiguration = false;
+ }
+ static void ClickQuit(object sender, EventArgs e)
+ {
+ IrssLog.Info("Quit");
+
+ if (_inConfiguration)
+ {
+ IrssLog.Info("In Configuration");
+ return;
+ }
+
+ Application.Exit();
+ }
+
+ internal static void ButtonPress(string keyCode)
+ {
+#if TRACE
+ Trace.WriteLine("ButtonPress: " + keyCode);
+#endif
+ if (!_registered)
+ return;
+
+ IrssMessage message = new IrssMessage(MessageType.ForwardRemoteEvent, MessageFlags.Notify, keyCode);
+ SendMessage(message);
+ }
+
+ static void ChangeSkin()
+ {
+ SetSkin(_remoteSkin);
+
+ _imageMap = CreateImageMap();
+ _webFile = String.Format("{0}\\Skins\\web.html", _installFolder);
+ }
+
+ static void SetSkin(string skin)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(skin))
+ return;
+
+ _imageFile = String.Format("{0}\\Skins\\{1}.png", _installFolder, skin);
+ if (!File.Exists(_imageFile))
+ throw new FileNotFoundException("Skin graphic file not found", _imageFile);
+
+ // 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);
+ if (!File.Exists(xmlFile))
+ {
+ string firstWord = skin.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0];
+
+ xmlFile = String.Format("{0}\\Skins\\{1}.xml", _installFolder, firstWord);
+
+ if (!File.Exists(xmlFile))
+ throw new FileNotFoundException("Skin file not found", xmlFile);
+ }
+
+ LoadSkinXml(xmlFile);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, "Web Remote - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+ static void LoadSkinXml(string xmlFile)
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(xmlFile);
+
+ ArrayList buttons = new ArrayList();
+ RemoteButton temp;
+ string key = String.Empty;
+
+ XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("button");
+ foreach (XmlNode item in commandSequence)
+ {
+ temp = new RemoteButton();
+ temp.Name = item.Attributes["name"].Value;
+ temp.Code = item.Attributes["code"].Value;
+
+ try
+ {
+ key = item.Attributes["shortcut"].Value;
+ temp.Shortcut = (Keys)Enum.Parse(typeof(Keys), key, true);
+ }
+ catch (ArgumentException)
+ {
+ IrssLog.Error("Invalid Key Shortcut \"{0}\" in skin \"{1}\"", key, xmlFile);
+ }
+
+ temp.Top = int.Parse(item.Attributes["top"].Value);
+ temp.Left = int.Parse(item.Attributes["left"].Value);
+ temp.Height = int.Parse(item.Attributes["height"].Value);
+ temp.Width = int.Parse(item.Attributes["width"].Value);
+ buttons.Add(temp);
+ }
+
+ _buttons = (RemoteButton[])buttons.ToArray(typeof(RemoteButton));
+ }
+
+ static string CreateImageMap()
+ {
+ StringBuilder imageMap = new StringBuilder();
+ imageMap.AppendLine("<MAP NAME=\"REMOTE_MAP\">");
+
+ foreach (RemoteButton button in _buttons)
+ {
+ string area = String.Format(
+ "<AREA SHAPE=\"rect\" COORDS=\"{0},{1},{2},{3}\" TITLE=\"{4}\" HREF=\"#\" ONCLICK=\"SendMessage('{5}{6}');return false;\">",
+ button.Left, button.Top, button.Left + button.Width, button.Top + button.Height,
+ button.Name,
+ ButtonClickPrefix, button.Code);
+
+ imageMap.AppendLine(area);
+ }
+
+ imageMap.AppendLine("<AREA SHAPE=\"default\" NOHREF>");
+ imageMap.AppendLine("</MAP>");
+
+ return imageMap.ToString();
+ }
+
+ static void LoadSettings()
+ {
+ try
+ {
+ _installFolder = SystemRegistry.GetInstallFolder();
+ if (String.IsNullOrEmpty(_installFolder))
+ _installFolder = ".";
+ else
+ _installFolder += "\\Virtual Remote";
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _installFolder = ".";
+ }
+
+ XmlDocument doc = new XmlDocument();
+
+ try
+ {
+ doc.Load(ConfigurationFile);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _serverHost = "localhost";
+ _remoteSkin = DefaultSkin;
+ _webPort = DefaultWebPort;
+
+ return;
+ }
+
+ try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } catch { _serverHost = "localhost"; }
+ try { _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value; } catch { _remoteSkin = DefaultSkin; }
+ try { _webPort = int.Parse(doc.DocumentElement.Attributes["WebPort"].Value); } catch { _webPort = DefaultWebPort; }
+ }
+ static void SaveSettings()
+ {
+ try
+ {
+ using (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.WriteAttributeString("WebPort", _webPort.ToString());
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ static void CommsFailure(object obj)
+ {
+ Exception ex = obj as Exception;
+
+ if (ex != null)
+ IrssLog.Error("Communications failure: {0}", ex.Message);
+ else
+ IrssLog.Error("Communications failure");
+
+ StopClient();
+
+ MessageBox.Show("Please report this error.", "Virtual Remote - Communications failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ static void Connected(object obj)
+ {
+ IrssLog.Info("Connected to server");
+
+ IrssMessage message = new IrssMessage(MessageType.RegisterClient, MessageFlags.Request);
+ _client.Send(message);
+ }
+ static void Disconnected(object obj)
+ {
+ IrssLog.Warn("Communications with server has been lost");
+
+ Thread.Sleep(1000);
+ }
+
+ static bool StartClient(IPEndPoint endPoint)
+ {
+ if (_client != null)
+ return false;
+
+ ClientMessageSink sink = new ClientMessageSink(ReceivedMessage);
+
+ _client = new Client(endPoint, sink);
+ _client.CommsFailureCallback = new WaitCallback(CommsFailure);
+ _client.ConnectCallback = new WaitCallback(Connected);
+ _client.DisconnectCallback = new WaitCallback(Disconnected);
+
+ if (_client.Start())
+ {
+ return true;
+ }
+ else
+ {
+ _client = null;
+ return false;
+ }
+ }
+ static void StopClient()
+ {
+ if (_client == null)
+ return;
+
+ _client.Dispose();
+ _client = null;
+ }
+
+ static void SendMessage(IrssMessage message)
+ {
+ if (message == null)
+ throw new ArgumentNullException("message");
+
+ if (_client != null)
+ _client.Send(message);
+ }
+
+ static void ReceivedMessage(IrssMessage received)
+ {
+ IrssLog.Debug("Received Message \"{0}\"", received.Type);
+
+ try
+ {
+ switch (received.Type)
+ {
+ case MessageType.RegisterClient:
+ if ((received.Flags & MessageFlags.Success) == MessageFlags.Success)
+ {
+ //_irServerInfo = IRServerInfo.FromBytes(received.DataAsBytes);
+ _registered = true;
+
+ IrssLog.Info("Registered to IR Server");
+ }
+ else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure)
+ {
+ _registered = false;
+ IrssLog.Warn("IR Server refused to register");
+ }
+ break;
+
+ case MessageType.ServerShutdown:
+ IrssLog.Warn("IR Server Shutdown - Web Remote disabled until IR Server returns");
+ _registered = false;
+ break;
+
+ case MessageType.Error:
+ IrssLog.Error(received.GetDataAsString());
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Web Remote")]
+[assembly: AssemblyDescription("Web interface for Virtual Remote")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Web Remote")]
+[assembly: AssemblyCopyright("Aaron Dinnage")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c21b2341-e3ef-4bba-b9f9-da4985047419")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.3.5")]
+[assembly: AssemblyFileVersion("1.0.3.5")]
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,64 @@
+using System;
+using System.Windows.Forms;
+
+namespace WebRemote
+{
+
+ struct RemoteButton
+ {
+
+ #region Variables
+
+ string _name;
+ string _code;
+ Keys _shortcut;
+ int _top;
+ int _left;
+ int _width;
+ int _height;
+
+ #endregion Variables
+
+ #region Properties
+
+ public string Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ public string Code
+ {
+ get { return _code; }
+ set { _code = value; }
+ }
+ public Keys Shortcut
+ {
+ get { return _shortcut; }
+ set { _shortcut = value; }
+ }
+ public int Top
+ {
+ get { return _top; }
+ set { _top = value; }
+ }
+ public int Left
+ {
+ get { return _left; }
+ set { _left = value; }
+ }
+ public int Width
+ {
+ get { return _width; }
+ set { _width = value; }
+ }
+ public int Height
+ {
+ get { return _height; }
+ set { _height = value; }
+ }
+
+ #endregion Properties
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,188 @@
+namespace WebRemote
+{
+ partial class Setup
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Setup));
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.buttonCancel = new System.Windows.Forms.Button();
+ this.groupBoxServerHost = new System.Windows.Forms.GroupBox();
+ this.comboBoxComputer = new System.Windows.Forms.ComboBox();
+ this.groupBoxWebServer = new System.Windows.Forms.GroupBox();
+ this.numericUpDownWebPort = new System.Windows.Forms.NumericUpDown();
+ this.labelPort = new System.Windows.Forms.Label();
+ this.labelSkin = new System.Windows.Forms.Label();
+ this.comboBoxSkin = new System.Windows.Forms.ComboBox();
+ this.groupBoxServerHost.SuspendLayout();
+ this.groupBoxWebServer.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWebPort)).BeginInit();
+ 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(152, 168);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(56, 24);
+ this.buttonOK.TabIndex = 2;
+ this.buttonOK.Text = "OK";
+ this.buttonOK.UseVisualStyleBackColor = true;
+ this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.Location = new System.Drawing.Point(216, 168);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.Size = new System.Drawing.Size(56, 24);
+ this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.Text = "Cancel";
+ this.buttonCancel.UseVisualStyleBackColor = true;
+ this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+ //
+ // groupBoxServerHost
+ //
+ this.groupBoxServerHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxServerHost.Controls.Add(this.comboBoxComputer);
+ this.groupBoxServerHost.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxServerHost.Name = "groupBoxServerHost";
+ this.groupBoxServerHost.Size = new System.Drawing.Size(264, 56);
+ this.groupBoxServerHost.TabIndex = 0;
+ this.groupBoxServerHost.TabStop = false;
+ this.groupBoxServerHost.Text = "IR Server host";
+ //
+ // comboBoxComputer
+ //
+ this.comboBoxComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.comboBoxComputer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
+ this.comboBoxComputer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
+ this.comboBoxComputer.FormattingEnabled = true;
+ this.comboBoxComputer.Location = new System.Drawing.Point(8, 24);
+ this.comboBoxComputer.Name = "comboBoxComputer";
+ this.comboBoxComputer.Size = new System.Drawing.Size(248, 21);
+ this.comboBoxComputer.TabIndex = 0;
+ //
+ // groupBoxWebServer
+ //
+ this.groupBoxWebServer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxWebServer.Controls.Add(this.numericUpDownWebPort);
+ this.groupBoxWebServer.Controls.Add(this.labelPort);
+ this.groupBoxWebServer.Controls.Add(this.labelSkin);
+ this.groupBoxWebServer.Controls.Add(this.comboBoxSkin);
+ this.groupBoxWebServer.Location = new System.Drawing.Point(8, 72);
+ this.groupBoxWebServer.Name = "groupBoxWebServer";
+ this.groupBoxWebServer.Size = new System.Drawing.Size(264, 88);
+ this.groupBoxWebServer.TabIndex = 1;
+ this.groupBoxWebServer.TabStop = false;
+ this.groupBoxWebServer.Text = "Web Server";
+ //
+ // numericUpDownWebPort
+ //
+ this.numericUpDownWebPort.Location = new System.Drawing.Point(88, 24);
+ this.numericUpDownWebPort.Maximum = new decimal(new int[] {
+ 65535,
+ 0,
+ 0,
+ 0});
+ this.numericUpDownWebPort.Name = "numericUpDownWebPort";
+ this.numericUpDownWebPort.Size = new System.Drawing.Size(72, 20);
+ this.numericUpDownWebPort.TabIndex = 1;
+ this.numericUpDownWebPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
+ // labelPort
+ //
+ this.labelPort.Location = new System.Drawing.Point(8, 24);
+ this.labelPort.Name = "labelPort";
+ this.labelPort.Size = new System.Drawing.Size(80, 20);
+ this.labelPort.TabIndex = 0;
+ this.labelPort.Text = "Server Port:";
+ this.labelPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelSkin
+ //
+ this.labelSkin.Location = new System.Drawing.Point(8, 53);
+ this.labelSkin.Name = "labelSkin";
+ this.labelSkin.Size = new System.Drawing.Size(80, 24);
+ this.labelSkin.TabIndex = 2;
+ this.labelSkin.Text = "Skin:";
+ this.labelSkin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // comboBoxSkin
+ //
+ this.comboBoxSkin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.comboBoxSkin.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
+ this.comboBoxSkin.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
+ this.comboBoxSkin.FormattingEnabled = true;
+ this.comboBoxSkin.Location = new System.Drawing.Point(88, 56);
+ this.comboBoxSkin.Name = "comboBoxSkin";
+ this.comboBoxSkin.Size = new System.Drawing.Size(168, 21);
+ this.comboBoxSkin.TabIndex = 3;
+ //
+ // Setup
+ //
+ 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(280, 207);
+ this.Controls.Add(this.groupBoxWebServer);
+ this.Controls.Add(this.groupBoxServerHost);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(288, 234);
+ this.Name = "Setup";
+ this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
+ this.Text = "Web Remote Setup";
+ this.groupBoxServerHost.ResumeLayout(false);
+ this.groupBoxWebServer.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWebPort)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.Button buttonCancel;
+ private System.Windows.Forms.GroupBox groupBoxServerHost;
+ private System.Windows.Forms.ComboBox comboBoxComputer;
+ private System.Windows.Forms.GroupBox groupBoxWebServer;
+ private System.Windows.Forms.NumericUpDown numericUpDownWebPort;
+ private System.Windows.Forms.Label labelPort;
+ private System.Windows.Forms.Label labelSkin;
+ private System.Windows.Forms.ComboBox comboBoxSkin;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,114 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+
+using IrssUtils;
+
+namespace WebRemote
+{
+
+ /// <summary>
+ /// Setup Form.
+ /// </summary>
+ public partial class Setup : Form
+ {
+
+ #region Properties
+
+ /// <summary>
+ /// Gets or sets the server host.
+ /// </summary>
+ /// <value>The server host.</value>
+ public string ServerHost
+ {
+ get { return comboBoxComputer.Text; }
+ set { comboBoxComputer.Text = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the remote skin.
+ /// </summary>
+ /// <value>The remote skin.</value>
+ public string RemoteSkin
+ {
+ get { return comboBoxSkin.Text; }
+ set { comboBoxSkin.Text = value; }
+ }
+
+ /// <summary>
+ /// Gets or sets the web server port.
+ /// </summary>
+ /// <value>The web server port.</value>
+ public int WebPort
+ {
+ get { return Decimal.ToInt32(numericUpDownWebPort.Value); }
+ set { numericUpDownWebPort.Value = new Decimal(value); }
+ }
+
+ #endregion Properties
+
+ #region Constructor
+
+ public Setup()
+ {
+ InitializeComponent();
+
+ UpdateComputerList();
+
+ UpdateSkinList();
+ }
+
+ #endregion Constructor
+
+ #region Implementation
+
+ void UpdateComputerList()
+ {
+ comboBoxComputer.Items.Clear();
+ comboBoxComputer.Items.Add("localhost");
+
+ List<string> networkPCs = Network.GetComputers(false);
+ if (networkPCs != null)
+ comboBoxComputer.Items.AddRange(networkPCs.ToArray());
+ }
+
+ void UpdateSkinList()
+ {
+ try
+ {
+ string[] skins = Directory.GetFiles(Program.InstallFolder + "\\Skins\\", "*.png", SearchOption.TopDirectoryOnly);
+ for (int index = 0; index < skins.Length; index++)
+ skins[index] = Path.GetFileNameWithoutExtension(skins[index]);
+
+ comboBoxSkin.Items.Clear();
+ comboBoxSkin.Items.AddRange(skins);
+
+ comboBoxSkin.SelectedItem = Program.RemoteSkin;
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.Message);
+ }
+ }
+
+ #endregion Implementation
+
+ private void buttonOK_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ AAABAAIAICAAAAEACACoCAAAJgAAABAQAAABAAgAaAUAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+BhQD/f4MA/4OHAP+DhgD/e38A/36CAP+BhAD/fYEA/3p+AP+A
+ hAD/goYA/3l9AP9vcwD/ZGgA/2VpAP9ucgD/foEA/3yAAP9zdwD/aGwA/2JnAP+FiAD/dXkA/2xwAP9w
+ dQD/mJsA/7W3AP/IygD/0dMA/9/gAP/h4gD/4+QA/+DhAP/W1wD/yssA/8TGAP+mqQD/am4A/3F1AP90
+ eAD/oKMA/7q8AP/T1AD/8vIA/7/BAP+ipQD/h4sA/3h8AP+hpAD/29wA//39AP/l5gD/09UA/8XHAP+3
+ uQD/s7UA/7GzAP+2uAD/x8kA/8zNAP/V1gD/9/cA/9zdAP+MkAD/cnYA/3d7AP+IjAD/zc4A//7+AP/l
+ 5QD/1NUA/66wAP9pbQD/cHQA/3J3AP+ZnAD/6usA/+bnAP+fogD/2NkA/6yvAP9nawD/m54A//HyAP+C
+ hQD/lZgA/8jJAP/BwwD/iY0A/4aKAP+oqwD/7e4A/+vrAP+gogD/io4A/3Z6AP9tcQD/ZmoA/5SYAP+S
+ lQD/qq0A/7m7AP/CxAD/uLoA/6WoAP+RlAD/hIgA/4uPAP+tsAD/zs8A//DwAP/X2AD/en0A/4aJAP/0
+ 9AD/6+wA/+LjAP/e3wD/5+gA/8DCAP98fwD/+fkA/93eAP+8vgD/nJ8A//Hx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D/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8D
+ AABQBAAAcAYAAJAJAACwCgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAA
+ AAAvAA4AUAAXAHAAIQCQACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP//
+ /wAAAAAALwAgAFAANgBwAEwAkABiALAAeADPAI4A8ACkAP8RswD/Mb4A/1HHAP9x0QD/kdwA/7HlAP/R
+ 8AD///8AAAAAACwALwBLAFAAaQBwAIcAkAClALAAxADPAOEA8ADwEf8A8jH/APRR/wD2cf8A95H/APmx
+ /wD70f8A////AAAAAAAbAC8ALQBQAD8AcABSAJAAYwCwAHYAzwCIAPAAmRH/AKYx/wC0Uf8AwnH/AM+R
+ /wDcsf8A69H/AP///wAAAAAACAAvAA4AUAAVAHAAGwCQACEAsAAmAM8ALADwAD4R/wBYMf8AcVH/AIxx
+ /wCmkf8Av7H/ANrR/wD///8AFRAAFRUVFRUVFRUVFQAQFRUZJBUVFRUVFRUVFRUkGRUQKicQFRUVFRUV
+ FRUQJyoQEDEYGBkVFRUVFRUZGBgxEBUxACsmEBUVFRUQJisAMRUdLAAxFyEVDw4RIRcxACwdICgQMwAx
+ HAgUGjEAMxAoICIlFy8ANAoEAgk0AC8XJSIjJRcvADUKAwEHNAAvFyUjISYVMQA1EwUGDTUAMRUmIR4q
+ EDMQKRkMCxspEDMQKh4XMAAuIRAQFhIQECEuADAXEDIQIB8VFRUVFRUfIBAyEBAtIRAVFRUVFRUVFRAh
+ LRAVHiEVFRUVFRUVFRUVIR4VFRAQFRUVFRUVFRUVFRAQFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+</value>
+ </data>
+</root>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,91 @@
+<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>{CCDBA239-8E8E-4F5F-A098-7132EED5F160}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WebRemote</RootNamespace>
+ <AssemblyName>WebRemote</AssemblyName>
+ <StartupObject>WebRemote.Program</StartupObject>
+ <ApplicationIcon>Icon.ico</ApplicationIcon>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Deployment" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="RemoteButton.cs" />
+ <Compile Include="Setup.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Setup.Designer.cs">
+ <DependentUpon>Setup.cs</DependentUpon>
+ </Compile>
+ <Compile Include="WebServer.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Common\IrssComms\IrssComms.csproj">
+ <Project>{BCAFDF45-70DD-46FD-8B98-880DDA585AD2}</Project>
+ <Name>IrssComms</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj">
+ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project>
+ <Name>IrssUtils</Name>
+ </ProjectReference>
+ </ItemGro...
[truncated message content] |