From: <an...@us...> - 2008-01-24 14:28:08
|
Revision: 1306 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1306&view=rev Author: and-81 Date: 2008-01-24 06:11:33 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAbsolute.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAdd.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsDivide.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsModulo.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsMultiply.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsPower.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSquareRoot.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSubtract.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Stack Commands/CommandPushStack.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringJoin.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToLower.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToUpper.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringTrim.cs trunk/plugins/IR Server Suite/Commands/CommandProcessor/Variable Commands/CommandSetVariable.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandKeystrokes.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandSendWOL.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandGotoScreen.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandSendAction.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/MediaPortalCommands.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/MPUtils/Forms/GoToScreen.cs trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhc trunk/plugins/IR Server Suite/Documentation/IR Server Suite.hhp Added Paths: ----------- trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandPopup.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.Designer.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.resx trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.Designer.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.cs trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.resx trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandGetFocus.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandPopup.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandSendMessage.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditPopup.Designer.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditPopup.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditPopup.resx trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditSendMessage.Designer.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditSendMessage.cs trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/EditSendMessage.resx Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAbsolute.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAbsolute.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAbsolute.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -64,14 +64,15 @@ /// <param name="variables">The variable list of the calling code.</param> public override void Execute(VariableList variables) { - string input1 = Parameters[0]; - if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); + string input = Parameters[0]; + if (input.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) + input = variables.VariableGet(input.Substring(VariableList.VariablePrefix.Length)); + input = IrssUtils.Common.ReplaceSpecial(input); - int input1Int = 0; - int.TryParse(input1, out input1Int); + int inputInt = 0; + int.TryParse(input, out inputInt); - int output = Math.Abs(input1Int); + int output = Math.Abs(inputInt); variables.VariableSet(Parameters[1], output.ToString()); } Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAdd.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAdd.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsAdd.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsDivide.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsDivide.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsDivide.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsModulo.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsModulo.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsModulo.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsMultiply.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsMultiply.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsMultiply.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsPower.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsPower.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsPower.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSquareRoot.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSquareRoot.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSquareRoot.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -64,12 +64,13 @@ /// <param name="variables">The variable list of the calling code.</param> public override void Execute(VariableList variables) { - string input1 = Parameters[0]; - if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + string input = Parameters[0]; + if (input.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) + input = variables.VariableGet(input.Substring(VariableList.VariablePrefix.Length)); + input = IrssUtils.Common.ReplaceSpecial(input); + int input1Int = 0; - int.TryParse(input1, out input1Int); + int.TryParse(input, out input1Int); int output = (int)Math.Sqrt((double)input1Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSubtract.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSubtract.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Maths Operations/CommandMathsSubtract.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,14 +66,16 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + int input1Int = 0; int.TryParse(input1, out input1Int); string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); int input2Int = 0; int.TryParse(input2, out input2Int); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Stack Commands/CommandPushStack.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Stack Commands/CommandPushStack.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Stack Commands/CommandPushStack.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -67,6 +67,7 @@ if (value.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) value = variables.VariableGet(value.Substring(VariableList.VariablePrefix.Length)); + value = IrssUtils.Common.ReplaceSpecial(value); variables.StackPush(value); } Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringJoin.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringJoin.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringJoin.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,11 +66,13 @@ { string input1 = Parameters[0]; if (input1.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input1 = variables.VariableGet(input1); - + input1 = variables.VariableGet(input1.Substring(VariableList.VariablePrefix.Length)); + input1 = IrssUtils.Common.ReplaceSpecial(input1); + string input2 = Parameters[1]; if (input2.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input2 = variables.VariableGet(input2); + input2 = variables.VariableGet(input2.Substring(VariableList.VariablePrefix.Length)); + input2 = IrssUtils.Common.ReplaceSpecial(input2); string output = String.Concat(input1, input2); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToLower.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToLower.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToLower.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,7 +66,8 @@ { string input = Parameters[0]; if (input.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input = variables.VariableGet(input); + input = variables.VariableGet(input.Substring(VariableList.VariablePrefix.Length)); + input = IrssUtils.Common.ReplaceSpecial(input); string output = input.ToLower(System.Globalization.CultureInfo.CurrentCulture); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToUpper.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToUpper.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringToUpper.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,7 +66,8 @@ { string input = Parameters[0]; if (input.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input = variables.VariableGet(input); + input = variables.VariableGet(input.Substring(VariableList.VariablePrefix.Length)); + input = IrssUtils.Common.ReplaceSpecial(input); string output = input.ToUpper(System.Globalization.CultureInfo.CurrentCulture); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringTrim.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringTrim.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/String Operations/CommandStringTrim.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,7 +66,8 @@ { string input = Parameters[0]; if (input.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - input = variables.VariableGet(input); + input = variables.VariableGet(input.Substring(VariableList.VariablePrefix.Length)); + input = IrssUtils.Common.ReplaceSpecial(input); string output = input.Trim(); Modified: trunk/plugins/IR Server Suite/Commands/CommandProcessor/Variable Commands/CommandSetVariable.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/CommandProcessor/Variable Commands/CommandSetVariable.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/CommandProcessor/Variable Commands/CommandSetVariable.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -66,7 +66,8 @@ { string value = Parameters[1]; if (value.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - value = variables.VariableGet(value); + value = variables.VariableGet(value.Substring(VariableList.VariablePrefix.Length)); + value = IrssUtils.Common.ReplaceSpecial(value); variables.VariableSet(Parameters[0], value); } Modified: trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandKeystrokes.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandKeystrokes.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandKeystrokes.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -60,8 +60,7 @@ { string value = Parameters[0]; if (value.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - value = variables.VariableGet(value); - + value = variables.VariableGet(value.Substring(VariableList.VariablePrefix.Length)); value = Common.ReplaceSpecial(value); Keyboard.ProcessCommand(value); Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandPopup.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandPopup.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandPopup.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,93 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +namespace Commands.General +{ + + /// <summary> + /// Popup Message command. + /// </summary> + public class CommandPopup : Command + { + + #region Constructors + + /// <summary> + /// Initializes a new instance of the <see cref="CommandPopup"/> class. + /// </summary> + public CommandPopup() { InitParameters(3); } + + /// <summary> + /// Initializes a new instance of the <see cref="CommandPopup"/> class. + /// </summary> + /// <param name="parameters">The parameters.</param> + public CommandPopup(string[] parameters) : base(parameters) { } + + #endregion Constructors + + #region Public Methods + + /// <summary> + /// Gets the category of this command. + /// </summary> + /// <returns>The category of this command.</returns> + public override string GetCategory() { return "General Commands"; } + + /// <summary> + /// Gets the user interface text. + /// </summary> + /// <returns>User interface text.</returns> + public override string GetUserInterfaceText() { return "Popup Message"; } + + /// <summary> + /// Execute this command. + /// </summary> + /// <param name="variables">The variable list of the calling code.</param> + public override void Execute(VariableList variables) + { + string heading = Parameters[0]; + if (heading.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) + heading = variables.VariableGet(heading.Substring(VariableList.VariablePrefix.Length)); + heading = IrssUtils.Common.ReplaceSpecial(heading); + + string text = Parameters[1]; + if (text.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) + text = variables.VariableGet(text.Substring(VariableList.VariablePrefix.Length)); + text = IrssUtils.Common.ReplaceSpecial(text); + + string timeoutString = Parameters[2]; + if (timeoutString.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) + timeoutString = variables.VariableGet(timeoutString.Substring(VariableList.VariablePrefix.Length)); + timeoutString = IrssUtils.Common.ReplaceSpecial(timeoutString); + + int timeout = int.Parse(timeoutString); + + PopupMessage popup = new PopupMessage(heading, text, timeout); + popup.ShowDialog(); + } + + /// <summary> + /// Edit this command. + /// </summary> + /// <param name="parent">The parent window.</param> + /// <returns><c>true</c> if the command was modified; otherwise <c>false</c>.</returns> + public override bool Edit(IWin32Window parent) + { + EditPopup edit = new EditPopup(Parameters); + if (edit.ShowDialog(parent) == DialogResult.OK) + { + Parameters = edit.Parameters; + return true; + } + + return false; + } + + #endregion Public Methods + + } + +} Modified: trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandSendWOL.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandSendWOL.cs 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/CommandSendWOL.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -71,19 +71,19 @@ { string mac = Parameters[0]; if (mac.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - mac = variables.VariableGet(mac); + mac = variables.VariableGet(mac.Substring(VariableList.VariablePrefix.Length)); mac = Common.ReplaceSpecial(mac); string port = Parameters[1]; if (port.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - port = variables.VariableGet(port); + port = variables.VariableGet(port.Substring(VariableList.VariablePrefix.Length)); port = Common.ReplaceSpecial(port); string password = Parameters[2]; if (!String.IsNullOrEmpty(password)) { if (password.StartsWith(VariableList.VariablePrefix, StringComparison.OrdinalIgnoreCase)) - password = variables.VariableGet(password); + password = variables.VariableGet(password.Substring(VariableList.VariablePrefix.Length)); password = Common.ReplaceSpecial(password); } Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.Designer.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,204 @@ +namespace Commands.General +{ + partial class EditPopup + { + /// <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.groupBoxMessageDetails = new System.Windows.Forms.GroupBox(); + this.labelSeconds = new System.Windows.Forms.Label(); + this.numericUpDownTimeout = new System.Windows.Forms.NumericUpDown(); + this.labelTimeout = new System.Windows.Forms.Label(); + this.textBoxText = new System.Windows.Forms.TextBox(); + this.labelText = new System.Windows.Forms.Label(); + this.textBoxHeading = new System.Windows.Forms.TextBox(); + this.labelHeading = new System.Windows.Forms.Label(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.groupBoxMessageDetails.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); + this.SuspendLayout(); + // + // groupBoxMessageDetails + // + this.groupBoxMessageDetails.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.groupBoxMessageDetails.Controls.Add(this.labelSeconds); + this.groupBoxMessageDetails.Controls.Add(this.numericUpDownTimeout); + this.groupBoxMessageDetails.Controls.Add(this.labelTimeout); + this.groupBoxMessageDetails.Controls.Add(this.textBoxText); + this.groupBoxMessageDetails.Controls.Add(this.labelText); + this.groupBoxMessageDetails.Controls.Add(this.textBoxHeading); + this.groupBoxMessageDetails.Controls.Add(this.labelHeading); + this.groupBoxMessageDetails.Location = new System.Drawing.Point(8, 8); + this.groupBoxMessageDetails.Name = "groupBoxMessageDetails"; + this.groupBoxMessageDetails.Size = new System.Drawing.Size(272, 103); + this.groupBoxMessageDetails.TabIndex = 0; + this.groupBoxMessageDetails.TabStop = false; + this.groupBoxMessageDetails.Text = "Message details"; + // + // labelSeconds + // + this.labelSeconds.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.labelSeconds.Location = new System.Drawing.Point(144, 72); + this.labelSeconds.Name = "labelSeconds"; + this.labelSeconds.Size = new System.Drawing.Size(120, 20); + this.labelSeconds.TabIndex = 6; + this.labelSeconds.Text = "seconds"; + this.labelSeconds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // numericUpDownTimeout + // + this.numericUpDownTimeout.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.numericUpDownTimeout.Location = new System.Drawing.Point(72, 72); + this.numericUpDownTimeout.Maximum = new decimal(new int[] { + 60, + 0, + 0, + 0}); + this.numericUpDownTimeout.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownTimeout.Name = "numericUpDownTimeout"; + this.numericUpDownTimeout.Size = new System.Drawing.Size(64, 20); + this.numericUpDownTimeout.TabIndex = 5; + this.numericUpDownTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDownTimeout.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // labelTimeout + // + this.labelTimeout.Location = new System.Drawing.Point(8, 72); + this.labelTimeout.Name = "labelTimeout"; + this.labelTimeout.Size = new System.Drawing.Size(64, 20); + this.labelTimeout.TabIndex = 4; + this.labelTimeout.Text = "Timeout:"; + this.labelTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // textBoxText + // + this.textBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxText.Location = new System.Drawing.Point(72, 48); + this.textBoxText.Name = "textBoxText"; + this.textBoxText.Size = new System.Drawing.Size(192, 20); + this.textBoxText.TabIndex = 3; + // + // labelText + // + this.labelText.Location = new System.Drawing.Point(8, 48); + this.labelText.Name = "labelText"; + this.labelText.Size = new System.Drawing.Size(64, 20); + this.labelText.TabIndex = 2; + this.labelText.Text = "Text:"; + this.labelText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // textBoxHeading + // + this.textBoxHeading.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxHeading.Location = new System.Drawing.Point(72, 24); + this.textBoxHeading.Name = "textBoxHeading"; + this.textBoxHeading.Size = new System.Drawing.Size(192, 20); + this.textBoxHeading.TabIndex = 1; + // + // labelHeading + // + this.labelHeading.Location = new System.Drawing.Point(8, 24); + this.labelHeading.Name = "labelHeading"; + this.labelHeading.Size = new System.Drawing.Size(64, 20); + this.labelHeading.TabIndex = 0; + this.labelHeading.Text = "Heading:"; + this.labelHeading.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // 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(144, 120); + 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(216, 120); + 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); + // + // PopupMessage + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(288, 152); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.groupBoxMessageDetails); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(296, 186); + this.Name = "PopupMessage"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Popup Message Command"; + this.groupBoxMessageDetails.ResumeLayout(false); + this.groupBoxMessageDetails.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBoxMessageDetails; + private System.Windows.Forms.Label labelHeading; + private System.Windows.Forms.Label labelSeconds; + private System.Windows.Forms.NumericUpDown numericUpDownTimeout; + private System.Windows.Forms.Label labelTimeout; + private System.Windows.Forms.TextBox textBoxText; + private System.Windows.Forms.Label labelText; + private System.Windows.Forms.TextBox textBoxHeading; + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Commands.General +{ + + /// <summary> + /// Popup Message Command form. + /// </summary> + public partial class EditPopup : Form + { + + #region Properties + + /// <summary> + /// Gets the command parameters. + /// </summary> + /// <value>The command parameters.</value> + public string[] Parameters + { + get + { + return new string[] { + textBoxHeading.Text.Trim(), + textBoxText.Text.Trim(), + numericUpDownTimeout.Value.ToString() + }; + } + } + + #endregion Properties + + #region Constructors + + /// <summary> + /// Initializes a new instance of the <see cref="EditPopup"/> class. + /// </summary> + public EditPopup() + { + InitializeComponent(); + } + + /// <summary> + /// Initializes a new instance of the <see cref="EditPopup"/> class. + /// </summary> + /// <param name="commands">The command elements.</param> + public EditPopup(string[] commands) + : this() + { + textBoxHeading.Text = commands[0]; + textBoxText.Text = commands[1]; + numericUpDownTimeout.Value = Convert.ToDecimal(commands[2]); + } + + #endregion Constructors + + #region Buttons + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + #endregion Buttons + + } + +} Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.resx =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.resx (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/EditPopup.resx 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj 2008-01-24 12:41:12 UTC (rev 1305) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/GeneralCommands.csproj 2008-01-24 14:11:33 UTC (rev 1306) @@ -40,11 +40,18 @@ <ItemGroup> <Compile Include="CommandHibernate.cs" /> <Compile Include="CommandKeystrokes.cs" /> + <Compile Include="CommandPopup.cs" /> <Compile Include="CommandReboot.cs" /> <Compile Include="CommandShutdown.cs" /> <Compile Include="CommandStandBy.cs" /> <Compile Include="CommandLogOff.cs" /> <Compile Include="CommandSendWOL.cs" /> + <Compile Include="EditPopup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="EditPopup.Designer.cs"> + <DependentUpon>EditPopup.cs</DependentUpon> + </Compile> <Compile Include="EditSendWOL.cs"> <SubType>Form</SubType> </Compile> @@ -58,6 +65,12 @@ <DependentUpon>EditKeystrokes.cs</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="PopupMessage.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="PopupMessage.Designer.cs"> + <DependentUpon>PopupMessage.cs</DependentUpon> + </Compile> <Compile Include="Win32.cs" /> </ItemGroup> <ItemGroup> @@ -78,6 +91,10 @@ </ProjectReference> </ItemGroup> <ItemGroup> + <EmbeddedResource Include="EditPopup.resx"> + <DependentUpon>EditPopup.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> <EmbeddedResource Include="EditSendWOL.resx"> <DependentUpon>EditSendWOL.cs</DependentUpon> <SubType>Designer</SubType> @@ -86,6 +103,10 @@ <DependentUpon>EditKeystrokes.cs</DependentUpon> <SubType>Designer</SubType> </EmbeddedResource> + <EmbeddedResource Include="PopupMessage.resx"> + <DependentUpon>PopupMessage.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.Designer.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,121 @@ +namespace Commands.General +{ + partial class PopupMessage + { + /// <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.components = new System.ComponentModel.Container(); + this.buttonOK = new System.Windows.Forms.Button(); + this.timerOK = new System.Windows.Forms.Timer(this.components); + this.panel1 = new System.Windows.Forms.Panel(); + this.textBoxMessage = new System.Windows.Forms.TextBox(); + this.labelDiv = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.Location = new System.Drawing.Point(88, 8); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(72, 24); + this.buttonOK.TabIndex = 0; + this.buttonOK.Text = "OK (100)"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // timerOK + // + this.timerOK.Interval = 1000; + this.timerOK.Tick += new System.EventHandler(this.timerOK_Tick); + // + // panel1 + // + this.panel1.Controls.Add(this.buttonOK); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(0, 35); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(250, 40); + this.panel1.TabIndex = 2; + // + // textBoxMessage + // + this.textBoxMessage.BackColor = System.Drawing.SystemColors.Control; + this.textBoxMessage.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBoxMessage.Dock = System.Windows.Forms.DockStyle.Fill; + this.textBoxMessage.Location = new System.Drawing.Point(0, 16); + this.textBoxMessage.Multiline = true; + this.textBoxMessage.Name = "textBoxMessage"; + this.textBoxMessage.Size = new System.Drawing.Size(250, 19); + this.textBoxMessage.TabIndex = 3; + this.textBoxMessage.Text = "Message"; + this.textBoxMessage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // labelDiv + // + this.labelDiv.Dock = System.Windows.Forms.DockStyle.Top; + this.labelDiv.Location = new System.Drawing.Point(0, 0); + this.labelDiv.Name = "labelDiv"; + this.labelDiv.Size = new System.Drawing.Size(250, 16); + this.labelDiv.TabIndex = 4; + this.labelDiv.Text = " "; + this.labelDiv.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // ShowPopupMessage + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(250, 75); + this.Controls.Add(this.textBoxMessage); + this.Controls.Add(this.labelDiv); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(256, 100); + this.Name = "ShowPopupMessage"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Header"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ShowPopupMessage_FormClosing); + this.Load += new System.EventHandler(this.ShowPopupMessage_Load); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Timer timerOK; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox textBoxMessage; + private System.Windows.Forms.Label labelDiv; + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Commands.General +{ + + /// <summary> + /// Show a popup message. + /// </summary> + public partial class PopupMessage : Form + { + + #region Variables + + int _timeout; + + #endregion Variables + + #region Constructor + + /// <summary> + /// Initializes a new instance of the <see cref="PopupMessage"/> class. + /// </summary> + public PopupMessage(string header, string text, int timeout) + { + InitializeComponent(); + + this.Text = header; + textBoxMessage.Text = text; + _timeout = timeout; + + buttonOK.Text = String.Format("OK ({0})", _timeout); + } + + #endregion Constructor + + private void timerOK_Tick(object sender, EventArgs e) + { + _timeout--; + + if (_timeout <= 0) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + buttonOK.Text = String.Format("OK ({0})", _timeout); + } + + private void ShowPopupMessage_Load(object sender, EventArgs e) + { + timerOK.Start(); + } + + private void ShowPopupMessage_FormClosing(object sender, FormClosingEventArgs e) + { + timerOK.Stop(); + } + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + + } + +} Added: trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.resx =================================================================== --- trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.resx (rev 0) +++ trunk/plugins/IR Server Suite/Commands/GeneralCommands/PopupMessage.resx 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,123 @@ +<?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="timerOK.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandGetFocus.cs =================================================================== --- trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandGetFocus.cs (rev 0) +++ trunk/plugins/IR Server Suite/Commands/MediaPortalCommands/CommandGetFocus.cs 2008-01-24 14:11:33 UTC (rev 1306) @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; + +using MediaPortal.GUI.Library; + +namespace Commands.MediaPortal +{ + + /// <summary> + /// Get Focus MediaPortal macro command. + /// </summary> + public class CommandGetFocus : Command + { + + #region Constructors + + /// <summary> + /// Initializes a new instance of the <see cref="CommandGetFocus"/> class. + /// </summary> + public CommandGetFocus() { InitParameters(0); } + + /// <summary> + /// Initializes a new instance of the <see cref="CommandGetFocus"/> class. + /// </summary> + /// <param name="parameters">The parameters.</param> + public CommandGetFocus(string[] parameters) : base(parameters) { } + + #endregion Constructors + + #region Implementation + + /// <summary> + /// Gets the category of this command. + /// </summary> + /// <returns>The category of this command.</returns> + public override string GetCategory() { return "MediaPortal Commands"; } + + /// <summary> + /// Gets the user interface text. + /// </s... [truncated message content] |