From: <an...@us...> - 2007-01-30 02:58:32
|
Revision: 52 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=52&view=rev Author: and-81 Date: 2007-01-29 18:58:31 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/TV3ExtChannelChanger/TV3ExtChannelChanger.cs trunk/plugins/TV3ExtChannelChanger/TV3ExtChannelChanger.csproj trunk/plugins/TV3MceBlaster/MceIrApi.cs trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs trunk/plugins/TV3MceBlaster/TV3MceBlaster.csproj Added Paths: ----------- trunk/plugins/TV3ExtChannelChanger/Forms/ trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.resx trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.cs trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.resx trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.cs trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.resx trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.resx trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.cs trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.resx trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.cs trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.resx trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.Designer.cs trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.cs trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.resx trunk/plugins/TV3ExtChannelChanger/Win32.cs trunk/plugins/TV3MceBlaster/Forms/ trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.cs trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.designer.cs trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.resx trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.Designer.cs trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.cs trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.resx trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs trunk/plugins/TV3MceBlaster/Forms/KeysCommand.cs trunk/plugins/TV3MceBlaster/Forms/KeysCommand.resx trunk/plugins/TV3MceBlaster/Forms/LearnIR.Designer.cs trunk/plugins/TV3MceBlaster/Forms/LearnIR.cs trunk/plugins/TV3MceBlaster/Forms/LearnIR.resx trunk/plugins/TV3MceBlaster/Forms/MacroEditor.Designer.cs trunk/plugins/TV3MceBlaster/Forms/MacroEditor.cs trunk/plugins/TV3MceBlaster/Forms/MacroEditor.resx trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs trunk/plugins/TV3MceBlaster/Forms/MessageCommand.resx trunk/plugins/TV3MceBlaster/Forms/PauseTime.Designer.cs trunk/plugins/TV3MceBlaster/Forms/PauseTime.cs trunk/plugins/TV3MceBlaster/Forms/PauseTime.resx trunk/plugins/TV3MceBlaster/Forms/PluginSetup.Designer.cs trunk/plugins/TV3MceBlaster/Forms/PluginSetup.cs trunk/plugins/TV3MceBlaster/Forms/PluginSetup.resx trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.Designer.cs trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.cs trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.resx trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.Designer.cs trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.cs trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.resx trunk/plugins/TV3MceBlaster/Forms/SerialCommand.Designer.cs trunk/plugins/TV3MceBlaster/Forms/SerialCommand.cs trunk/plugins/TV3MceBlaster/Forms/SerialCommand.resx trunk/plugins/TV3MceBlaster/Forms/StbSetup.Designer.cs trunk/plugins/TV3MceBlaster/Forms/StbSetup.cs trunk/plugins/TV3MceBlaster/Forms/StbSetup.resx trunk/plugins/TV3MceBlaster/Win32.cs Removed Paths: ------------- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx trunk/plugins/TV3ExtChannelChanger/PluginSetup.Designer.cs trunk/plugins/TV3ExtChannelChanger/PluginSetup.cs trunk/plugins/TV3ExtChannelChanger/PluginSetup.resx trunk/plugins/TV3ExtChannelChanger/SerialCommand.Designer.cs trunk/plugins/TV3ExtChannelChanger/SerialCommand.cs trunk/plugins/TV3ExtChannelChanger/SerialCommand.resx trunk/plugins/TV3ExtChannelChanger/StbSetup.Designer.cs trunk/plugins/TV3ExtChannelChanger/StbSetup.cs trunk/plugins/TV3ExtChannelChanger/StbSetup.resx trunk/plugins/TV3MceBlaster/ExternalChannels.cs trunk/plugins/TV3MceBlaster/ExternalChannels.designer.cs trunk/plugins/TV3MceBlaster/ExternalChannels.resx trunk/plugins/TV3MceBlaster/ExternalProgram.Designer.cs trunk/plugins/TV3MceBlaster/ExternalProgram.cs trunk/plugins/TV3MceBlaster/ExternalProgram.resx trunk/plugins/TV3MceBlaster/LearnIR.Designer.cs trunk/plugins/TV3MceBlaster/LearnIR.cs trunk/plugins/TV3MceBlaster/LearnIR.resx trunk/plugins/TV3MceBlaster/MacroEditor.Designer.cs trunk/plugins/TV3MceBlaster/MacroEditor.cs trunk/plugins/TV3MceBlaster/MacroEditor.resx trunk/plugins/TV3MceBlaster/PauseTime.Designer.cs trunk/plugins/TV3MceBlaster/PauseTime.cs trunk/plugins/TV3MceBlaster/PauseTime.resx trunk/plugins/TV3MceBlaster/PluginSetup.Designer.cs trunk/plugins/TV3MceBlaster/PluginSetup.cs trunk/plugins/TV3MceBlaster/PluginSetup.resx trunk/plugins/TV3MceBlaster/SelectBlasterPort.Designer.cs trunk/plugins/TV3MceBlaster/SelectBlasterPort.cs trunk/plugins/TV3MceBlaster/SelectBlasterPort.resx trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.Designer.cs trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.cs trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.resx trunk/plugins/TV3MceBlaster/SerialCommand.Designer.cs trunk/plugins/TV3MceBlaster/SerialCommand.cs trunk/plugins/TV3MceBlaster/SerialCommand.resx trunk/plugins/TV3MceBlaster/StbSetup.Designer.cs trunk/plugins/TV3MceBlaster/StbSetup.cs trunk/plugins/TV3MceBlaster/StbSetup.resx Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,229 +0,0 @@ -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 - - TabPage[] _tvCardTabs; - StbSetup[] _tvCardStbSetups; - - #endregion Variables - - #region Constructor - - public ExternalChannels() - { - InitializeComponent(); - } - - #endregion Constructor - - private void ExternalChannels_Load(object sender, EventArgs e) - { - int cards = TV3ExtChannelChanger.ExternalChannelConfigs.Length; - string cardName; - string cardNumber; - - _tvCardTabs = new TabPage[cards]; - _tvCardStbSetups = new StbSetup[cards]; - - comboBoxCopyFrom.Items.Clear(); - - for (int index = 0; index < cards; index++) - { - cardNumber = (index + 1).ToString(); - cardName = "TV Card " + cardNumber; - - comboBoxCopyFrom.Items.Add(cardName); - - _tvCardStbSetups[index] = new StbSetup(index); - _tvCardStbSetups[index].Name = "StbSetup" + cardNumber; - _tvCardStbSetups[index].Dock = DockStyle.Fill; - _tvCardStbSetups[index].TabIndex = 0; - - _tvCardTabs[index] = new TabPage(cardName); - _tvCardTabs[index].Controls.Add(_tvCardStbSetups[index]); - - this.tabControlTVCards.TabPages.Add(_tvCardTabs[index]); - } - - comboBoxCopyFrom.SelectedIndex = 0; - - // Setup quick setup combo box - string[] quickSetupFiles = Directory.GetFiles(TV3ExtChannelChanger.AppDataFolder + TV3ExtChannelChanger.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 = TV3ExtChannelChanger.SplitRunCommand(runCommand); - - if (commands == null) - return false; - - commands[2] = commands[2].Replace("%1", currentChannelDigit.ToString()); - commands[2] = commands[2].Replace("%2", fullChannelString); - - return TV3ExtChannelChanger.ProcessRunCommand(commands); - } - - static bool ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString) - { - string[] commands = TV3ExtChannelChanger.SplitSerialCommand(serialCommand); - - if (commands == null) - return false; - - commands[0] = commands[0].Replace("%1", currentChannelDigit.ToString()); - commands[0] = commands[0].Replace("%2", fullChannelString); - - return TV3ExtChannelChanger.ProcessSerialCommand(commands); - - } - - #region Buttons - - private void buttonOK_Click(object sender, EventArgs e) - { - foreach (StbSetup setup in _tvCardStbSetups) - setup.Save(); - - foreach (ExternalChannelConfig config in TV3ExtChannelChanger.ExternalChannelConfigs) - config.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) - { - if (setup.PreChangeCommand != "") - { - if (setup.PreChangeCommand.StartsWith(TV3ExtChannelChanger.RunCommandPrefix)) - ProcessExternalChannelProgram(setup.PreChangeCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel); - else if (setup.PreChangeCommand.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix)) - ProcessSerialCommand(setup.PreChangeCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel); - - if (setup.PauseTime > 0) - Thread.Sleep(setup.PauseTime); - } - } - - foreach (char digit in channel) - { - charVal = digit - 48; - - command = setup.Digits[charVal]; - if (command.StartsWith(TV3ExtChannelChanger.RunCommandPrefix)) - ProcessExternalChannelProgram(command.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), charVal, channel); - else if (command.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix)) - ProcessSerialCommand(command.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), charVal, channel); - - if (setup.PauseTime > 0) - Thread.Sleep(setup.PauseTime); - } - - if (setup.SendSelect) - { - if (setup.SelectCommand.StartsWith(TV3ExtChannelChanger.RunCommandPrefix)) - { - ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel); - - if (setup.DoubleChannelSelect) - ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel); - } - else if (setup.SelectCommand.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix)) - { - ProcessSerialCommand(setup.SelectCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel); - - if (setup.DoubleChannelSelect) - ProcessSerialCommand(setup.SelectCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel); - } - } - } - } - 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 (quickSetup == "") - return; - - _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToXml(quickSetup); - } - - private void buttonCopyFrom_Click(object sender, EventArgs e) - { - _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToCard(comboBoxCopyFrom.SelectedIndex); - } - - private void buttonCancel_Click(object sender, EventArgs e) - { - this.DialogResult = DialogResult.Cancel; - this.Close(); - } - - #endregion Buttons - - } - -} Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,232 +0,0 @@ -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, 352); - 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, 296); - 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, 296); - 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, 352); - 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, 352); - 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, 280); - 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, 352); - 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, 383); - 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.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 Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx 2007-01-30 02:58:31 UTC (rev 52) @@ -1,120 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,279 +0,0 @@ -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.labelWindowStyle = new System.Windows.Forms.Label(); - this.comboBoxWindowStyle = new System.Windows.Forms.ComboBox(); - this.buttonParamQuestion = new System.Windows.Forms.Button(); - this.checkBoxShellExecute = new System.Windows.Forms.CheckBox(); - this.checkBoxWaitForExit = new System.Windows.Forms.CheckBox(); - this.buttonTest = new System.Windows.Forms.Button(); - this.checkBoxNoWindow = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // textBoxProgram - // - 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.Location = new System.Drawing.Point(8, 8); - this.labelProgram.Name = "labelProgram"; - this.labelProgram.Size = new System.Drawing.Size(288, 16); - this.labelProgram.TabIndex = 0; - this.labelProgram.Text = "Program:"; - this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // buttonProgam - // - this.buttonProgam.Location = new System.Drawing.Point(304, 24); - this.buttonProgam.Name = "buttonProgam"; - this.buttonProgam.Size = new System.Drawing.Size(24, 20); - this.buttonProgam.TabIndex = 2; - this.buttonProgam.Text = "..."; - this.buttonProgam.UseVisualStyleBackColor = true; - this.buttonProgam.Click += new System.EventHandler(this.buttonProgam_Click); - // - // buttonStartup - // - this.buttonStartup.Location = new System.Drawing.Point(304, 72); - this.buttonStartup.Name = "buttonStartup"; - this.buttonStartup.Size = new System.Drawing.Size(24, 20); - this.buttonStartup.TabIndex = 5; - this.buttonStartup.Text = "..."; - this.buttonStartup.UseVisualStyleBackColor = true; - this.buttonStartup.Click += new System.EventHandler(this.buttonStartup_Click); - // - // labelStartup - // - this.labelStartup.Location = new System.Drawing.Point(8, 56); - this.labelStartup.Name = "labelStartup"; - this.labelStartup.Size = new System.Drawing.Size(288, 16); - this.labelStartup.TabIndex = 3; - this.labelStartup.Text = "Startup Folder:"; - this.labelStartup.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // textBoxStartup - // - this.textBoxStartup.Location = new System.Drawing.Point(8, 72); - this.textBoxStartup.Name = "textBoxStartup"; - this.textBoxStartup.Size = new System.Drawing.Size(288, 20); - this.textBoxStartup.TabIndex = 4; - // - // buttonOK - // - this.buttonOK.Location = new System.Drawing.Point(208, 216); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(56, 24); - this.buttonOK.TabIndex = 15; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(272, 216); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(56, 24); - this.buttonCancel.TabIndex = 16; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // labelParameters - // - this.labelParameters.Location = new System.Drawing.Point(8, 104); - this.labelParameters.Name = "labelParameters"; - this.labelParameters.Size = new System.Drawing.Size(288, 16); - this.labelParameters.TabIndex = 6; - this.labelParameters.Text = "Parameters:"; - this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // textBoxParameters - // - this.textBoxParameters.Location = new System.Drawing.Point(8, 120); - this.textBoxParameters.Name = "textBoxParameters"; - this.textBoxParameters.Size = new System.Drawing.Size(288, 20); - this.textBoxParameters.TabIndex = 7; - // - // openFileDialog - // - this.openFileDialog.Filter = "All files|*.*"; - this.openFileDialog.Title = "Select Program Executable"; - // - // folderBrowserDialog - // - this.folderBrowserDialog.Description = "Select the startup folder for the program to run from"; - // - // labelWindowStyle - // - this.labelWindowStyle.Location = new System.Drawing.Point(8, 152); - this.labelWindowStyle.Name = "labelWindowStyle"; - this.labelWindowStyle.Size = new System.Drawing.Size(96, 21); - this.labelWindowStyle.TabIndex = 9; - this.labelWindowStyle.Text = "Window Style:"; - this.labelWindowStyle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // comboBoxWindowStyle - // - this.comboBoxWindowStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxWindowStyle.FormattingEnabled = true; - this.comboBoxWindowStyle.Location = new System.Drawing.Point(104, 152); - this.comboBoxWindowStyle.MaxDropDownItems = 4; - this.comboBoxWindowStyle.Name = "comboBoxWindowStyle"; - this.comboBoxWindowStyle.Size = new System.Drawing.Size(88, 21); - this.comboBoxWindowStyle.TabIndex = 10; - // - // buttonParamQuestion - // - this.buttonParamQuestion.Location = new System.Drawing.Point(304, 120); - this.buttonParamQuestion.Name = "buttonParamQuestion"; - this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20); - this.buttonParamQuestion.TabIndex = 8; - this.buttonParamQuestion.Text = "?"; - this.buttonParamQuestion.UseVisualStyleBackColor = true; - this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click); - // - // checkBoxShellExecute - // - this.checkBoxShellExecute.AutoSize = true; - this.checkBoxShellExecute.Location = new System.Drawing.Point(8, 184); - this.checkBoxShellExecute.Name = "checkBoxShellExecute"; - this.checkBoxShellExecute.Size = new System.Drawing.Size(153, 17); - this.checkBoxShellExecute.TabIndex = 12; - this.checkBoxShellExecute.Text = "Startup using ShellExecute"; - this.checkBoxShellExecute.UseVisualStyleBackColor = true; - // - // checkBoxWaitForExit - // - this.checkBoxWaitForExit.AutoSize = true; - this.checkBoxWaitForExit.Location = new System.Drawing.Point(208, 184); - this.checkBoxWaitForExit.Name = "checkBoxWaitForExit"; - this.checkBoxWaitForExit.Size = new System.Drawing.Size(82, 17); - this.checkBoxWaitForExit.TabIndex = 13; - this.checkBoxWaitForExit.Text = "Wait for exit"; - this.checkBoxWaitForExit.UseVisualStyleBackColor = true; - // - // buttonTest - // - this.buttonTest.Location = new System.Drawing.Point(8, 216); - this.buttonTest.Name = "buttonTest"; - this.buttonTest.Size = new System.Drawing.Size(56, 24); - this.buttonTest.TabIndex = 14; - this.buttonTest.Text = "Test"; - this.buttonTest.UseVisualStyleBackColor = true; - this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); - // - // checkBoxNoWindow - // - this.checkBoxNoWindow.Location = new System.Drawing.Point(208, 152); - this.checkBoxNoWindow.Name = "checkBoxNoWindow"; - this.checkBoxNoWindow.Size = new System.Drawing.Size(96, 21); - this.checkBoxNoWindow.TabIndex = 11; - this.checkBoxNoWindow.Text = "No window"; - this.checkBoxNoWindow.UseVisualStyleBackColor = true; - // - // ExternalProgram - // - 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(336, 249); - this.ControlBox = false; - this.Controls.Add(this.checkBoxNoWindow); - this.Controls.Add(this.buttonTest); - this.Controls.Add(this.checkBoxWaitForExit); - this.Controls.Add(this.checkBoxShellExecute); - this.Controls.Add(this.buttonParamQuestion); - this.Controls.Add(this.comboBoxWindowStyle); - this.Controls.Add(this.labelWindowStyle); - this.Controls.Add(this.labelParameters); - this.Controls.Add(this.textBoxParameters); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.buttonStartup); - this.Controls.Add(this.labelStartup); - this.Controls.Add(this.textBoxStartup); - this.Controls.Add(this.buttonProgam); - this.Controls.Add(this.labelProgram); - this.Controls.Add(this.textBoxProgram); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ExternalProgram"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "External Program Details"; - this.Load += new System.EventHandler(this.ExternalProgram_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox textBoxProgram; - private System.Windows.Forms.Label labelProgram; - private System.Windows.Forms.Button buttonProgam; - private System.Windows.Forms.Button buttonStartup; - private System.Windows.Forms.Label labelStartup; - private System.Windows.Forms.TextBox textBoxStartup; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label labelParameters; - private System.Windows.Forms.TextBox textBoxParameters; - private System.Windows.Forms.OpenFileDialog openFileDialog; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; - private System.Windows.Forms.Label labelWindowStyle; - private System.Windows.Forms.ComboBox comboBoxWindowStyle; - private System.Windows.Forms.Button buttonParamQuestion; - private System.Windows.Forms.CheckBox checkBoxShellExecute; - private System.Windows.Forms.CheckBox checkBoxWaitForExit; - private System.Windows.Forms.Button buttonTest; - private System.Windows.Forms.CheckBox checkBoxNoWindow; - } -} \ No newline at end of file Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using TvLibrary.Log; - -namespace TvEngine -{ - - public partial class ExternalProgram : Form - { - - #region Variables - - string _parametersMessage = ""; - - #endregion Variables - - #region Properties - - public string CommandString - { - get - { - return string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}", - textBoxProgram.Text, - textBoxStartup.Text, - textBoxParameters.Text, - (string)comboBoxWindowStyle.SelectedItem, - checkBoxNoWindow.Checked.ToString(), - checkBoxShellExecute.Checked.ToString(), - checkBoxWaitForExit.Checked.ToString()); - } - } - - #endregion Properties - - #region Constructors - - public ExternalProgram() : this(null, "") { } - public ExternalProgram(string parametersMessage) : this(null, parametersMessage) { } - public ExternalProgram(string[] commands) : this(commands, "") { } - public ExternalProgram(string[] commands, string parametersMessage) - { - InitializeComponent(); - - _parametersMessage = parametersMessage; - - comboBoxWindowStyle.Items.Clear(); - comboBoxWindowStyle.Items.AddRange(Enum.GetNames(typeof(ProcessWindowStyle))); - - if (commands != null) - { - textBoxProgram.Text = commands[0]; - textBoxStartup.Text = commands[1]; - textBoxParameters.Text = commands[2]; - - checkBoxNoWindow.Checked = bool.Parse(commands[4]); - checkBoxShellExecute.Checked = bool.Parse(commands[5]); - checkBoxWaitForExit.Checked = bool.Parse(commands[6]); - - comboBoxWindowStyle.SelectedItem = ((ProcessWindowStyle)Enum.Parse(typeof(ProcessWindowStyle), commands[3])).ToString(); - } - else - { - comboBoxWindowStyle.SelectedIndex = 0; - } - } - - #endregion Constructors - - private void ExternalProgram_Load(object sender, EventArgs e) - { - if (_parametersMessage.Trim().Length == 0) - buttonParamQuestion.Visible = false; - } - - - private void buttonProgam_Click(object sender, EventArgs e) - { - if (openFileDialog.ShowDialog(this) == DialogResult.OK) - { - textBoxProgram.Text = openFileDialog.FileName; - - if (textBoxStartup.Text.Trim().Length == 0) - { - textBoxStartup.Text = System.IO.Path.GetDirectoryName(openFileDialog.FileName); - } - } - } - - private void buttonStartup_Click(object sender, EventArgs e) - { - if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK) - { - textBoxProgram.Text = folderBrowserDialog.SelectedPath; - } - } - - private void buttonOK_Click(object sender, EventArgs e) - { - if (textBoxProgram.Text.Trim().Length == 0) - { - MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void buttonCancel_Click(object sender, EventArgs e) - { - this.DialogResult = DialogResult.Cancel; - this.Close(); - } - - private void buttonParamQuestion_Click(object sender, EventArgs e) - { - MessageBox.Show(this, _parametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void buttonTest_Click(object sender, EventArgs e) - { - if (textBoxProgram.Text.Trim().Length == 0) - { - MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - try - { - Process process = new Process(); - process.StartInfo.FileName = textBoxProgram.Text; - process.StartInfo.WorkingDirectory = textBoxStartup.Text; - process.StartInfo.Arguments = textBoxParameters.Text; - process.StartInfo.WindowStyle = (ProcessWindowStyle)Enum.Parse(typeof(ProcessWindowStyle), (string)comboBoxWindowStyle.SelectedItem); - process.StartInfo.CreateNoWindow = checkBoxNoWindow.Checked; - process.StartInfo.UseShellExecute = checkBoxShellExecute.Checked; - - if (TV3ExtChannelChanger.LogVerbose) - Log.Info("TV3ExtChannelChanger: Launching external program {0}", textBoxProgram.Text); - - process.Start(); - - if (checkBoxWaitForExit.Checked) // Wait for exit - process.WaitForExit(); - } - catch (Exception ex) - { - Log.Error("TV3ExtChannelChanger: {0}", ex.Message); - } - } - - } - -} Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx 2007-01-30 02:58:31 UTC (rev 52) @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>144, 17</value> - </metadata> -</root> \ No newline at end of file Added: trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs (rev 0) +++ trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -0,0 +1,229 @@ +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 + + TabPage[] _tvCardTabs; + StbSetup[] _tvCardStbSetups; + + #endregion Variables + + #region Constructor + + public ExternalChannels() + { + InitializeComponent(); + } + + #endregion Constructor + + private void ExternalChannels_Load(object sender, EventArgs e) + { + int cards = TV3ExtChannelChanger.ExternalChannelConfigs.Length; + string cardName; + string cardNumber; + + _tvCardTabs = new TabPage[cards]; + _tvCardStbSetups = new StbSetup[cards]; + + comboBoxCopyFrom.Items.Clear(); + + for (int index = 0; index < cards; index++) + { + cardNumber = (index + 1).ToString(); + cardName = "TV Card " + cardNumber; + + comboBoxCopyFrom.Items.Add(cardName); + + _tvCardStbSetups[index] = new StbSetup(index); + _tvCardStbSetups[index].Name = "StbSetup" + cardNumber; + _tvCardStbSetups[index].Dock = DockStyle.Fill; + _tvCardStbSetups[index].TabIndex = 0; + + _tvCardTabs[index] = new TabPage(cardName); + _tvCardTabs[index].Controls.Add(_tvCardStbSetups[index]); + + this.tabControlTVCards.TabPages.Add(_tvCardTabs[index]); + } + + comboBoxCopyFrom.SelectedIndex = 0; + + // Setup quick setup combo box + string[] quickSetupFiles = Directory.GetFiles(TV3ExtChannelChanger.AppDataFolder + TV3ExtChannelChanger.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 = TV3ExtChannelChanger.SplitRunCommand(runCommand); + + if (commands == null) + return false; + + commands[2] = commands[2].Replace("%1", currentChannelDigit.ToString()); + commands[2] = commands[2].Replace("%2", fullChannelString); + + return TV3ExtChannelChanger.ProcessRunCommand(commands); + } + + static bool ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString) + { + string[] commands = TV3ExtChannelChanger.SplitSerialCommand(serialCommand); + + if (commands == null) + return false; + + commands[0] = commands[0].Replace("%1", currentChannelDigit.ToString()); + commands[0] = commands[0].Replace("%2", fullChannelString); + + return TV3ExtChannelChanger.ProcessSerialCommand(commands); + + } + + #region Buttons + + private void buttonOK_Click(object sender, EventArgs e) + { + foreach (StbSetup setup in _tvCardStbSetups) + setup.Save(); + + foreach (ExternalChannelConfig config in TV3ExtChannelChanger.ExternalChannelConfigs) + config.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 ... [truncated message content] |