From: <an...@us...> - 2007-05-04 17:08:46
|
Revision: 375 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=375&view=rev Author: and-81 Date: 2007-05-04 10:08:44 -0700 (Fri, 04 May 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/TV3ExtChannelChanger/Win32.cs trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs trunk/plugins/TV3MceBlaster/Win32.cs Added Paths: ----------- trunk/plugins/TV3UuirtBlaster/ trunk/plugins/TV3UuirtBlaster/AssemblyInfo.cs trunk/plugins/TV3UuirtBlaster/ExternalChannelConfig.cs trunk/plugins/TV3UuirtBlaster/Forms/ trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.cs trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.designer.cs trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.resx trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.cs trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.designer.cs trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.resx trunk/plugins/TV3UuirtBlaster/Forms/ExternalProgram.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/ExternalProgram.cs trunk/plugins/TV3UuirtBlaster/Forms/ExternalProgram.resx trunk/plugins/TV3UuirtBlaster/Forms/KeysCommand.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/KeysCommand.cs trunk/plugins/TV3UuirtBlaster/Forms/KeysCommand.resx trunk/plugins/TV3UuirtBlaster/Forms/LearnIR.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/LearnIR.cs trunk/plugins/TV3UuirtBlaster/Forms/LearnIR.resx trunk/plugins/TV3UuirtBlaster/Forms/MacroEditor.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/MacroEditor.cs trunk/plugins/TV3UuirtBlaster/Forms/MacroEditor.resx trunk/plugins/TV3UuirtBlaster/Forms/MessageCommand.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/MessageCommand.cs trunk/plugins/TV3UuirtBlaster/Forms/MessageCommand.resx trunk/plugins/TV3UuirtBlaster/Forms/PauseTime.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/PauseTime.cs trunk/plugins/TV3UuirtBlaster/Forms/PauseTime.resx trunk/plugins/TV3UuirtBlaster/Forms/PluginSetup.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/PluginSetup.cs trunk/plugins/TV3UuirtBlaster/Forms/PluginSetup.resx trunk/plugins/TV3UuirtBlaster/Forms/SelectBlasterPort.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/SelectBlasterPort.cs trunk/plugins/TV3UuirtBlaster/Forms/SelectBlasterPort.resx trunk/plugins/TV3UuirtBlaster/Forms/SerialCommand.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/SerialCommand.cs trunk/plugins/TV3UuirtBlaster/Forms/SerialCommand.resx trunk/plugins/TV3UuirtBlaster/Forms/StbSetup.Designer.cs trunk/plugins/TV3UuirtBlaster/Forms/StbSetup.cs trunk/plugins/TV3UuirtBlaster/Forms/StbSetup.resx trunk/plugins/TV3UuirtBlaster/TV3UuirtBlaster.cs trunk/plugins/TV3UuirtBlaster/TV3UuirtBlaster.csproj trunk/plugins/TV3UuirtBlaster/Util.cs trunk/plugins/TV3UuirtBlaster/Win32.cs Modified: trunk/plugins/TV3ExtChannelChanger/Win32.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/Win32.cs 2007-05-04 13:55:10 UTC (rev 374) +++ trunk/plugins/TV3ExtChannelChanger/Win32.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -35,11 +35,14 @@ #region Interop [DllImport("user32")] - public static extern IntPtr GetForegroundWindow(); + internal static extern IntPtr GetForegroundWindow(); [DllImport("user32", SetLastError = false)] - public static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam); + internal static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam); + [DllImport("user32", SetLastError = true)] + internal static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + #endregion Interop } Modified: trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs =================================================================== --- trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs 2007-05-04 13:55:10 UTC (rev 374) +++ trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -25,7 +25,7 @@ #region Constants - public const string PluginVersion = "TV3 MCE Blaster Plugin 1.0.2.0"; + public const string PluginVersion = "TV3 MCE Blaster Plugin 1.0.3.0"; public const int LearnIRTimeout = 4000; // Milliseconds @@ -67,32 +67,20 @@ /// <summary> /// returns the name of the plugin /// </summary> - public string Name - { - get { return "TV3MceBlaster"; } - } + public string Name { get { return "TV3MceBlaster"; } } /// <summary> /// returns the version of the plugin /// </summary> - public string Version - { - get { return "1.0.2.0"; } - } + public string Version { get { return "1.0.3.0"; } } /// <summary> /// returns the author of the plugin /// </summary> - public string Author - { - get { return "and-81"; } - } + public string Author { get { return "and-81"; } } /// <summary> /// returns if the plugin should only run on the master server /// or also on slave servers /// </summary> - public bool MasterOnly - { - get { return false; } - } + public bool MasterOnly { get { return false; } } public static MceIrApi.BlasterType BlastType { @@ -379,7 +367,9 @@ /// Process the supplied Macro file. /// </summary> /// <param name="fileName">Macro file to process.</param> - /// <returns>Sucess.</returns> + /// <param name="port">Initial blaster port.</param> + /// <param name="speed">Initial blaster speed.</param> + /// <returns></returns> public static bool ProcessMacro(string fileName, MceIrApi.BlasterPort port, MceIrApi.BlasterSpeed speed) { FileStream file = null; Modified: trunk/plugins/TV3MceBlaster/Win32.cs =================================================================== --- trunk/plugins/TV3MceBlaster/Win32.cs 2007-05-04 13:55:10 UTC (rev 374) +++ trunk/plugins/TV3MceBlaster/Win32.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -35,11 +35,14 @@ #region Interop [DllImport("user32")] - public static extern IntPtr GetForegroundWindow(); + internal static extern IntPtr GetForegroundWindow(); [DllImport("user32", SetLastError = false)] - public static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam); + internal static extern IntPtr SendMessage(IntPtr windowHandle, int msg, IntPtr wordParam, IntPtr longParam); + [DllImport("user32", SetLastError = true)] + internal static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + #endregion Interop } Added: trunk/plugins/TV3UuirtBlaster/AssemblyInfo.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/AssemblyInfo.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/AssemblyInfo.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,71 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Security.Permissions; + +// +// 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("TV3 USB-UIRT Blaster Plugin")] +[assembly: AssemblyDescription("USB-UIRT Blaster for TV Engine 3")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("MediaPortal")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.3.0")] +[assembly: AssemblyFileVersionAttribute("1.0.3.0")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\<configuration>. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] + +[assembly: CLSCompliant(true)] + +[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)] Added: trunk/plugins/TV3UuirtBlaster/ExternalChannelConfig.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/ExternalChannelConfig.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/ExternalChannelConfig.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,198 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; +using System.Xml; + +using TvLibrary.Log; + +namespace TvEngine +{ + + public class ExternalChannelConfig + { + + #region Variables + + string _fileName; + + int _cardID = -1; + + int _pauseTime = 250; + bool _sendSelect = false; + bool _doubleChannelSelect = false; + int _repeatChannelCommands = 0; + int _channelDigits = 0; + int _repeatPauseTime = 1000; + bool _usePreChangeCommand = false; + + string _selectCommand = ""; + string _preChangeCommand = ""; + string[] _digits = new string[10]; + + #endregion Variables + + #region Properties + + public string FileName + { + get { return _fileName; } + } + + public int CardId + { + get { return _cardID; } + set { _cardID = value; } + } + + public int PauseTime + { + get { return _pauseTime; } + set { _pauseTime = value; } + } + public bool SendSelect + { + get { return _sendSelect; } + set { _sendSelect = value; } + } + public bool DoubleChannelSelect + { + get { return _doubleChannelSelect; } + set { _doubleChannelSelect = value; } + } + public int RepeatChannelCommands + { + get { return _repeatChannelCommands; } + set { _repeatChannelCommands = value; } + } + public int ChannelDigits + { + get { return _channelDigits; } + set { _channelDigits = value; } + } + public int RepeatPauseTime + { + get { return _repeatPauseTime; } + set { _repeatPauseTime = value; } + } + public bool UsePreChangeCommand + { + get { return _usePreChangeCommand; } + set { _usePreChangeCommand = value; } + } + + public string[] Digits + { + get { return _digits; } + set { _digits = value; } + } + public string SelectCommand + { + get { return _selectCommand; } + set { _selectCommand = value; } + } + public string PreChangeCommand + { + get { return _preChangeCommand; } + set { _preChangeCommand = value; } + } + + #endregion Properties + + #region Constructor + + public ExternalChannelConfig(int cardId, string fileName) + { + _fileName = fileName; + + _cardID = cardId; + + if (!File.Exists(_fileName)) + { + for (int i = 0; i < 10; i++) + Digits[i] = ""; + + return; + } + + FileStream file = null; + + try + { + file = new FileStream(_fileName, FileMode.Open, FileAccess.Read, FileShare.Read); + + XmlDocument doc = new XmlDocument(); + doc.Load(file); + + XmlNodeList nodeList = doc.DocumentElement.ChildNodes; + + PauseTime = Util.GetXmlInt(nodeList, "PauseTime", PauseTime); + UsePreChangeCommand = Util.GetXmlBool(nodeList, "UsePreChangeCommand", UsePreChangeCommand); + SendSelect = Util.GetXmlBool(nodeList, "SendSelect", SendSelect); + DoubleChannelSelect = Util.GetXmlBool(nodeList, "DoubleChannelSelect", DoubleChannelSelect); + RepeatChannelCommands = Util.GetXmlInt(nodeList, "RepeatChannelCommands", RepeatChannelCommands); + ChannelDigits = Util.GetXmlInt(nodeList, "ChannelDigits", ChannelDigits); + RepeatPauseTime = Util.GetXmlInt(nodeList, "RepeatDelay", RepeatPauseTime); + + SelectCommand = Util.GetXmlString(nodeList, "SelectCommand", SelectCommand); + PreChangeCommand = Util.GetXmlString(nodeList, "PreChangeCommand", PreChangeCommand); + + for (int i = 0; i < 10; i++) + Digits[i] = Util.GetXmlString(nodeList, "Digit" + i.ToString(), ""); + } + catch (Exception ex) + { + Log.Error("TV3UuirtBlaster: ExternalChannelConfig() {0}", ex.Message); + } + + if (file != null) + file.Close(); + } + + #endregion Constructor + + public void SaveExternalChannelConfig() + { + FileStream file = null; + + try + { + file = new FileStream(_fileName, FileMode.Create, FileAccess.Write, FileShare.Read); + + XmlTextWriter writer = new XmlTextWriter(file, System.Text.Encoding.UTF8); + writer.Formatting = Formatting.Indented; + writer.Indentation = 1; + writer.IndentChar = (char)9; + writer.WriteStartDocument(true); + writer.WriteStartElement("config"); // <config> + + writer.WriteElementString("PauseTime", PauseTime.ToString()); + writer.WriteElementString("UsePreChangeCommand", UsePreChangeCommand.ToString()); + writer.WriteElementString("SendSelect", SendSelect.ToString()); + writer.WriteElementString("DoubleChannelSelect", DoubleChannelSelect.ToString()); + writer.WriteElementString("ChannelDigits", ChannelDigits.ToString()); + writer.WriteElementString("RepeatChannelCommands", RepeatChannelCommands.ToString()); + writer.WriteElementString("RepeatDelay", RepeatPauseTime.ToString()); + + writer.WriteElementString("SelectCommand", SelectCommand); + writer.WriteElementString("PreChangeCommand", PreChangeCommand); + + for (int i = 0; i < 10; i++) + writer.WriteElementString("Digit" + i.ToString(), Digits[i]); + + writer.WriteEndElement(); // </config> + writer.WriteEndDocument(); + writer.Close(); + } + catch (Exception ex) + { + Log.Error("TV3UuirtBlaster: SaveExternalChannelConfig() {0}", ex.Message); + } + + if (file != null) + file.Close(); + } + + } + +} Added: trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace TvEngine +{ + + public partial class BlastCommand : Form + { + + #region Properties + + public string CommandString + { + get + { + return string.Format("{0}|{1}", + labelIRCommandFile.Text, + (string)comboBoxPort.SelectedItem); + } + } + + #endregion Properties + + #region Constructors + + public BlastCommand(string file) + { + InitializeComponent(); + + labelIRCommandFile.Text = file; + + comboBoxPort.Items.AddRange(Enum.GetNames(typeof(BlasterPort))); + comboBoxPort.SelectedIndex = 0; + } + public BlastCommand(string[] commands) + { + InitializeComponent(); + + if (commands == null) + return; + + labelIRCommandFile.Text = commands[0]; + + comboBoxPort.Items.AddRange(Enum.GetNames(typeof(BlasterPort))); + comboBoxPort.SelectedItem = commands[1]; + } + + #endregion Constructors + + #region Buttons + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + private void buttonTest_Click(object sender, EventArgs e) + { + string fileName = labelIRCommandFile.Text.Trim(); + + if (fileName.Length == 0) + return; + + TV3UuirtBlaster.BlastIR(TV3UuirtBlaster.AppDataFolder + TV3UuirtBlaster.IRFolder + fileName + TV3UuirtBlaster.IRExtension, + (BlasterPort)Enum.Parse(typeof(BlasterPort), (string)comboBoxPort.SelectedItem)); + } + + #endregion Buttons + + } + +} Added: trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.designer.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.designer.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.designer.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,152 @@ +namespace TvEngine +{ + + partial class BlastCommand + { + /// <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.labelIRFile = new System.Windows.Forms.Label(); + this.labelBlasterPort = new System.Windows.Forms.Label(); + this.comboBoxPort = new System.Windows.Forms.ComboBox(); + this.labelIRCommandFile = new System.Windows.Forms.Label(); + this.buttonTest = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // labelIRFile + // + this.labelIRFile.Location = new System.Drawing.Point(8, 8); + this.labelIRFile.Name = "labelIRFile"; + this.labelIRFile.Size = new System.Drawing.Size(88, 20); + this.labelIRFile.TabIndex = 0; + this.labelIRFile.Text = "IR Command:"; + this.labelIRFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelBlasterPort + // + this.labelBlasterPort.Location = new System.Drawing.Point(8, 40); + this.labelBlasterPort.Name = "labelBlasterPort"; + this.labelBlasterPort.Size = new System.Drawing.Size(88, 21); + this.labelBlasterPort.TabIndex = 2; + this.labelBlasterPort.Text = "Blaster port:"; + this.labelBlasterPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxPort + // + this.comboBoxPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxPort.FormattingEnabled = true; + this.comboBoxPort.Location = new System.Drawing.Point(96, 40); + this.comboBoxPort.Name = "comboBoxPort"; + this.comboBoxPort.Size = new System.Drawing.Size(104, 21); + this.comboBoxPort.TabIndex = 3; + // + // labelIRCommandFile + // + this.labelIRCommandFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelIRCommandFile.AutoEllipsis = true; + this.labelIRCommandFile.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.labelIRCommandFile.Location = new System.Drawing.Point(96, 8); + this.labelIRCommandFile.Name = "labelIRCommandFile"; + this.labelIRCommandFile.Size = new System.Drawing.Size(184, 20); + this.labelIRCommandFile.TabIndex = 1; + this.labelIRCommandFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonTest + // + this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonTest.Location = new System.Drawing.Point(8, 72); + this.buttonTest.Name = "buttonTest"; + this.buttonTest.Size = new System.Drawing.Size(56, 24); + this.buttonTest.TabIndex = 4; + this.buttonTest.Text = "Test"; + this.buttonTest.UseVisualStyleBackColor = true; + this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(160, 72); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(56, 24); + this.buttonOK.TabIndex = 5; + 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(224, 72); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(56, 24); + this.buttonCancel.TabIndex = 6; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // BlastCommand + // + 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(288, 104); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonTest); + this.Controls.Add(this.labelIRCommandFile); + this.Controls.Add(this.labelBlasterPort); + this.Controls.Add(this.comboBoxPort); + this.Controls.Add(this.labelIRFile); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(294, 136); + this.Name = "BlastCommand"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Blast Command"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelIRFile; + private System.Windows.Forms.Label labelBlasterPort; + private System.Windows.Forms.ComboBox comboBoxPort; + private System.Windows.Forms.Label labelIRCommandFile; + private System.Windows.Forms.Button buttonTest; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + } + +} Added: trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.resx =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.resx (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/BlastCommand.resx 2007-05-04 17:08:44 UTC (rev 375) @@ -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/TV3UuirtBlaster/Forms/ExternalChannels.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,253 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using System.Xml; + +namespace TvEngine +{ + + public partial class ExternalChannels : Form + { + + #region Variables + + StbSetup[] _tvCardStbSetups; + + #endregion Variables + + #region Constructor + + public ExternalChannels() + { + InitializeComponent(); + } + + #endregion Constructor + + private void ExternalChannels_Load(object sender, EventArgs e) + { + IList cards = TvDatabase.Card.ListAll(); + + _tvCardStbSetups = new StbSetup[cards.Count]; + + comboBoxCopyFrom.Items.Clear(); + + TabPage tempPage; + int index = 0; + + foreach (TvDatabase.Card card in cards) + { + comboBoxCopyFrom.Items.Add(card.IdCard); + + _tvCardStbSetups[index] = new StbSetup(card.IdCard); + _tvCardStbSetups[index].Name = string.Format("StbSetup{0}", index); + _tvCardStbSetups[index].Dock = DockStyle.Fill; + _tvCardStbSetups[index].TabIndex = 0; + + tempPage = new TabPage(string.Format("TV Card {0}", index + 1)); + tempPage.Controls.Add(_tvCardStbSetups[index]); + + this.tabControlTVCards.TabPages.Add(tempPage); + + index++; + } + + comboBoxCopyFrom.SelectedIndex = 0; + + // Setup quick setup combo box + string[] quickSetupFiles = Directory.GetFiles(TV3UuirtBlaster.AppDataFolder + TV3UuirtBlaster.STBFolder, "*.xml", SearchOption.TopDirectoryOnly); + foreach (string file in quickSetupFiles) + comboBoxQuickSetup.Items.Add(Path.GetFileNameWithoutExtension(file)); + + comboBoxQuickSetup.Items.Add("Clear all"); + } + + static bool ProcessExternalChannelProgram(string runCommand, int currentChannelDigit, string fullChannelString) + { + string[] commands = TV3UuirtBlaster.SplitRunCommand(runCommand); + + if (commands == null) + return false; + + commands[2] = commands[2].Replace("%1", currentChannelDigit.ToString()); + commands[2] = commands[2].Replace("%2", fullChannelString); + + return TV3UuirtBlaster.ProcessRunCommand(commands); + } + + static bool ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString) + { + string[] commands = TV3UuirtBlaster.SplitSerialCommand(serialCommand); + + if (commands == null) + return false; + + commands[0] = commands[0].Replace("%1", currentChannelDigit.ToString()); + commands[0] = commands[0].Replace("%2", fullChannelString); + + return TV3UuirtBlaster.ProcessSerialCommand(commands); + + } + + #region Buttons + + private void buttonOK_Click(object sender, EventArgs e) + { + foreach (StbSetup setup in _tvCardStbSetups) + { + setup.Save(); + TV3UuirtBlaster.GetExternalChannelConfig(setup.CardId).SaveExternalChannelConfig(); + } + + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void buttonTest_Click(object sender, EventArgs e) + { + StbSetup setup = _tvCardStbSetups[tabControlTVCards.SelectedIndex]; + + int channelTest = Decimal.ToInt32(numericUpDownTest.Value); + string channel; + switch (setup.ChannelDigits) + { + case 2: + channel = channelTest.ToString("00"); + break; + + case 3: + channel = channelTest.ToString("000"); + break; + + case 4: + channel = channelTest.ToString("0000"); + break; + + default: + channel = channelTest.ToString(); + break; + } + + try + { + int charVal; + string command; + + for (int repeatCount = 0; repeatCount <= setup.RepeatChannelCommands; repeatCount++) + { + if (repeatCount > 0 && setup.RepeatPauseTime > 0) + Thread.Sleep(setup.RepeatPauseTime); + + if (setup.UsePreChangeCommand && !String.IsNullOrEmpty(setup.PreChangeCommand)) + { + if (setup.PreChangeCommand.StartsWith(TV3UuirtBlaster.RunCommandPrefix)) + ProcessExternalChannelProgram(setup.PreChangeCommand.Substring(TV3UuirtBlaster.RunCommandPrefix.Length), -1, channel); + else if (setup.PreChangeCommand.StartsWith(TV3UuirtBlaster.SerialCommandPrefix)) + ProcessSerialCommand(setup.PreChangeCommand.Substring(TV3UuirtBlaster.SerialCommandPrefix.Length), -1, channel); + else + TV3UuirtBlaster.ProcessCommand(setup.PreChangeCommand); + + if (setup.PauseTime > 0) + Thread.Sleep(setup.PauseTime); + } + + foreach (char digit in channel) + { + charVal = digit - 48; + + command = setup.Digits[charVal]; + if (!String.IsNullOrEmpty(command)) + { + if (command.StartsWith(TV3UuirtBlaster.RunCommandPrefix)) + ProcessExternalChannelProgram(command.Substring(TV3UuirtBlaster.RunCommandPrefix.Length), charVal, channel); + else if (command.StartsWith(TV3UuirtBlaster.SerialCommandPrefix)) + ProcessSerialCommand(command.Substring(TV3UuirtBlaster.SerialCommandPrefix.Length), charVal, channel); + else + TV3UuirtBlaster.ProcessCommand(command); + + if (setup.PauseTime > 0) + Thread.Sleep(setup.PauseTime); + } + } + + if (setup.SendSelect && !String.IsNullOrEmpty(setup.SelectCommand)) + { + if (setup.SelectCommand.StartsWith(TV3UuirtBlaster.RunCommandPrefix)) + { + ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3UuirtBlaster.RunCommandPrefix.Length), -1, channel); + + if (setup.DoubleChannelSelect) + { + if (setup.PauseTime > 0) + Thread.Sleep(setup.PauseTime); + + ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3UuirtBlaster.RunCommandPrefix.Length), -1, channel); + } + } + else if (setup.SelectCommand.StartsWith(TV3UuirtBlaster.SerialCommandPrefix)) + { + ProcessSerialCommand(setup.SelectCommand.Substring(TV3UuirtBlaster.SerialCommandPrefix.Length), -1, channel); + + if (setup.DoubleChannelSelect) + { + if (setup.PauseTime > 0) + Thread.Sleep(setup.PauseTime); + + ProcessSerialCommand(setup.SelectCommand.Substring(TV3UuirtBlaster.SerialCommandPrefix.Length), -1, channel); + } + } + else + { + TV3UuirtBlaster.ProcessCommand(setup.SelectCommand); + + if (setup.DoubleChannelSelect) + { + if (setup.PauseTime > 0) + Thread.Sleep(setup.PauseTime); + + TV3UuirtBlaster.ProcessCommand(setup.SelectCommand); + } + } + } + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Failed to test external channel", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void buttonQuickSet_Click(object sender, EventArgs e) + { + string quickSetup = comboBoxQuickSetup.Text; + + if (String.IsNullOrEmpty(quickSetup)) + return; + + _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToXml(quickSetup); + } + + private void buttonCopyFrom_Click(object sender, EventArgs e) + { + _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToCard((int)comboBoxCopyFrom.SelectedItem); + } + + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + #endregion Buttons + + } + +} Added: trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.designer.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.designer.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.designer.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,233 @@ +namespace TvEngine +{ + partial class ExternalChannels + { + /// <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.buttonOK = new System.Windows.Forms.Button(); + this.groupBoxQuickSetup = new System.Windows.Forms.GroupBox(); + this.buttonQuickSet = new System.Windows.Forms.Button(); + this.comboBoxQuickSetup = new System.Windows.Forms.ComboBox(); + this.groupBoxTest = new System.Windows.Forms.GroupBox(); + this.labelCh = new System.Windows.Forms.Label(); + this.buttonTest = new System.Windows.Forms.Button(); + this.numericUpDownTest = new System.Windows.Forms.NumericUpDown(); + this.buttonCopyFrom = new System.Windows.Forms.Button(); + this.comboBoxCopyFrom = new System.Windows.Forms.ComboBox(); + this.tabControlTVCards = new System.Windows.Forms.TabControl(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.groupBoxQuickSetup.SuspendLayout(); + this.groupBoxTest.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTest)).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(400, 416); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(56, 24); + this.buttonOK.TabIndex = 5; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // groupBoxQuickSetup + // + this.groupBoxQuickSetup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxQuickSetup.Controls.Add(this.buttonQuickSet); + this.groupBoxQuickSetup.Controls.Add(this.comboBoxQuickSetup); + this.groupBoxQuickSetup.Location = new System.Drawing.Point(8, 360); + this.groupBoxQuickSetup.Name = "groupBoxQuickSetup"; + this.groupBoxQuickSetup.Size = new System.Drawing.Size(288, 48); + this.groupBoxQuickSetup.TabIndex = 1; + this.groupBoxQuickSetup.TabStop = false; + this.groupBoxQuickSetup.Text = "Quick Setup"; + // + // buttonQuickSet + // + this.buttonQuickSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonQuickSet.Location = new System.Drawing.Point(232, 16); + this.buttonQuickSet.Name = "buttonQuickSet"; + this.buttonQuickSet.Size = new System.Drawing.Size(48, 21); + this.buttonQuickSet.TabIndex = 1; + this.buttonQuickSet.Text = "Set"; + this.buttonQuickSet.UseVisualStyleBackColor = true; + this.buttonQuickSet.Click += new System.EventHandler(this.buttonQuickSet_Click); + // + // comboBoxQuickSetup + // + this.comboBoxQuickSetup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxQuickSetup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxQuickSetup.FormattingEnabled = true; + this.comboBoxQuickSetup.Location = new System.Drawing.Point(8, 16); + this.comboBoxQuickSetup.Name = "comboBoxQuickSetup"; + this.comboBoxQuickSetup.Size = new System.Drawing.Size(216, 21); + this.comboBoxQuickSetup.TabIndex = 0; + // + // groupBoxTest + // + this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxTest.Controls.Add(this.labelCh); + this.groupBoxTest.Controls.Add(this.buttonTest); + this.groupBoxTest.Controls.Add(this.numericUpDownTest); + this.groupBoxTest.Location = new System.Drawing.Point(304, 360); + this.groupBoxTest.Name = "groupBoxTest"; + this.groupBoxTest.Size = new System.Drawing.Size(216, 48); + this.groupBoxTest.TabIndex = 2; + this.groupBoxTest.TabStop = false; + this.groupBoxTest.Text = "Test"; + // + // labelCh + // + this.labelCh.Location = new System.Drawing.Point(8, 16); + this.labelCh.Name = "labelCh"; + this.labelCh.Size = new System.Drawing.Size(64, 20); + this.labelCh.TabIndex = 0; + this.labelCh.Text = "Channel:"; + this.labelCh.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonTest + // + this.buttonTest.Location = new System.Drawing.Point(152, 16); + this.buttonTest.Name = "buttonTest"; + this.buttonTest.Size = new System.Drawing.Size(56, 20); + this.buttonTest.TabIndex = 2; + this.buttonTest.Text = "Test"; + this.buttonTest.UseVisualStyleBackColor = true; + this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); + // + // numericUpDownTest + // + this.numericUpDownTest.Location = new System.Drawing.Point(72, 16); + this.numericUpDownTest.Maximum = new decimal(new int[] { + 9999, + 0, + 0, + 0}); + this.numericUpDownTest.Name = "numericUpDownTest"; + this.numericUpDownTest.Size = new System.Drawing.Size(72, 20); + this.numericUpDownTest.TabIndex = 1; + this.numericUpDownTest.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownTest.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // buttonCopyFrom + // + this.buttonCopyFrom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonCopyFrom.Location = new System.Drawing.Point(8, 416); + this.buttonCopyFrom.Name = "buttonCopyFrom"; + this.buttonCopyFrom.Size = new System.Drawing.Size(144, 21); + this.buttonCopyFrom.TabIndex = 3; + this.buttonCopyFrom.Text = "Copy from saved config:"; + this.buttonCopyFrom.UseVisualStyleBackColor = true; + this.buttonCopyFrom.Click += new System.EventHandler(this.buttonCopyFrom_Click); + // + // comboBoxCopyFrom + // + this.comboBoxCopyFrom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.comboBoxCopyFrom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxCopyFrom.FormattingEnabled = true; + this.comboBoxCopyFrom.Location = new System.Drawing.Point(160, 416); + this.comboBoxCopyFrom.Name = "comboBoxCopyFrom"; + this.comboBoxCopyFrom.Size = new System.Drawing.Size(120, 21); + this.comboBoxCopyFrom.TabIndex = 4; + // + // tabControlTVCards + // + this.tabControlTVCards.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControlTVCards.Location = new System.Drawing.Point(8, 8); + this.tabControlTVCards.Name = "tabControlTVCards"; + this.tabControlTVCards.SelectedIndex = 0; + this.tabControlTVCards.Size = new System.Drawing.Size(512, 344); + this.tabControlTVCards.TabIndex = 0; + // + // 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(464, 416); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(56, 24); + this.buttonCancel.TabIndex = 6; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // ExternalChannels + // + 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(528, 447); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.tabControlTVCards); + this.Controls.Add(this.comboBoxCopyFrom); + this.Controls.Add(this.buttonCopyFrom); + this.Controls.Add(this.groupBoxTest); + this.Controls.Add(this.groupBoxQuickSetup); + this.Controls.Add(this.buttonOK); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(536, 474); + this.Name = "ExternalChannels"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "External Channel Changing"; + this.Load += new System.EventHandler(this.ExternalChannels_Load); + this.groupBoxQuickSetup.ResumeLayout(false); + this.groupBoxTest.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTest)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.GroupBox groupBoxQuickSetup; + private System.Windows.Forms.ComboBox comboBoxQuickSetup; + private System.Windows.Forms.GroupBox groupBoxTest; + private System.Windows.Forms.NumericUpDown numericUpDownTest; + private System.Windows.Forms.Button buttonTest; + private System.Windows.Forms.Button buttonQuickSet; + private System.Windows.Forms.Label labelCh; + private System.Windows.Forms.Button buttonCopyFrom; + private System.Windows.Forms.ComboBox comboBoxCopyFrom; + private System.Windows.Forms.TabControl tabControlTVCards; + private System.Windows.Forms.Button buttonCancel; + + } +} \ No newline at end of file Added: trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.resx =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.resx (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/ExternalChannels.resx 2007-05-04 17:08:44 UTC (rev 375) @@ -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/TV3UuirtBlaster/Forms/ExternalProgram.Designer.cs =================================================================== --- trunk/plugins/TV3UuirtBlaster/Forms/ExternalProgram.Designer.cs (rev 0) +++ trunk/plugins/TV3UuirtBlaster/Forms/ExternalProgram.Designer.cs 2007-05-04 17:08:44 UTC (rev 375) @@ -0,0 +1,294 @@ +namespace TvEngine +{ + partial class ExternalProgram + { + /// <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.textBoxProgram = new System.Windows.Forms.TextBox(); + this.labelProgram = new System.Windows.Forms.Label(); + this.buttonProgam = new System.Windows.Forms.Button(); + this.buttonStartup = new System.Windows.Forms.Button(); + this.labelStartup = new System.Windows.Forms.Label(); + this.textBoxStartup = new System.Windows.Forms.TextBox(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.labelParameters = new System.Windows.Forms.Label(); + this.textBoxParameters = new System.Windows.Forms.TextBox(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.buttonParamQuestion = new System.Windows.Forms.Button(); + this.checkBoxShellExecute = new System.Windows.Forms.CheckBox(); + this.buttonTest = new System.Windows.Forms.Button(); + this.checkBoxNoWindow = new System.Windows.Forms.CheckBox(); + this.checkBoxWaitForExit = new System.Windows.Forms.CheckBox(); + this.comboBoxWindowStyle = new System.Windows.Forms.ComboBox(); + this.labelWindowStyle = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // textBoxProgram + // + this.textBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxProgram.Location = new System.Drawing.Point(8, 24); + this.textBoxProgram.Name = "textBoxProgram"; + this.textBoxProgram.Size = new System.Drawing.Size(288, 20); + this.textBoxProgram.TabIndex = 1; + // + // labelProgram + // + this.labelProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windo... [truncated message content] |