From: <an...@us...> - 2008-03-03 06:55:10
|
Revision: 1416 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1416&view=rev Author: and-81 Date: 2008-03-02 22:55:09 -0800 (Sun, 02 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Data.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/DboxFunctions.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi Added Paths: ----------- trunk/plugins/MceIrApi/ trunk/plugins/MceIrApi/Api.cs trunk/plugins/MceIrApi/MceIr.dll trunk/plugins/MceIrApi/MceIrApi.csproj trunk/plugins/MceIrApi/MceIrApi.sln trunk/plugins/MceIrApi/Properties/ trunk/plugins/MceIrApi/Properties/AssemblyInfo.cs trunk/plugins/MceIrApi/TestApp/ trunk/plugins/MceIrApi/TestApp/FormMain.Designer.cs trunk/plugins/MceIrApi/TestApp/FormMain.cs trunk/plugins/MceIrApi/TestApp/FormMain.resx trunk/plugins/MceIrApi/TestApp/Program.cs trunk/plugins/MceIrApi/TestApp/Properties/ trunk/plugins/MceIrApi/TestApp/Properties/AssemblyInfo.cs trunk/plugins/MceIrApi/TestApp/TestApp.csproj Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Data.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Data.cs 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Data.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -58,8 +58,6 @@ { get { - DboxFunctions dboxfunc = new DboxFunctions(_url, _userName, _password, _boxtype); - //dboxfunc.ErrorLog("data.cs box = " + _boxtype); string command = ""; string temp = ""; string sreturn = ""; @@ -79,7 +77,6 @@ sreturn = sreturn.Replace(";", " "); sreturn = sreturn.Replace(" selected", ""); // removes enigma v1's selected tag in bouquets output - //dboxfunc.ErrorLog("returned bouquets: " + sreturn); // set the bouquet command for this boxtype command = "/cgi-bin/getServices?ref="; break; @@ -111,7 +108,6 @@ } command = "/web/fetchchannels?ServiceListBrowse="; - //dboxfunc.ErrorLog("returned bouquets: " + sreturn); break; default: @@ -149,18 +145,13 @@ else temp = s.Split(' ')[0]; //otherboxes splitchar is " " - //dboxfunc.ErrorLog("splitted string to temp: " + temp); - if (_boxtype == "Neutrino") _Command = command + temp + "&mode=TV"; //build neutrino command else _Command = command + temp; //build enigma command - - //dboxfunc.ErrorLog("sending command: " + _Command); - + sreturn = request.PostData(_Command); //request list of channels contained in bouquetID "temp" sreturn = sreturn.Replace(";selected", ""); - //dboxfunc.ErrorLog("sent command and returned: " + sreturn); if (_boxtype == "Enigma v2") { @@ -190,21 +181,17 @@ string[] OneBouquet = sreturn.Split('\n'); string bucket = ""; - ////dboxfunc.ErrorLog("starting onebouquet again"); + if (OneBouquet[0] != "") { - foreach (string bouquets in OneBouquet) { - - //dboxfunc.ErrorLog("on top of onebouquets foreach"); if (bouquets != "") { - //dboxfunc.ErrorLog("string is: " + bouquets); if ((bouquets.IndexOf(' ') > -1) || (bouquets.IndexOf(';') > -1)) { row = table.NewRow(); - //dboxfunc.ErrorLog("created new row"); + int start = 0; // modifying the enigma string so it's the same as neutrino // that way I don't need to rewrite this textfilter @@ -218,8 +205,6 @@ bucket = Convert.ToString(++loopcount) + " " + chan_id + " " + chan_name; } - //dboxfunc.ErrorLog("starting string functions"); - //dboxfunc.ErrorLog("split tmp_ref: " + s + " number of chars: " + s.Length); if (_boxtype == "Neutrino") bucket = bouquets; @@ -233,21 +218,16 @@ start = tmp_Ref.Length + 1; String tmp_Bouquet = s.Substring(start, s.Length - start); - //dboxfunc.ErrorLog("split tmp_bouq, bucket is: " + bucket); String tmp_Channel = bucket.Split(' ')[0]; - //dboxfunc.ErrorLog("split channel"); String tmp_ID = bucket.Split(' ')[1]; if (_boxtype == "Enigma v1") tmp_ID = tmp_ID.Replace("1:0:0:0:0:0:0:0:0:0:", _url + "/rootX"); //workaround for the inability to stream internal recordings from the enigma hdd - //dboxfunc.ErrorLog("split ID"); start = tmp_Channel.Length + tmp_ID.Length + 2; String tmp_Name = bucket.Substring(start, bucket.Length - start); - //dboxfunc.ErrorLog("split name"); tmp_Name = tmp_Name.Replace("\"", "'"); - //dboxfunc.ErrorLog("ended string functions"); row["BouqNo"] = tmp_Ref; row["BouqName"] = tmp_Bouquet; @@ -255,19 +235,13 @@ row["ID"] = tmp_ID; row["Name"] = @tmp_Name; - //dboxfunc.ErrorLog("ended row functions"); - //dboxfunc.ErrorLog("added: " + tmp_Ref + "channel: " + tmp_Channel + "id: " + tmp_ID + "name: " + tmp_Name); // test if enigma got a error on service list - //dboxfunc.ErrorLog("trying to add row" + tmp_Channel); table.Rows.Add(row); - //dboxfunc.ErrorLog("Added row" + tmp_Channel); if (tmp_ID == "E:" || tmp_Name == "<n/a>") { // kill the row or we get error - //dboxfunc.ErrorLog("trying to remove row" + tmp_Channel); table.Rows.Remove(row); - //dboxfunc.ErrorLog("removed row" + tmp_Channel); } } } @@ -283,7 +257,7 @@ { } - //dboxfunc.ErrorLog("returning bouquets dataset"); + return ds; } } Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/DboxFunctions.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/DboxFunctions.cs 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/DboxFunctions.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -57,39 +57,6 @@ #endregion Constructor - public string GetID() - { - //ErrorLog("entered getid with " +_Url + " "+_UserName+" "+_Password+" "+_Boxtype); - Request request = new Request(_url, _userName, _password); - XmlDocument doc = new XmlDocument(); - XmlNode elem = doc.DocumentElement; - - string s = ""; - //get actual channel (ID) - - switch (_boxType) - { - case "Enigma v1": - doc.LoadXml(request.PostData("/xml/streaminfo")); - elem = doc.SelectSingleNode("/streaminfo/service/reference"); - s = elem.InnerText; - break; - - case "Enigma v2": - doc.LoadXml(request.PostData("/web/subservices")); - elem = doc.SelectSingleNode("/e2servicelist/e2service/e2servicereference"); - s = elem.InnerText; - break; - - default: - s = request.PostData(_command + "zapto"); - s = s.Replace("\n", ""); - //ErrorLog("get channel "+s+" for "+_Boxtype); - break; - } - - return s; - } public string ZapTo(string ID) { Request request = new Request(_url, _userName, _password); @@ -161,27 +128,6 @@ } } - public string GetEpgXml(string ID) - { - Request request = new Request(_url, _userName, _password); - string s = ""; - // get epg from box (xml formatted) - switch (_boxType) - { - case "Enigma v1": - s = request.PostData("/xml/serviceepg?ref=" + ID); - break; - case "Enigma v2": - s = request.PostData("/web/epgservice?ref=" + ID); - break; - default: - s = request.PostData(_command + "epg?xml=true&channelid=" + ID + "&details=true"); // &max=20 - break; - } - s = s.Replace("&", "&"); - return s; - - } public void ShowMessage(string message) { Request request = new Request(_url, _userName, _password); @@ -228,6 +174,64 @@ return s; } + // Unused ... + + public string GetEpgXml(string ID) + { + Request request = new Request(_url, _userName, _password); + string s = ""; + // get epg from box (xml formatted) + switch (_boxType) + { + case "Enigma v1": + s = request.PostData("/xml/serviceepg?ref=" + ID); + break; + case "Enigma v2": + s = request.PostData("/web/epgservice?ref=" + ID); + break; + default: + s = request.PostData(_command + "epg?xml=true&channelid=" + ID + "&details=true"); // &max=20 + break; + } + + s = s.Replace("&", "&"); + + return s; + } + public string GetID() + { + //ErrorLog("entered getid with " +_Url + " "+_UserName+" "+_Password+" "+_Boxtype); + Request request = new Request(_url, _userName, _password); + XmlDocument doc = new XmlDocument(); + XmlNode elem = doc.DocumentElement; + + string s = ""; + //get actual channel (ID) + + switch (_boxType) + { + case "Enigma v1": + doc.LoadXml(request.PostData("/xml/streaminfo")); + elem = doc.SelectSingleNode("/streaminfo/service/reference"); + s = elem.InnerText; + break; + + case "Enigma v2": + doc.LoadXml(request.PostData("/web/subservices")); + elem = doc.SelectSingleNode("/e2servicelist/e2service/e2servicereference"); + s = elem.InnerText; + break; + + default: + s = request.PostData(_command + "zapto"); + s = s.Replace("\n", ""); + //ErrorLog("get channel "+s+" for "+_Boxtype); + break; + } + + return s; + } + } } Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/Program.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -80,8 +80,18 @@ { case "SETUP": SetupForm setup = new SetupForm(); + setup.Address = _address; + setup.UserName = _userName; + setup.Password = _password; + setup.BoxType = _boxType; + if (setup.ShowDialog() == DialogResult.OK) { + _address = setup.Address; + _userName = setup.UserName; + _password = setup.Password; + _boxType = setup.BoxType; + SaveSettings(); Info("Setup saved"); } Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.Designer.cs 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.Designer.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -39,6 +39,7 @@ private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.StatusStrip statusStrip; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; + private System.Windows.Forms.Button buttonDetectBoxType; } } Modified: trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/Applications/Dbox Tuner/SetupForm.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -39,14 +39,36 @@ #region Variables - string _url = ""; - string _userName = ""; - string _password = ""; - string _boxType = ""; - static DataTable _bouquets = null; + string _boxType = "unknown"; #endregion Variables + #region Properties + + public string BoxType + { + get { return _boxType; } + set { _boxType = value; } + } + + public string Address + { + get { return textBoxIpAddress.Text; } + set { textBoxIpAddress.Text = value; } + } + public string UserName + { + get { return textBoxUserName.Text; } + set { textBoxUserName.Text = value; } + } + public string Password + { + get { return textBoxPassword.Text; } + set { textBoxPassword.Text = value; } + } + + #endregion Properties + #region Constructor public SetupForm() @@ -69,6 +91,7 @@ this.buttonCancel = new System.Windows.Forms.Button(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.buttonDetectBoxType = new System.Windows.Forms.Button(); this.statusStrip.SuspendLayout(); this.SuspendLayout(); // @@ -140,7 +163,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(128, 88); + this.buttonOK.Location = new System.Drawing.Point(128, 120); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 7; @@ -152,7 +175,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(200, 88); + this.buttonCancel.Location = new System.Drawing.Point(200, 120); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 8; @@ -164,7 +187,7 @@ // this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel}); - this.statusStrip.Location = new System.Drawing.Point(0, 123); + this.statusStrip.Location = new System.Drawing.Point(0, 153); this.statusStrip.Name = "statusStrip"; this.statusStrip.Size = new System.Drawing.Size(272, 22); this.statusStrip.TabIndex = 9; @@ -174,11 +197,23 @@ this.toolStripStatusLabel.Name = "toolStripStatusLabel"; this.toolStripStatusLabel.Size = new System.Drawing.Size(0, 17); // + // buttonDetectBoxType + // + this.buttonDetectBoxType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonDetectBoxType.Location = new System.Drawing.Point(8, 120); + this.buttonDetectBoxType.Name = "buttonDetectBoxType"; + this.buttonDetectBoxType.Size = new System.Drawing.Size(104, 24); + this.buttonDetectBoxType.TabIndex = 10; + this.buttonDetectBoxType.Text = "Redetect box"; + this.buttonDetectBoxType.UseVisualStyleBackColor = true; + this.buttonDetectBoxType.Click += new System.EventHandler(this.buttonDetectBoxType_Click); + // // SetupForm // this.AcceptButton = this.buttonOK; this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(272, 145); + this.ClientSize = new System.Drawing.Size(272, 175); + this.Controls.Add(this.buttonDetectBoxType); this.Controls.Add(this.statusStrip); this.Controls.Add(this.buttonGetData); this.Controls.Add(this.buttonCancel); @@ -191,7 +226,7 @@ this.Controls.Add(this.labelPassword); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(278, 170); + this.MinimumSize = new System.Drawing.Size(278, 200); this.Name = "SetupForm"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; @@ -203,68 +238,66 @@ } + static string DetectBoxType(string url, string userName, string password) + { + Request request = new Request(url, userName, password); + + // Detect Neutrino + string str1 = request.PostData("/control/getmode").ToLower(); + if (str1.Contains("tv") || str1.Contains("radio") || str1.Contains("unknown")) + return "Neutrino"; + + // Detect enigma v1 + string str2 = request.PostData("/cgi-bin/status").ToLower(); + if (str2.Contains("enigma")) + return "Enigma v1"; + + // Detect enigma v2 + string str3 = request.PostData("/web/stream.m3u"); + if (str3.Contains("#EXTM3U")) + return "Enigma v2"; + + return "unknown"; + } + private void buttonGetData_Click(object sender, EventArgs e) { StatusMessage("Attempting to read channel list ..."); try { - _url = "http://" + textBoxIpAddress.Text; - _userName = textBoxUserName.Text; - _password = textBoxPassword.Text; + string url = "http://" + textBoxIpAddress.Text; + string userName = textBoxUserName.Text; + string password = textBoxPassword.Text; + // Detect box type ... + if (_boxType.Equals("unknown", StringComparison.OrdinalIgnoreCase)) + { + _boxType = DetectBoxType(url, userName, password); + } - //detect boxtype - - // test if the value is one of the valid boxtypes, if it's not run detection routine - if (_boxType != "Neutrino" && _boxType != "Enigma v1" && _boxType != "Enigma v2") + if (_boxType.Equals("unknown", StringComparison.OrdinalIgnoreCase)) { - Request request = new Request(_url, _userName, _password); - _boxType = "unknown"; - - string str1 = request.PostData("/control/getmode").ToLower(); // neutrino - if (str1.Contains("tv") || str1.Contains("radio") || str1.Contains("unknown")) - _boxType = "Neutrino"; - - if (_boxType != "Neutrino") - { - string str2 = request.PostData("/cgi-bin/status").ToLower(); // enigma v1 - if (str2.Contains("enigma")) - _boxType = "Enigma v1"; - } - - if ((_boxType != "Neutrino") && (_boxType != "Enigma v1")) - { - string str3 = request.PostData("/web/stream.m3u"); // enigma v2 - if (str3.Contains("#EXTM3U")) - _boxType = "Enigma v2"; - } - - StatusMessage("Detected: {0}", _boxType); + StatusMessage("ERROR - No STB or unknown type detected!"); } + else + { + StatusMessage("Detected box type: {0}", _boxType); - if (_boxType == "Neutrino" || _boxType == "Enigma v1" || _boxType == "Enigma v2") - { - //get bouquets - Data _DBox = new Data(_url, _userName, _password, _boxType); - DboxFunctions dboxfunc = new DboxFunctions(_url, _userName, _password, _boxType); + Data data = new Data(url, userName, password, _boxType); - _bouquets = _DBox.UserTVBouquets.Tables[0]; + DataTable bouquets = data.UserTVBouquets.Tables[0]; - if (_bouquets.Rows.Count != 0) - StatusMessage("{0} channels found", _bouquets.Rows.Count); + if (bouquets.Rows.Count != 0) + StatusMessage("{0} channels found", bouquets.Rows.Count); else StatusMessage("ERROR - No channels found!"); if (File.Exists(Program.DataFile)) File.Delete(Program.DataFile); - _bouquets.WriteXml(Program.DataFile, XmlWriteMode.WriteSchema); + bouquets.WriteXml(Program.DataFile, XmlWriteMode.WriteSchema); } - else - { - StatusMessage("ERROR - No STB detected!"); - } } catch { @@ -289,6 +322,15 @@ this.Close(); } + private void buttonDetectBoxType_Click(object sender, EventArgs e) + { + string url = "http://" + textBoxIpAddress.Text; + string userName = textBoxUserName.Text; + string password = textBoxPassword.Text; + + _boxType = DetectBoxType(url, userName, password); + } + } } Modified: trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi 2008-03-03 06:55:09 UTC (rev 1416) @@ -513,17 +513,27 @@ File "Applications\Virtual Remote\bin\Debug\*.*" File "Applications\Web Remote\bin\Debug\WebRemote.exe" + ; Installing skins CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" SetOverwrite ifnewer File "Applications\Virtual Remote\Skins\*.*" + ; Installing Virtual Remote for Smart Devices + CreateDirectory "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOutPath "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOverwrite ifnewer + File "Applications\Virtual Remote (PocketPC2003) Installer\Debug\*.cab" + File "Applications\Virtual Remote (Smartphone2003) Installer\Debug\*.cab" + File "Applications\Virtual Remote (WinCE5) Installer\Debug\*.cab" + ; Create folders CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" ; Create start menu shortcut CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote for Smart Devices.lnk" "$DIR_INSTALL\Virtual Remote\Smart Devices" SectionEnd @@ -694,7 +704,7 @@ !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV3BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." !insertmacro MUI_DESCRIPTION_TEXT ${SectionTranslator} "Control your whole PC." !insertmacro MUI_DESCRIPTION_TEXT ${SectionTrayLauncher} "Simple tray application to launch an application of your choosing when a particular button is pressed." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote)." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote and Smart Device versions)." !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemoteSkinEditor} "Create or Modify skins for the Virtual Remote." !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "Command line tools for blasting IR codes." !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRFileTool} "Tool for learning, modifying, testing, correcting and converting IR command files." Modified: trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-03-03 05:53:52 UTC (rev 1415) +++ trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi 2008-03-03 06:55:09 UTC (rev 1416) @@ -513,17 +513,27 @@ File "Applications\Virtual Remote\bin\Release\*.*" File "Applications\Web Remote\bin\Release\WebRemote.exe" + ; Installing skins CreateDirectory "$DIR_INSTALL\Virtual Remote\Skins" SetOutPath "$DIR_INSTALL\Virtual Remote\Skins" SetOverwrite ifnewer File "Applications\Virtual Remote\Skins\*.*" + ; Installing Virtual Remote for Smart Devices + CreateDirectory "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOutPath "$DIR_INSTALL\Virtual Remote\Smart Devices" + SetOverwrite ifnewer + File "Applications\Virtual Remote (PocketPC2003) Installer\Release\*.cab" + File "Applications\Virtual Remote (Smartphone2003) Installer\Release\*.cab" + File "Applications\Virtual Remote (WinCE5) Installer\Release\*.cab" + ; Create folders CreateDirectory "$APPDATA\${PRODUCT_NAME}\Virtual Remote" ; Create start menu shortcut CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote.lnk" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" "" "$DIR_INSTALL\Virtual Remote\VirtualRemote.exe" 0 CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Web Remote.lnk" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" "" "$DIR_INSTALL\Virtual Remote\WebRemote.exe" 0 + CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Virtual Remote for Smart Devices.lnk" "$DIR_INSTALL\Virtual Remote\Smart Devices" SectionEnd @@ -694,7 +704,7 @@ !insertmacro MUI_DESCRIPTION_TEXT ${SectionTV3BlasterPlugin} "For tuning external channels (on Set Top Boxes) with the MediaPortal TV server." !insertmacro MUI_DESCRIPTION_TEXT ${SectionTranslator} "Control your whole PC." !insertmacro MUI_DESCRIPTION_TEXT ${SectionTrayLauncher} "Simple tray application to launch an application of your choosing when a particular button is pressed." - !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote)." + !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemote} "Simulated remote control, works as an application or as a web hosted remote control (with included Web Remote and Smart Device versions)." !insertmacro MUI_DESCRIPTION_TEXT ${SectionVirtualRemoteSkinEditor} "Create or Modify skins for the Virtual Remote." !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRBlast} "Command line tools for blasting IR codes." !insertmacro MUI_DESCRIPTION_TEXT ${SectionIRFileTool} "Tool for learning, modifying, testing, correcting and converting IR command files." Property changes on: trunk/plugins/MceIrApi ___________________________________________________________________ Name: svn:ignore + bin *.suo obj Added: trunk/plugins/MceIrApi/Api.cs =================================================================== --- trunk/plugins/MceIrApi/Api.cs (rev 0) +++ trunk/plugins/MceIrApi/Api.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,365 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; +using System.Windows.Forms; + +using Microsoft.Win32.SafeHandles; + +namespace MceIr +{ + + /// <summary> + /// Callback for remote button press events. + /// </summary> + public delegate void ButtonReceived(int buttonCode); + + /// <summary> + /// This wrapper class provides access to the MceIr.dll functions. + /// Expects MceIr.dll extended by Aaron Dinnage. + /// </summary> + public class Api : NativeWindow + { + + #region Interop + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrRegisterEvents(IntPtr windowHandle); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrUnregisterEvents(); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrSetRepeatTimes(int firstRepeat, int nextRepeats); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrRecordToFile(SafeFileHandle fileHandle, int timeout); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrPlaybackFromFile(SafeFileHandle fileHandle); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrSuspend(); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrResume(); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrSelectBlaster(int portNumber); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrCheckFile(SafeFileHandle fileHandle); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrSetBlasterSpeed(int speed); + + [DllImport("MceIr.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool MceIrSetBlasterType(int type); + + #endregion Interop + + #region Constants + + const int WM_USER = 0x0400; + const int ID_MCEIR_KEYCODE = 0x37FF0; + + #endregion + + #region Enumerations + + /// <summary> + /// The blaster port to send IR codes to. + /// </summary> + public enum BlasterPort + { + /// <summary> + /// Send IR codes to both blaster ports. + /// </summary> + Both = 0, + /// <summary> + /// Send IR codes to blaster port 1 only. + /// </summary> + Port_1 = 1, + /// <summary> + /// Send IR codes to blaster port 2 only. + /// </summary> + Port_2 = 2 + } + + /// <summary> + /// Type of blaster in use. + /// </summary> + public enum BlasterType + { + /// <summary> + /// Device is a first party Microsoft MCE transceiver. + /// </summary> + Microsoft = 0, + /// <summary> + /// Device is an third party SMK MCE transceiver. + /// </summary> + SMK = 1 + } + + /// <summary> + /// Speed to transmit IR codes at (this is a crude Carrier Frequency control). + /// </summary> + public enum BlasterSpeed + { + /// <summary> + /// None - Do not set the blaster speed. + /// (Note: If an IR code has been sent with a speed setting previously + /// then that speed setting will continue to take effect, until the + /// unit's power is cycled) + /// </summary> + None = 0, + /// <summary> + /// Fast - Set blaster speed to fast. + /// </summary> + Fast = 1, + /// <summary> + /// Medium - Set blaster speed to medium. + /// </summary> + Medium = 2, + /// <summary> + /// Slow - Set blaster speed to slow. + /// </summary> + Slow = 3, + } + + #endregion Enumerations + + #region Variables + + //ReceiverWindow _window; + + ButtonReceived _buttonReceived; + + bool _isSuspended = false; + bool _inUse = false; + + #endregion Variables + + #region Properties + + /// <summary> + /// Gets a value indicating whether the API is in use. + /// </summary> + /// <value><c>true</c> if in use; otherwise, <c>false</c>.</value> + public bool InUse + { + get { return _inUse; } + } + + #endregion Properties + + #region Constructor + + /// <summary> + /// Initializes a new instance of the <see cref="Api"/> class. + /// </summary> + public Api() + { + CreateParams cp = new CreateParams(); + CreateHandle(cp); + } + + #endregion Constructor + + #region Public Methods + + /// <summary> + /// Start the API and begin receiving button presses. + /// </summary> + /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> + public bool Start(ButtonReceived buttonReceived) + { + _buttonReceived = buttonReceived; + + _inUse = true; + if (MceIrRegisterEvents(this.Handle)) + { + Resume(); + return true; + } + + return false; + } + + /// <summary> + /// Stop listening for button presses. + /// </summary> + /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> + public bool Stop() + { + if (MceIrUnregisterEvents()) + { + Suspend(); + _inUse = false; + return true; + } + + return false; + } + + /// <summary> + /// Suspend the MceIrApi. + /// Call this before entering a suspended power state. + /// </summary> + public void Suspend() + { + if (!_isSuspended) + { + _inUse = true; + _isSuspended = true; + MceIrSuspend(); + } + } + + /// <summary> + /// Resume the MceIrApi. + /// Call this after returning from a suspended power state. + /// </summary> + public void Resume() + { + if (_isSuspended) + { + _inUse = true; + _isSuspended = false; + MceIrResume(); + Thread.Sleep(250); + } + } + + /// <summary> + /// Set the Blaster port to use for transmitting IR Codes. + /// </summary> + /// <param name="port">Port to send to.</param> + public void SetBlasterPort(BlasterPort port) + { + _inUse = true; + MceIrSelectBlaster((int)port); + } + + /// <summary> + /// Set the Speed to transmit IR Codes at. + /// </summary> + /// <param name="speed">IR Code speed.</param> + public void SetBlasterSpeed(BlasterSpeed speed) + { + _inUse = true; + MceIrSetBlasterSpeed((int)speed); + } + + /// <summary> + /// Set the Type of MCE unit. + /// </summary> + /// <param name="type">Manufacturer of MCE unit.</param> + public void SetBlasterType(BlasterType type) + { + _inUse = true; + MceIrSetBlasterType((int)type); + } + + /// <summary> + /// Check an IR Code file to ensure it is valid. + /// </summary> + /// <param name="filePath">The file path.</param> + /// <returns><c>true</c> if the file is valid, otherwise <c>false</c>.</returns> + public bool CheckIRFile(string filePath) + { + bool result = false; + + using (FileStream file = File.OpenRead(filePath)) + { + _inUse = true; + result = MceIrCheckFile(file.SafeFileHandle); + } + + return result; + } + + /// <summary> + /// Sets the time between key presses being repeated. + /// All times are in milliseconds. + /// </summary> + /// <param name="firstRepeat">How long after the button is pressed before repeating.</param> + /// <param name="nextRepeats">How long between repeats.</param> + public void SetRepeatTimes(int firstRepeat, int nextRepeats) + { + _inUse = true; + MceIrSetRepeatTimes(firstRepeat, nextRepeats); + } + + /// <summary> + /// Record an IR code to file. + /// </summary> + /// <param name="filePath">File to write to.</param> + /// <param name="timeout">How long before a timeout occurs (in milliseconds).</param> + /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> + public bool RecordToFile(string filePath, int timeout) + { + bool result = false; + + using (FileStream file = File.Create(filePath)) + { + _inUse = true; + result = MceIrRecordToFile(file.SafeFileHandle, timeout); + } + + return result; + } + + /// <summary> + /// Transmit an IR Code from a file. + /// </summary> + /// <param name="filePath">The file path.</param> + /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> + public bool PlaybackFromFile(string filePath) + { + bool result = false; + + using (FileStream file = File.OpenRead(filePath)) + { + _inUse = true; + result = MceIrPlaybackFromFile(file.SafeFileHandle); + } + + Thread.Sleep(250); + return result; + } + + #endregion Public Methods + + /// <summary> + /// Invokes the default window procedure associated with this window. + /// </summary> + /// <param name="m">A <see cref="T:System.Windows.Forms.Message"></see> that is associated with the current Windows message.</param> + protected override void WndProc(ref Message m) + { + if (m.Msg == WM_USER) + { + if (m.WParam.ToInt32() == ID_MCEIR_KEYCODE) + { + if (_buttonReceived != null) + _buttonReceived(m.LParam.ToInt32() & 0xFFFF); + } + } + + base.WndProc(ref m); + } + + } + +} Added: trunk/plugins/MceIrApi/MceIr.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MceIrApi/MceIr.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MceIrApi/MceIrApi.csproj =================================================================== --- trunk/plugins/MceIrApi/MceIrApi.csproj (rev 0) +++ trunk/plugins/MceIrApi/MceIrApi.csproj 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,57 @@ +<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>{ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MceIr</RootNamespace> + <AssemblyName>MceIrApi</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <DocumentationFile>bin\Debug\MceIrApi.XML</DocumentationFile> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants> + </DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Windows.Forms" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Api.cs"> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="MceIr.dll"> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/MceIrApi/MceIrApi.sln =================================================================== --- trunk/plugins/MceIrApi/MceIrApi.sln (rev 0) +++ trunk/plugins/MceIrApi/MceIrApi.sln 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MceIrApi", "MceIrApi.csproj", "{ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.csproj", "{0E8B7F94-8F69-491D-941B-ECE7EA119E47}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}.Release|Any CPU.Build.0 = Release|Any CPU + {0E8B7F94-8F69-491D-941B-ECE7EA119E47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E8B7F94-8F69-491D-941B-ECE7EA119E47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E8B7F94-8F69-491D-941B-ECE7EA119E47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E8B7F94-8F69-491D-941B-ECE7EA119E47}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/MceIrApi/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MceIrApi/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MceIrApi/Properties/AssemblyInfo.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MceIrApi")] +[assembly: AssemblyDescription("Provides access to the MCE IR Device throught the MceIr.dll")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("MceIrApi")] +[assembly: AssemblyCopyright("Copyright © Aaron Dinnage, 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0c7ff131-6ee5-4900-8a19-2bf59fcd1f55")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Property changes on: trunk/plugins/MceIrApi/TestApp ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/MceIrApi/TestApp/FormMain.Designer.cs =================================================================== --- trunk/plugins/MceIrApi/TestApp/FormMain.Designer.cs (rev 0) +++ trunk/plugins/MceIrApi/TestApp/FormMain.Designer.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,85 @@ +namespace TestApp +{ + partial class FormMain + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(8, 152); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Blast IR"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(200, 152); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 1; + this.button2.Text = "Learn IR"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(8, 8); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(272, 134); + this.listBox1.TabIndex = 2; + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(292, 182); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Name = "FormMain"; + this.Text = "FormMain"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormMain_FormClosing); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.ListBox listBox1; + } +} \ No newline at end of file Added: trunk/plugins/MceIrApi/TestApp/FormMain.cs =================================================================== --- trunk/plugins/MceIrApi/TestApp/FormMain.cs (rev 0) +++ trunk/plugins/MceIrApi/TestApp/FormMain.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace TestApp +{ + + public partial class FormMain : Form + { + + MceIr.Api api = new MceIr.Api(); + + public FormMain() + { + InitializeComponent(); + + api.Start(new MceIr.ButtonReceived(Received)); + } + + void Received(int button) + { + listBox1.Items.Add("Received: " + button); + } + + private void button1_Click(object sender, EventArgs e) + { + listBox1.Items.Add("Blasting IR ..."); + api.PlaybackFromFile("test.IR"); + } + + private void button2_Click(object sender, EventArgs e) + { + listBox1.Items.Add("Learning IR (5 second timeout) ..."); + api.RecordToFile("test.IR", 5000); + } + + private void FormMain_FormClosing(object sender, FormClosingEventArgs e) + { + api.Stop(); + } + + } + +} Added: trunk/plugins/MceIrApi/TestApp/FormMain.resx =================================================================== --- trunk/plugins/MceIrApi/TestApp/FormMain.resx (rev 0) +++ trunk/plugins/MceIrApi/TestApp/FormMain.resx 2008-03-03 06:55:09 UTC (rev 1416) @@ -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/MceIrApi/TestApp/Program.cs =================================================================== --- trunk/plugins/MceIrApi/TestApp/Program.cs (rev 0) +++ trunk/plugins/MceIrApi/TestApp/Program.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +using Microsoft.Win32; + +namespace TestApp +{ + + class Program + { + + static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.Run(new FormMain()); + } + + } + +} Added: trunk/plugins/MceIrApi/TestApp/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MceIrApi/TestApp/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MceIrApi/TestApp/Properties/AssemblyInfo.cs 2008-03-03 06:55:09 UTC (rev 1416) @@ -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("TestApp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TestApp")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("55cd2499-5cf4-44a0-b67a-2fc9cbd40d48")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/MceIrApi/TestApp/TestApp.csproj =================================================================== --- trunk/plugins/MceIrApi/TestApp/TestApp.csproj (rev 0) +++ trunk/plugins/MceIrApi/TestApp/TestApp.csproj 2008-03-03 06:55:09 UTC (rev 1416) @@ -0,0 +1,71 @@ +<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>{0E8B7F94-8F69-491D-941B-ECE7EA119E47}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>TestApp</RootNamespace> + <AssemblyName>TestApp</AssemblyName> + <StartupObject>TestApp.Program</StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants> + </DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <UseVSHostingProcess>false</UseVSHostingProcess> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + </ItemGroup> + <ItemGroup> + <Compile Include="FormMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormMain.Designer.cs"> + <DependentUpon>FormMain.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\MceIrApi.csproj"> + <Project>{ACEB9E54-94AD-4C6E-BED7-0E3969383CC1}</Project> + <Name>MceIrApi</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="FormMain.resx"> + <SubType>Designer</SubType> + <DependentUpon>FormMain.cs</DependentUpon> + </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> + --> +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |