From: <an...@us...> - 2007-09-28 16:34:16
|
Revision: 960 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=960&view=rev Author: and-81 Date: 2007-09-28 09:34:14 -0700 (Fri, 28 Sep 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs trunk/plugins/MCEReplacement/Forms/ExternalChannels.designer.cs trunk/plugins/MCEReplacement/Forms/LearnIR.Designer.cs trunk/plugins/MCEReplacement/Forms/LearnIR.cs trunk/plugins/MCEReplacement/Forms/MacroEditor.Designer.cs trunk/plugins/MCEReplacement/Forms/MacroEditor.cs trunk/plugins/MCEReplacement/Forms/MultiMapNameBox.cs trunk/plugins/MCEReplacement/Forms/SetupForm.Designer.cs trunk/plugins/MCEReplacement/Forms/SetupForm.cs trunk/plugins/MCEReplacement/Forms/SetupForm.resx trunk/plugins/MCEReplacement/Forms/StbSetup.Designer.cs trunk/plugins/MCEReplacement/Forms/StbSetup.cs trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs trunk/plugins/MCEReplacement/InputMapper/InputMappingForm.cs trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MCEReplacement/MCEReplacement.csproj trunk/plugins/MCEReplacement/MappedEvent.cs Added Paths: ----------- trunk/plugins/MCEReplacement/Properties/ trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs Removed Paths: ------------- trunk/plugins/MCEReplacement/AssemblyInfo.cs trunk/plugins/MCEReplacement/ExternalChannelConfig.cs trunk/plugins/MCEReplacement/Forms/ExternalProgram.Designer.cs trunk/plugins/MCEReplacement/Forms/ExternalProgram.cs trunk/plugins/MCEReplacement/Forms/ExternalProgram.resx trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs trunk/plugins/MCEReplacement/Forms/GoToScreen.cs trunk/plugins/MCEReplacement/Forms/GoToScreen.resx trunk/plugins/MCEReplacement/Forms/KeysCommand.Designer.cs trunk/plugins/MCEReplacement/Forms/KeysCommand.cs trunk/plugins/MCEReplacement/Forms/KeysCommand.resx trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs trunk/plugins/MCEReplacement/Forms/MessageCommand.cs trunk/plugins/MCEReplacement/Forms/MessageCommand.resx trunk/plugins/MCEReplacement/Forms/PauseTime.Designer.cs trunk/plugins/MCEReplacement/Forms/PauseTime.cs trunk/plugins/MCEReplacement/Forms/PauseTime.resx trunk/plugins/MCEReplacement/Forms/PopupMessage.Designer.cs trunk/plugins/MCEReplacement/Forms/PopupMessage.cs trunk/plugins/MCEReplacement/Forms/PopupMessage.resx trunk/plugins/MCEReplacement/Forms/SelectBlasterPort.Designer.cs trunk/plugins/MCEReplacement/Forms/SelectBlasterPort.cs trunk/plugins/MCEReplacement/Forms/SelectBlasterPort.resx trunk/plugins/MCEReplacement/Forms/SelectBlasterSpeed.Designer.cs trunk/plugins/MCEReplacement/Forms/SelectBlasterSpeed.cs trunk/plugins/MCEReplacement/Forms/SelectBlasterSpeed.resx trunk/plugins/MCEReplacement/Forms/SerialCommand.Designer.cs trunk/plugins/MCEReplacement/Forms/SerialCommand.cs trunk/plugins/MCEReplacement/Forms/SerialCommand.resx trunk/plugins/MCEReplacement/MceIrApi.cs trunk/plugins/MCEReplacement/Mouse.cs trunk/plugins/MCEReplacement/Util.cs trunk/plugins/MCEReplacement/Win32.cs Deleted: trunk/plugins/MCEReplacement/AssemblyInfo.cs =================================================================== --- trunk/plugins/MCEReplacement/AssemblyInfo.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/AssemblyInfo.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -1,71 +0,0 @@ -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("MCE Replacement Plugin")] -[assembly: AssemblyDescription("Replaces MediaPortal's native MCE remote control support")] -[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.2")] -[assembly: AssemblyFileVersionAttribute("1.0.3.2")] - -// -// 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\<setupForm>. 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)] Deleted: trunk/plugins/MCEReplacement/ExternalChannelConfig.cs =================================================================== --- trunk/plugins/MCEReplacement/ExternalChannelConfig.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/ExternalChannelConfig.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -1,204 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; - -using MediaPortal.GUI.Library; - -namespace MediaPortal.Plugins -{ - - public class ExternalChannelConfig - { - - #region Variables - - string _fileName; - - int _pauseTime = 250; - bool _sendSelect = false; - MceIrApi.BlasterPort _extBlastPort = MceIrApi.BlasterPort.Both; - MceIrApi.BlasterSpeed _extBlastSpeed = MceIrApi.BlasterSpeed.Medium; - 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 PauseTime - { - get { return _pauseTime; } - set { _pauseTime = value; } - } - public bool SendSelect - { - get { return _sendSelect; } - set { _sendSelect = value; } - } - public MceIrApi.BlasterPort ExtBlastPort - { - get { return _extBlastPort; } - set { _extBlastPort = value; } - } - public MceIrApi.BlasterSpeed ExtBlastSpeed - { - get { return _extBlastSpeed; } - set { _extBlastSpeed = 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(string fileName) - { - _fileName = fileName; - - 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); - ExtBlastPort = (MceIrApi.BlasterPort)Util.GetXmlInt(nodeList, "ExtBlastPort", (int)ExtBlastPort); - ExtBlastSpeed = (MceIrApi.BlasterSpeed)Util.GetXmlInt(nodeList, "ExtBlastSpeed", (int)ExtBlastSpeed); - 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("MCEReplacement: 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("ExtBlastPort", ((int)ExtBlastPort).ToString()); - writer.WriteElementString("ExtBlastSpeed", ((int)ExtBlastSpeed).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("MCEReplacement: SaveExternalChannelConfig() {0}", ex.Message); - } - - if (file != null) - file.Close(); - } - - } - -} Modified: trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -11,10 +11,14 @@ using System.Windows.Forms; using System.Xml; +using IrssUtils; +using MPUtils; +using MPUtils.Forms; + namespace MediaPortal.Plugins { - public partial class ExternalChannels : Form + partial class ExternalChannels : Form { #region Variables @@ -72,33 +76,24 @@ comboBoxQuickSetup.Items.Add("Clear all"); } - static bool ProcessExternalChannelProgram(string runCommand, int currentChannelDigit, string fullChannelString, MceIrApi.BlasterPort blasterPort) + static void ProcessExternalChannelProgram(string runCommand, int currentChannelDigit, string fullChannelString) { - string[] commands = MCEReplacement.SplitRunCommand(runCommand); + string[] commands = Common.SplitRunCommand(runCommand); - if (commands == null) - return false; - commands[2] = commands[2].Replace("%1", currentChannelDigit.ToString()); commands[2] = commands[2].Replace("%2", fullChannelString); - commands[2] = commands[2].Replace("%3", ((int)blasterPort).ToString()); - return MCEReplacement.ProcessRunCommand(commands); + Common.ProcessRunCommand(commands); } - static bool ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString, MceIrApi.BlasterPort blasterPort) + static void ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString) { - string[] commands = MCEReplacement.SplitSerialCommand(serialCommand); + string[] commands = Common.SplitSerialCommand(serialCommand); - if (commands == null) - return false; - commands[0] = commands[0].Replace("%1", currentChannelDigit.ToString()); commands[0] = commands[0].Replace("%2", fullChannelString); - commands[0] = commands[0].Replace("%3", ((int)blasterPort).ToString()); - return MCEReplacement.ProcessSerialCommand(commands); - + Common.ProcessSerialCommand(commands); } #region Buttons @@ -109,7 +104,7 @@ setup.Save(); foreach (ExternalChannelConfig config in MCEReplacement.ExternalChannelConfigs) - config.SaveExternalChannelConfig(); + config.Save(); this.DialogResult = DialogResult.OK; this.Close(); @@ -152,15 +147,15 @@ if (setup.UsePreChangeCommand && !String.IsNullOrEmpty(setup.PreChangeCommand)) { - if (setup.PreChangeCommand.StartsWith(MCEReplacement.RunCommandPrefix)) - ProcessExternalChannelProgram(setup.PreChangeCommand.Substring(MCEReplacement.RunCommandPrefix.Length), -1, channel, setup.ExtBlastPort); - else if (setup.PreChangeCommand.StartsWith(MCEReplacement.SerialCommandPrefix)) - ProcessSerialCommand(setup.PreChangeCommand.Substring(MCEReplacement.SerialCommandPrefix.Length), -1, channel, setup.ExtBlastPort); + if (setup.PreChangeCommand.StartsWith(Common.CmdPrefixRun)) + ProcessExternalChannelProgram(setup.PreChangeCommand.Substring(Common.CmdPrefixRun.Length), -1, channel); + else if (setup.PreChangeCommand.StartsWith(Common.CmdPrefixSerial)) + ProcessSerialCommand(setup.PreChangeCommand.Substring(Common.CmdPrefixSerial.Length), -1, channel); else - MCEReplacement.ProcessCommand(setup.PreChangeCommand, setup.ExtBlastPort, setup.ExtBlastSpeed); + MCEReplacement.ProcessCommand(setup.PreChangeCommand); if (setup.PauseTime > 0) - Thread.Sleep(setup.PauseTime); + Thread.Sleep(setup.PauseTime); } foreach (char digit in channel) @@ -170,54 +165,54 @@ command = setup.Digits[charVal]; if (!String.IsNullOrEmpty(command)) { - if (command.StartsWith(MCEReplacement.RunCommandPrefix)) - ProcessExternalChannelProgram(command.Substring(MCEReplacement.RunCommandPrefix.Length), charVal, channel, setup.ExtBlastPort); - else if (command.StartsWith(MCEReplacement.SerialCommandPrefix)) - ProcessSerialCommand(command.Substring(MCEReplacement.SerialCommandPrefix.Length), charVal, channel, setup.ExtBlastPort); + if (command.StartsWith(Common.CmdPrefixRun)) + ProcessExternalChannelProgram(command.Substring(Common.CmdPrefixRun.Length), charVal, channel); + else if (command.StartsWith(Common.CmdPrefixSerial)) + ProcessSerialCommand(command.Substring(Common.CmdPrefixSerial.Length), charVal, channel); else - MCEReplacement.ProcessCommand(command, setup.ExtBlastPort, setup.ExtBlastSpeed); + MCEReplacement.ProcessCommand(command); if (setup.PauseTime > 0) - Thread.Sleep(setup.PauseTime); + Thread.Sleep(setup.PauseTime); } } if (setup.SendSelect && !String.IsNullOrEmpty(setup.SelectCommand)) { - if (setup.SelectCommand.StartsWith(MCEReplacement.RunCommandPrefix)) + if (setup.SelectCommand.StartsWith(Common.CmdPrefixRun)) { - ProcessExternalChannelProgram(setup.SelectCommand.Substring(MCEReplacement.RunCommandPrefix.Length), -1, channel, setup.ExtBlastPort); + ProcessExternalChannelProgram(setup.SelectCommand.Substring(Common.CmdPrefixRun.Length), -1, channel); if (setup.DoubleChannelSelect) { if (setup.PauseTime > 0) Thread.Sleep(setup.PauseTime); - ProcessExternalChannelProgram(setup.SelectCommand.Substring(MCEReplacement.RunCommandPrefix.Length), -1, channel, setup.ExtBlastPort); + ProcessExternalChannelProgram(setup.SelectCommand.Substring(Common.CmdPrefixRun.Length), -1, channel); } } - else if (setup.SelectCommand.StartsWith(MCEReplacement.SerialCommandPrefix)) + else if (setup.SelectCommand.StartsWith(Common.CmdPrefixSerial)) { - ProcessSerialCommand(setup.SelectCommand.Substring(MCEReplacement.SerialCommandPrefix.Length), -1, channel, setup.ExtBlastPort); + ProcessSerialCommand(setup.SelectCommand.Substring(Common.CmdPrefixSerial.Length), -1, channel); if (setup.DoubleChannelSelect) { if (setup.PauseTime > 0) Thread.Sleep(setup.PauseTime); - ProcessSerialCommand(setup.SelectCommand.Substring(MCEReplacement.SerialCommandPrefix.Length), -1, channel, setup.ExtBlastPort); + ProcessSerialCommand(setup.SelectCommand.Substring(Common.CmdPrefixSerial.Length), -1, channel); } } else { - MCEReplacement.ProcessCommand(setup.SelectCommand, setup.ExtBlastPort, setup.ExtBlastSpeed); + MCEReplacement.ProcessCommand(setup.SelectCommand); if (setup.DoubleChannelSelect) { if (setup.PauseTime > 0) Thread.Sleep(setup.PauseTime); - MCEReplacement.ProcessCommand(setup.SelectCommand, setup.ExtBlastPort, setup.ExtBlastSpeed); + MCEReplacement.ProcessCommand(setup.SelectCommand); } } } Modified: trunk/plugins/MCEReplacement/Forms/ExternalChannels.designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalChannels.designer.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/ExternalChannels.designer.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -203,7 +203,6 @@ this.MinimumSize = new System.Drawing.Size(536, 466); 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); Deleted: trunk/plugins/MCEReplacement/Forms/ExternalProgram.Designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalProgram.Designer.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/ExternalProgram.Designer.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -1,294 +0,0 @@ -namespace MediaPortal.Plugins -{ - 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.Windows.Forms.AnchorStyles.Right))); - 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - 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.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - 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 = "Start in folder:"; - this.labelStartup.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // textBoxStartup - // - this.textBoxStartup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - 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.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(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.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - 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.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - 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"; - // - // buttonParamQuestion - // - this.buttonParamQuestion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - 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.Location = new System.Drawing.Point(8, 184); - this.checkBoxShellExecute.Name = "checkBoxShellExecute"; - this.checkBoxShellExecute.Size = new System.Drawing.Size(184, 21); - this.checkBoxShellExecute.TabIndex = 12; - this.checkBoxShellExecute.Text = "Start using ShellExecute"; - this.checkBoxShellExecute.UseVisualStyleBackColor = true; - // - // 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, 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(104, 21); - this.checkBoxNoWindow.TabIndex = 11; - this.checkBoxNoWindow.Text = "No window"; - this.checkBoxNoWindow.UseVisualStyleBackColor = true; - // - // checkBoxWaitForExit - // - this.checkBoxWaitForExit.Location = new System.Drawing.Point(208, 184); - this.checkBoxWaitForExit.Name = "checkBoxWaitForExit"; - this.checkBoxWaitForExit.Size = new System.Drawing.Size(104, 21); - this.checkBoxWaitForExit.TabIndex = 13; - this.checkBoxWaitForExit.Text = "Wait for exit"; - this.checkBoxWaitForExit.UseVisualStyleBackColor = true; - // - // 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; - // - // 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; - // - // 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.Controls.Add(this.checkBoxNoWindow); - this.Controls.Add(this.checkBoxWaitForExit); - this.Controls.Add(this.comboBoxWindowStyle); - this.Controls.Add(this.labelWindowStyle); - this.Controls.Add(this.buttonTest); - this.Controls.Add(this.checkBoxShellExecute); - this.Controls.Add(this.buttonParamQuestion); - 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.MinimumSize = new System.Drawing.Size(344, 276); - this.Name = "ExternalProgram"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - 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.Button buttonParamQuestion; - private System.Windows.Forms.CheckBox checkBoxShellExecute; - private System.Windows.Forms.Button buttonTest; - private System.Windows.Forms.CheckBox checkBoxNoWindow; - private System.Windows.Forms.CheckBox checkBoxWaitForExit; - private System.Windows.Forms.ComboBox comboBoxWindowStyle; - private System.Windows.Forms.Label labelWindowStyle; - } -} \ No newline at end of file Deleted: trunk/plugins/MCEReplacement/Forms/ExternalProgram.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalProgram.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/ExternalProgram.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -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 MediaPortal.GUI.Library; - -namespace MediaPortal.Plugins -{ - - 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 (MCEReplacement.LogVerbose) - Log.Info("MCEReplacement: Launching external program {0}", textBoxProgram.Text); - - process.Start(); - - if (checkBoxWaitForExit.Checked) // Wait for exit - process.WaitForExit(); - } - catch (Exception ex) - { - Log.Error("MCEReplacement: {0}", ex.Message); - } - } - - } - -} Deleted: trunk/plugins/MCEReplacement/Forms/ExternalProgram.resx =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalProgram.resx 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/ExternalProgram.resx 2007-09-28 16:34:14 UTC (rev 960) @@ -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 Deleted: trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -1,112 +0,0 @@ -namespace MediaPortal.Plugins -{ - partial class GoToScreen - { - /// <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.comboBoxScreen = new System.Windows.Forms.ComboBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelScreen = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // comboBoxScreen - // - this.comboBoxScreen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxScreen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.comboBoxScreen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxScreen.FormattingEnabled = true; - this.comboBoxScreen.Location = new System.Drawing.Point(8, 24); - this.comboBoxScreen.Name = "comboBoxScreen"; - this.comboBoxScreen.Size = new System.Drawing.Size(248, 21); - this.comboBoxScreen.TabIndex = 0; - // - // 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(120, 56); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(64, 24); - this.buttonOK.TabIndex = 1; - 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(192, 56); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(64, 24); - this.buttonCancel.TabIndex = 2; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // labelScreen - // - this.labelScreen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.labelScreen.Location = new System.Drawing.Point(8, 8); - this.labelScreen.Name = "labelScreen"; - this.labelScreen.Size = new System.Drawing.Size(248, 16); - this.labelScreen.TabIndex = 3; - this.labelScreen.Text = "Screen:"; - // - // GoToScreen - // - 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(264, 89); - this.Controls.Add(this.labelScreen); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.comboBoxScreen); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(272, 123); - this.Name = "GoToScreen"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Go to screen"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.ComboBox comboBoxScreen; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label labelScreen; - } -} \ No newline at end of file Deleted: trunk/plugins/MCEReplacement/Forms/GoToScreen.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/GoToScreen.cs 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/GoToScreen.cs 2007-09-28 16:34:14 UTC (rev 960) @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace MediaPortal.Plugins -{ - - public partial class GoToScreen : Form - { - - #region Properties - - public string Screen - { - get { return comboBoxScreen.Text; } - } - - #endregion Properties - - #region Constructors - - public GoToScreen() : this(String.Empty) { } - public GoToScreen(string selected) - { - InitializeComponent(); - - SetupComboBox(); - - if (String.IsNullOrEmpty(selected)) - comboBoxScreen.SelectedIndex = 0; - else - comboBoxScreen.Text = selected; - } - - #endregion Constructors - - void SetupComboBox() - { - comboBoxScreen.Items.Clear(); - string[] items = Enum.GetNames(typeof(MediaPortal.GUI.Library.GUIWindow.Window)); - - int index; - for (index = 0; index < items.Length; index++) - items[index] = items[index].Substring(7); - - Array.Sort(items); - - for (index = 0; index < items.Length; index++) - if (items[index] != "INVALID" && items[index] != "SECOND_HOME") - comboBoxScreen.Items.Add(items[index]); - } - - 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(); - } - - } - -} Deleted: trunk/plugins/MCEReplacement/Forms/GoToScreen.resx =================================================================== --- trunk/plugins/MCEReplacement/Forms/GoToScreen.resx 2007-09-28 16:31:49 UTC (rev 959) +++ trunk/plugins/MCEReplacement/Forms/GoToScreen.resx 2007-09-28 16:34:14 UTC (rev 960) @@ -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=... [truncated message content] |