From: <an...@us...> - 2008-01-16 14:45:32
|
Revision: 1253 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1253&view=rev Author: and-81 Date: 2008-01-16 06:45:22 -0800 (Wed, 16 Jan 2008) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/CopyDataWM.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Program.cs trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/TcpMessageCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Keyboard.cs trunk/plugins/IR Server Suite/Common/MPUtils/MPCommon.cs trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj trunk/plugins/IR Server Suite/Documentation/Common/macro_editor.html trunk/plugins/IR Server Suite/Documentation/new.html trunk/plugins/IR Server Suite/Documentation/troubleshooting.html trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.resx trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs trunk/plugins/IR Server Suite/IR Server Suite.sln trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs trunk/plugins/IR Server Suite/Util Apps/IR File Tool/FormMain.cs trunk/plugins/MCEReplacement/Forms/MacroEditor.cs trunk/plugins/MCEReplacement/Forms/SetupForm.cs trunk/plugins/MCEReplacement/MCEReplacement.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/MacroScope/ trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.Designer.cs trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.cs trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.resx trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj trunk/plugins/IR Server Suite/Applications/MacroScope/Program.cs trunk/plugins/IR Server Suite/Applications/MacroScope/Properties/ trunk/plugins/IR Server Suite/Applications/MacroScope/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/ trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/CommandExecutionException.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/CommandStructureException.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/MacroStructureException.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/IfCommand.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/IfCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/IfCommand.resx trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LabelNameDialog.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LabelNameDialog.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LabelNameDialog.resx trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SetVariableCommand.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SetVariableCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/SetVariableCommand.resx trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VariablesFileDialog.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VariablesFileDialog.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/VariablesFileDialog.resx trunk/plugins/IR Server Suite/Common/IrssUtils/IrssMacro.cs trunk/plugins/IR Server Suite/Common/IrssUtils/VariableList.cs trunk/plugins/IR Server Suite/Common/MPUtils/Forms/MPAction.Designer.cs trunk/plugins/IR Server Suite/Common/MPUtils/Forms/MPAction.cs trunk/plugins/IR Server Suite/Common/MPUtils/Forms/MPAction.resx Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -297,20 +297,20 @@ case MessageType.RegisterClient: if ((received.Flags & MessageFlags.Success) == MessageFlags.Success) { - Info("Registered to IR Server"); + Info("Registered to Input Service"); _registered = true; //_irServerInfo = TransceiverInfo.FromString(received.Data); } else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure) { _registered = false; - Warn("IR Server refused to register"); + Warn("Input Service refused to register"); } break; case MessageType.ServerShutdown: _registered = false; - Warn("IR Server Shutdown - Blasting disabled until IR Server returns"); + Warn("Input Service Shutdown - Blasting disabled until Input Service returns"); break; case MessageType.Error: Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -261,20 +261,20 @@ case MessageType.RegisterClient: if ((received.Flags & MessageFlags.Success) == MessageFlags.Success) { - IrssLog.Info("Registered to IR Server"); + IrssLog.Info("Registered to Input Service"); _registered = true; //_irServerInfo = TransceiverInfo.FromString(received.Data); } else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure) { _registered = false; - IrssLog.Warn("IR Server refused to register"); + IrssLog.Warn("Input Service refused to register"); } break; case MessageType.ServerShutdown: _registered = false; - IrssLog.Warn("IR Server Shutdown - Blasting disabled until IR Server returns"); + IrssLog.Warn("Input Service Shutdown - Blasting disabled until Input Service returns"); break; case MessageType.Error: Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -69,7 +69,7 @@ /// <param name="e">Event args.</param> public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { - IrssLog.Error(e.Exception.ToString()); + IrssLog.Error(e.Exception); } /// <summary> Property changes on: trunk/plugins/IR Server Suite/Applications/MacroScope ___________________________________________________________________ Name: svn:ignore + bin obj Added: trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.Designer.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,395 @@ +namespace MacroScope +{ + partial class FormMain + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.statusStrip = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.menuStrip = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.debugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.stepToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.resetDebugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.endDebugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.richTextBoxMacro = new System.Windows.Forms.RichTextBox(); + this.treeViewCommandList = new System.Windows.Forms.TreeView(); + this.splitContainer = new System.Windows.Forms.SplitContainer(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPageCommands = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.listViewVariables = new System.Windows.Forms.ListView(); + this.columnHeaderVarName = new System.Windows.Forms.ColumnHeader(); + this.columnHeaderVarValue = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStripVariables = new System.Windows.Forms.ContextMenuStrip(this.components); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.statusStrip.SuspendLayout(); + this.menuStrip.SuspendLayout(); + this.splitContainer.Panel1.SuspendLayout(); + this.splitContainer.Panel2.SuspendLayout(); + this.splitContainer.SuspendLayout(); + this.tabControl.SuspendLayout(); + this.tabPageCommands.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.SuspendLayout(); + // + // statusStrip + // + this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel}); + this.statusStrip.Location = new System.Drawing.Point(0, 351); + this.statusStrip.Name = "statusStrip"; + this.statusStrip.Size = new System.Drawing.Size(592, 22); + this.statusStrip.TabIndex = 2; + this.statusStrip.Text = "statusStrip"; + // + // toolStripStatusLabel + // + this.toolStripStatusLabel.Name = "toolStripStatusLabel"; + this.toolStripStatusLabel.Size = new System.Drawing.Size(124, 17); + this.toolStripStatusLabel.Text = "Welcome to MacroScope"; + // + // menuStrip + // + this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.debugToolStripMenuItem, + this.helpToolStripMenuItem}); + this.menuStrip.Location = new System.Drawing.Point(0, 0); + this.menuStrip.Name = "menuStrip"; + this.menuStrip.Size = new System.Drawing.Size(592, 24); + this.menuStrip.TabIndex = 0; + this.menuStrip.Text = "menuStrip"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, + this.closeToolStripMenuItem, + this.toolStripSeparator1, + this.quitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.newToolStripMenuItem.Text = "&New"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.openToolStripMenuItem.Text = "&Open"; + this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.saveToolStripMenuItem.Text = "&Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.saveAsToolStripMenuItem.Text = "Save &As ..."; + this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click); + // + // closeToolStripMenuItem + // + this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; + this.closeToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.closeToolStripMenuItem.Text = "&Close"; + this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(136, 6); + // + // quitToolStripMenuItem + // + this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; + this.quitToolStripMenuItem.Size = new System.Drawing.Size(139, 22); + this.quitToolStripMenuItem.Text = "&Quit"; + this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); + // + // debugToolStripMenuItem + // + this.debugToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.stepToolStripMenuItem, + this.resetDebugToolStripMenuItem, + this.endDebugToolStripMenuItem}); + this.debugToolStripMenuItem.Name = "debugToolStripMenuItem"; + this.debugToolStripMenuItem.Size = new System.Drawing.Size(50, 20); + this.debugToolStripMenuItem.Text = "Debug"; + // + // stepToolStripMenuItem + // + this.stepToolStripMenuItem.Name = "stepToolStripMenuItem"; + this.stepToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.stepToolStripMenuItem.Text = "&Step Over"; + this.stepToolStripMenuItem.Click += new System.EventHandler(this.stepDebugToolStripMenuItem_Click); + // + // resetDebugToolStripMenuItem + // + this.resetDebugToolStripMenuItem.Name = "resetDebugToolStripMenuItem"; + this.resetDebugToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.resetDebugToolStripMenuItem.Text = "&Reset"; + this.resetDebugToolStripMenuItem.Click += new System.EventHandler(this.resetDebugToolStripMenuItem_Click); + // + // endDebugToolStripMenuItem + // + this.endDebugToolStripMenuItem.Name = "endDebugToolStripMenuItem"; + this.endDebugToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.endDebugToolStripMenuItem.Text = "&End"; + this.endDebugToolStripMenuItem.Click += new System.EventHandler(this.endDebugToolStripMenuItem_Click); + // + // helpToolStripMenuItem + // + this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.contentsToolStripMenuItem, + this.aboutToolStripMenuItem}); + this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; + this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20); + this.helpToolStripMenuItem.Text = "&Help"; + // + // contentsToolStripMenuItem + // + this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; + this.contentsToolStripMenuItem.Size = new System.Drawing.Size(129, 22); + this.contentsToolStripMenuItem.Text = "&Contents"; + this.contentsToolStripMenuItem.Click += new System.EventHandler(this.contentsToolStripMenuItem_Click); + // + // aboutToolStripMenuItem + // + this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22); + this.aboutToolStripMenuItem.Text = "&About"; + this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); + // + // richTextBoxMacro + // + this.richTextBoxMacro.AcceptsTab = true; + this.richTextBoxMacro.AutoWordSelection = true; + this.richTextBoxMacro.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBoxMacro.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.richTextBoxMacro.HideSelection = false; + this.richTextBoxMacro.Location = new System.Drawing.Point(0, 0); + this.richTextBoxMacro.Name = "richTextBoxMacro"; + this.richTextBoxMacro.ShowSelectionMargin = true; + this.richTextBoxMacro.Size = new System.Drawing.Size(400, 327); + this.richTextBoxMacro.TabIndex = 0; + this.richTextBoxMacro.Text = ""; + this.richTextBoxMacro.WordWrap = false; + // + // treeViewCommandList + // + this.treeViewCommandList.Dock = System.Windows.Forms.DockStyle.Fill; + this.treeViewCommandList.Location = new System.Drawing.Point(3, 3); + this.treeViewCommandList.Name = "treeViewCommandList"; + this.treeViewCommandList.Size = new System.Drawing.Size(174, 295); + this.treeViewCommandList.TabIndex = 0; + this.treeViewCommandList.DoubleClick += new System.EventHandler(this.treeViewCommandList_DoubleClick); + // + // splitContainer + // + this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer.Location = new System.Drawing.Point(0, 24); + this.splitContainer.Name = "splitContainer"; + // + // splitContainer.Panel1 + // + this.splitContainer.Panel1.Controls.Add(this.richTextBoxMacro); + this.splitContainer.Panel1MinSize = 128; + // + // splitContainer.Panel2 + // + this.splitContainer.Panel2.Controls.Add(this.tabControl); + this.splitContainer.Panel2MinSize = 128; + this.splitContainer.Size = new System.Drawing.Size(592, 327); + this.splitContainer.SplitterDistance = 400; + this.splitContainer.TabIndex = 1; + // + // tabControl + // + this.tabControl.Alignment = System.Windows.Forms.TabAlignment.Bottom; + this.tabControl.Controls.Add(this.tabPageCommands); + this.tabControl.Controls.Add(this.tabPage2); + this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl.Location = new System.Drawing.Point(0, 0); + this.tabControl.Multiline = true; + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(188, 327); + this.tabControl.TabIndex = 1; + // + // tabPageCommands + // + this.tabPageCommands.Controls.Add(this.treeViewCommandList); + this.tabPageCommands.Location = new System.Drawing.Point(4, 4); + this.tabPageCommands.Name = "tabPageCommands"; + this.tabPageCommands.Padding = new System.Windows.Forms.Padding(3); + this.tabPageCommands.Size = new System.Drawing.Size(180, 301); + this.tabPageCommands.TabIndex = 0; + this.tabPageCommands.Text = "Commands"; + this.tabPageCommands.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.listViewVariables); + this.tabPage2.Location = new System.Drawing.Point(4, 4); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(180, 301); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Variables"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // listViewVariables + // + this.listViewVariables.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeaderVarName, + this.columnHeaderVarValue}); + this.listViewVariables.ContextMenuStrip = this.contextMenuStripVariables; + this.listViewVariables.Dock = System.Windows.Forms.DockStyle.Fill; + this.listViewVariables.GridLines = true; + this.listViewVariables.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.listViewVariables.Location = new System.Drawing.Point(3, 3); + this.listViewVariables.Name = "listViewVariables"; + this.listViewVariables.Size = new System.Drawing.Size(174, 295); + this.listViewVariables.TabIndex = 0; + this.listViewVariables.UseCompatibleStateImageBehavior = false; + this.listViewVariables.View = System.Windows.Forms.View.Details; + // + // columnHeaderVarName + // + this.columnHeaderVarName.Text = "Name"; + this.columnHeaderVarName.Width = 64; + // + // columnHeaderVarValue + // + this.columnHeaderVarValue.Text = "Value"; + this.columnHeaderVarValue.Width = 85; + // + // contextMenuStripVariables + // + this.contextMenuStripVariables.Name = "contextMenuStripVariables"; + this.contextMenuStripVariables.Size = new System.Drawing.Size(61, 4); + // + // openFileDialog + // + this.openFileDialog.DefaultExt = "Macro"; + this.openFileDialog.Filter = "Macro Files|*.Macro|All Files|*.*"; + // + // saveFileDialog + // + this.saveFileDialog.DefaultExt = "Macro"; + this.saveFileDialog.Filter = "Macro Files|*.Macro|All Files|*.*"; + // + // FormMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(592, 373); + this.Controls.Add(this.splitContainer); + this.Controls.Add(this.statusStrip); + this.Controls.Add(this.menuStrip); + this.MainMenuStrip = this.menuStrip; + this.Name = "FormMain"; + this.Text = "MacroScope"; + this.statusStrip.ResumeLayout(false); + this.statusStrip.PerformLayout(); + this.menuStrip.ResumeLayout(false); + this.menuStrip.PerformLayout(); + this.splitContainer.Panel1.ResumeLayout(false); + this.splitContainer.Panel2.ResumeLayout(false); + this.splitContainer.ResumeLayout(false); + this.tabControl.ResumeLayout(false); + this.tabPageCommands.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.StatusStrip statusStrip; + private System.Windows.Forms.MenuStrip menuStrip; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem; + private System.Windows.Forms.RichTextBox richTextBoxMacro; + private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem contentsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem debugToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem stepToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem resetDebugToolStripMenuItem; + private System.Windows.Forms.TreeView treeViewCommandList; + private System.Windows.Forms.SplitContainer splitContainer; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; + private System.Windows.Forms.OpenFileDialog openFileDialog; + private System.Windows.Forms.SaveFileDialog saveFileDialog; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPageCommands; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.ListView listViewVariables; + private System.Windows.Forms.ColumnHeader columnHeaderVarName; + private System.Windows.Forms.ColumnHeader columnHeaderVarValue; + private System.Windows.Forms.ContextMenuStrip contextMenuStripVariables; + private System.Windows.Forms.ToolStripMenuItem endDebugToolStripMenuItem; + } +} + Added: trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,330 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; +using System.Xml; + +using IrssUtils; +using IrssUtils.Forms; + +namespace MacroScope +{ + + + public partial class FormMain : Form + { + + #region Variables + + string _macroFile; + VariableList _variables; + + bool _isDebugging; + int _debugLine; + + #endregion Variables + + #region Constructor + + public FormMain() + { + InitializeComponent(); + + PopulateCommandList(); + + _variables = new VariableList(); + + } + + #endregion Constructor + + + /// <summary> + /// Write the macro in the RichTextBox to a macro name provided. + /// </summary> + /// <param name="fileName">Name of Macro to write (macro name, not file path).</param> + void WriteToFile(string fileName) + { + _macroFile = fileName; + + try + { + using (XmlTextWriter writer = new XmlTextWriter(fileName, Encoding.UTF8)) + { + writer.Formatting = Formatting.Indented; + writer.WriteStartDocument(true); + writer.WriteStartElement("macro"); + + foreach (string item in richTextBoxMacro.Lines) + { + if (String.IsNullOrEmpty(item)) + continue; + + writer.WriteStartElement("item"); + writer.WriteAttributeString("command", item); + writer.WriteEndElement(); + } + + writer.WriteEndElement(); + writer.WriteEndDocument(); + } + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + } + + /// <summary> + /// Read a macro into the listBox from the macro name provided. + /// </summary> + /// <param name="fileName">Name of Macro to read (macro name, not file path).</param> + void ReadFromFile(string fileName) + { + _macroFile = fileName; + + try + { + XmlDocument doc = new XmlDocument(); + doc.Load(fileName); + + XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("item"); + + richTextBoxMacro.Clear(); + + foreach (XmlNode item in commandSequence) + richTextBoxMacro.AppendText(item.Attributes["command"].Value + '\n'); + } + catch (Exception ex) + { + IrssLog.Error(ex); + } + } + + + void ResetVariables() + { + _variables.Clear(); + listViewVariables.Clear(); + } + + void LoadVariables(string fileName) + { + // Dictionary<string, string>.Enumerator enumerator = _variables.GetEnumerator(); + } + + void SaveVariables(string fileName) + { + + } + + void ProcessCurrentLine() + { + + } + + + void DebugStep() + { + if (_isDebugging) + { + ProcessCurrentLine(); + + + _debugLine++; + HighlightDebugLine(); + + + + } + else + { + _isDebugging = true; + _debugLine = 0; + + HighlightDebugLine(); + } + } + + void DebugReset() + { + _isDebugging = true; + _debugLine = 0; + + HighlightDebugLine(); + } + + void DebugEnd() + { + _isDebugging = false; + + HighlightDebugLine(); + } + + + void HighlightDebugLine() + { + if (_isDebugging) + { + + } + else + { + + } + + } + + + void PopulateCommandList() + { + TreeNode macroCommands = new TreeNode("Macro Commands"); + macroCommands.Nodes.Add(Common.UITextSetVar); + macroCommands.Nodes.Add(Common.UITextLabel); + macroCommands.Nodes.Add(Common.UITextGotoLabel); + macroCommands.Nodes.Add(Common.UITextIf); + treeViewCommandList.Nodes.Add(macroCommands); + + TreeNode generalCommands = new TreeNode("General Commands"); + generalCommands.Nodes.Add(Common.UITextBeep); + generalCommands.Nodes.Add(Common.UITextCloseProgram); + generalCommands.Nodes.Add(Common.UITextDisplay); + generalCommands.Nodes.Add(Common.UITextEject); + generalCommands.Nodes.Add(Common.UITextHibernate); + generalCommands.Nodes.Add(Common.UITextHttpMsg); + generalCommands.Nodes.Add(Common.UITextKeys); + generalCommands.Nodes.Add(Common.UITextLogOff); + generalCommands.Nodes.Add(Common.UITextMouse); + generalCommands.Nodes.Add(Common.UITextMouseMode); + generalCommands.Nodes.Add(Common.UITextPause); + generalCommands.Nodes.Add(Common.UITextPopup); + generalCommands.Nodes.Add(Common.UITextReboot); + generalCommands.Nodes.Add(Common.UITextRun); + generalCommands.Nodes.Add(Common.UITextSerial); + generalCommands.Nodes.Add(Common.UITextShutdown); + generalCommands.Nodes.Add(Common.UITextSmsKB); + generalCommands.Nodes.Add(Common.UITextSound); + generalCommands.Nodes.Add(Common.UITextStandby); + generalCommands.Nodes.Add(Common.UITextTcpMsg); + generalCommands.Nodes.Add(Common.UITextTranslator); + generalCommands.Nodes.Add(Common.UITextVirtualKB); + generalCommands.Nodes.Add(Common.UITextWindowMsg); + treeViewCommandList.Nodes.Add(generalCommands); + + TreeNode mediaPortalCommands = new TreeNode("MediaPortal Only Commands"); + mediaPortalCommands.Nodes.Add(Common.UITextExit); + mediaPortalCommands.Nodes.Add(Common.UITextFocus); + mediaPortalCommands.Nodes.Add(Common.UITextGotoScreen); + mediaPortalCommands.Nodes.Add(Common.UITextInputLayer); + mediaPortalCommands.Nodes.Add(Common.UITextMultiMap); + mediaPortalCommands.Nodes.Add(Common.UITextSendMPAction); + mediaPortalCommands.Nodes.Add(Common.UITextSendMPMsg); + treeViewCommandList.Nodes.Add(mediaPortalCommands); + } + + + void InsertCommand(string commandUiText) + { + string newCommand = String.Empty; + + switch (commandUiText) + { + case Common.UITextBeep: + BeepCommand beepCommand = new BeepCommand(); + if (beepCommand.ShowDialog(this) == DialogResult.OK) + InsertText(beepCommand.CommandString); + + break; + + + + + } + + if (!String.IsNullOrEmpty(newCommand)) + InsertText(newCommand); + } + + void InsertText(string text) + { + richTextBoxMacro.Text.Insert(richTextBoxMacro.SelectionStart, text); + } + + void UpdateStatus(string text) + { + toolStripStatusLabel.Text = text; + } + + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + _macroFile = String.Empty; + richTextBoxMacro.Clear(); + } + + private void openToolStripMenuItem_Click(object sender, EventArgs e) + { + if (openFileDialog.ShowDialog(this) == DialogResult.OK) + ReadFromFile(openFileDialog.FileName); + } + + private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void closeToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void quitToolStripMenuItem_Click(object sender, EventArgs e) + { + Application.Exit(); + } + + private void contentsToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void aboutToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void treeViewCommandList_DoubleClick(object sender, EventArgs e) + { + if (treeViewCommandList.SelectedNode != null && treeViewCommandList.SelectedNode.Level == 1) + InsertCommand(treeViewCommandList.SelectedNode.Text); + } + + private void stepDebugToolStripMenuItem_Click(object sender, EventArgs e) + { + DebugStep(); + } + + private void resetDebugToolStripMenuItem_Click(object sender, EventArgs e) + { + DebugReset(); + } + + private void endDebugToolStripMenuItem_Click(object sender, EventArgs e) + { + DebugEnd(); + } + + + } + +} Added: trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/FormMain.resx 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,135 @@ +<?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="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>121, 17</value> + </metadata> + <metadata name="contextMenuStripVariables.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>469, 17</value> + </metadata> + <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>223, 17</value> + </metadata> + <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>347, 17</value> + </metadata> +</root> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/MacroScope.csproj 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,70 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{2F296C09-627B-4D6E-A041-1601A8C030C7}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MacroScope</RootNamespace> + <AssemblyName>MacroScope</AssemblyName> + <StartupObject>MacroScope.Program</StartupObject> + <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + <UseVSHostingProcess>false</UseVSHostingProcess> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="FormMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FormMain.Designer.cs"> + <DependentUpon>FormMain.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="FormMain.resx"> + <SubType>Designer</SubType> + <DependentUpon>FormMain.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj"> + <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project> + <Name>IrssUtils</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/MacroScope/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/Program.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/Program.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Windows.Forms; + +using IrssUtils; + +namespace MacroScope +{ + + static class Program + { + + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + +#if DEBUG + IrssLog.LogLevel = IrssLog.Level.Debug; +#else + IrssLog.LogLevel = IrssLog.Level.Info; +#endif + IrssLog.Open(Common.FolderIrssLogs + "MacroScope.log"); + + Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); + + Application.Run(new FormMain()); + + Application.ThreadException -= new ThreadExceptionEventHandler(Application_ThreadException); + + IrssLog.Close(); + } + + /// <summary> + /// Handles unhandled exceptions. + /// </summary> + /// <param name="sender">Sender.</param> + /// <param name="e">Event args.</param> + static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) + { + IrssLog.Error(e.Exception); + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/MacroScope/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/MacroScope/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/MacroScope/Properties/AssemblyInfo.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -0,0 +1,38 @@ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("MacroScope")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("MacroScope")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3b4dbc18-a931-42eb-aa55-fc96a32f215f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] + +[assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/Translator/CopyDataWM.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/CopyDataWM.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/Translator/CopyDataWM.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -122,7 +122,7 @@ byte[] dataBytes = new byte[dataStructure.cbData]; IntPtr lpData = new IntPtr(dataStructure.lpData); Marshal.Copy(lpData, dataBytes, 0, dataStructure.cbData); - string strData = Encoding.ASCII.GetString(dataBytes); + string strData = Encoding.Default.GetString(dataBytes); Program.ProcessCommand(strData, true); } @@ -145,7 +145,7 @@ { Win32.COPYDATASTRUCT copyData; - byte[] dataBytes = Encoding.ASCII.GetBytes(data); + byte[] dataBytes = Encoding.Default.GetBytes(data); copyData.dwData = CopyDataID; copyData.lpData = Win32.VarPtr(dataBytes).ToInt32(); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -89,7 +89,7 @@ { comboBoxMacro.Items.Clear(); - string[] macroList = Program.GetMacroList(false); + string[] macroList = IrssMacro.GetMacroList(Program.FolderMacros, false); if (macroList != null && macroList.Length > 0) { comboBoxMacro.Items.AddRange(macroList); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.Designer.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.Designer.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -49,7 +49,7 @@ // this.labelName.Location = new System.Drawing.Point(8, 8); this.labelName.Name = "labelName"; - this.labelName.Size = new System.Drawing.Size(48, 20); + this.labelName.Size = new System.Drawing.Size(56, 20); this.labelName.TabIndex = 0; this.labelName.Text = "Name:"; this.labelName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; @@ -164,9 +164,9 @@ // 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(256, 296); + this.buttonCancel.Location = new System.Drawing.Point(248, 296); this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(48, 24); + this.buttonCancel.Size = new System.Drawing.Size(56, 24); this.buttonCancel.TabIndex = 6; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; @@ -177,7 +177,7 @@ 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, 296); this.buttonTest.Name = "buttonTest"; - this.buttonTest.Size = new System.Drawing.Size(48, 24); + this.buttonTest.Size = new System.Drawing.Size(56, 24); this.buttonTest.TabIndex = 4; this.buttonTest.Text = "Test"; this.buttonTest.UseVisualStyleBackColor = true; @@ -186,9 +186,9 @@ // 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(200, 296); + this.buttonOK.Location = new System.Drawing.Point(184, 296); this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(48, 24); + this.buttonOK.Size = new System.Drawing.Size(56, 24); this.buttonOK.TabIndex = 5; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-01-16 13:45:22 UTC (rev 1252) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-01-16 14:45:22 UTC (rev 1253) @@ -38,22 +38,28 @@ /// </summary> /// <param name="name">The name of an existing macro.</param> public MacroEditor(string name) - : this() { if (String.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); + InitializeComponent(); + textBoxName.Text = name; textBoxName.Enabled = false; string fileName = Program.FolderMacros + name + Common.FileExtensionMacro; - ReadFromFile(fileName); + string[] commands = IrssMacro.ReadFromFile(fileName); + + listBoxMacro.Items.AddRange(commands); } #endregion Constructor #region Implementation + /// <summary> + /// Refreshes the macro command list. + /// </summary> void RefreshCommandList() { comboBoxCommands.Items.Clear(); @@ -77,8 +83,15 @@ comboBoxCommands.Items.Add(Common.UITextHibernate); comboBoxCommands.Items.Add(Common.UITextReboot); comboBoxCommands.Items.Add(Common.UITextShutdown); + comboBoxCommands.Items.Add(Common.UITextLabel); + comboBoxCommands.Items.Add(Common.UITextGotoLabel); + comboBoxCommands.Items.Add(Common.UITextIf); + comboBoxCommands.Items.Add(Common.UITextSetVar); + comboBoxCommands.Items.Add(Common.UITextClearVars); + comboBoxCommands.Items.Add(Common.UITextLoadVars); + comboBoxCommands.Items.Add(Common.UITextSaveVars); - string[] macroList = Program.GetMacroList(true); + string[] macroList = IrssMacro.GetMacroList(Program.FolderMacros, true); if (macroList != null && macroList.Length > 0) comboBoxCommands.Items.AddRange(macroList); @@ -87,61 +100,6 @@ comboBoxCommands.Items.AddRange(irList); } - /// <summary> - /// Write the macro in the listBox to a macro name provided. - /// </summary> - /// <param name="fileName">Name of Macro to write (macro name, not file path).</param> - void WriteToFile(string fileName) - { - try - { - using (XmlTextWriter writer = new XmlTextWriter(fileName, Encoding.UTF8)) - { - writer.Formatting = Formatting.Indented; - writer.WriteStartDocument(true); - writer.WriteStartElement("macro"); - - foreach (string item in listBoxMacro.Items) - { - writer.WriteStartElement("item"); - writer.WriteAttributeString("command", item); - writer.WriteEndElement(); - } - - writer.WriteEndElement(); - writer.WriteEndDocument(); - } - } - catch (Exception ex) - { - IrssLog.Error(ex); - } - } - - /// <summary> - /// Read a macro into the listBox from the macro name provided. - /// </summary> - /// <param name="fileName">Name of Macro to read (macro name, not file path).</param> - void ReadFromFile(string fileName) - { - try - { - XmlDocument doc = new XmlDocument(); - doc.Load(fileName); - - XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("item"); - - listBoxMacro.Items.Clear(); - - foreach (XmlNode item in commandSequence) - listBoxMacro.Items.Add(item.Attributes["command"].Value); - } - catch (Exception ex) - { - IrssLog.Error(ex); - } - } - private void MacroEditor_Load(object sender, EventArgs e) { RefreshCommandList(); @@ -157,8 +115,48 @@ string selected = comboBoxCommands.SelectedItem as string; string newCommand = null; - if (selected.Equals(Common.UITextRun, StringComparison.OrdinalIgnoreCase)) + if (selected.Equals(Common.UITextIf, StringComparison.OrdinalIgnoreCase)) { + IfCommand ifCommand = new IfCommand(); + if (ifCommand.ShowDialog(this) == D... [truncated message content] |