From: <an...@us...> - 2007-11-03 12:41:56
|
Revision: 1018 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1018&view=rev Author: and-81 Date: 2007-11-03 05:41:55 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.resx trunk/plugins/IR Server Suite/Applications/Translator/MappedEvent.cs trunk/plugins/IR Server Suite/Applications/Translator/Program.cs trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/Applications/Translator/Properties/Resources.resx trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj trunk/plugins/IR Server Suite/Common/IrssComms/Server.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/MouseCommand.resx trunk/plugins/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/Resources.resx trunk/plugins/IR Server Suite/Common/IrssUtils/Win32.cs trunk/plugins/IR Server Suite/Common/MPUtils/MPUtils.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.csproj trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.Designer.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginBase.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/Microsoft MCE Transceiver/IrCode.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/IrDecoder.cs trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs 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.Designer.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/Forms/SetupForm.resx 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/InputMapper/InputHandler.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/Forms/SetupForm.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs Added Paths: ----------- trunk/plugins/IR Server Suite/Applications/Translator/Graphics/Edit.png trunk/plugins/IR Server Suite/Applications/Translator/Graphics/WinLogo.png trunk/plugins/IR Server Suite/Common/MPUtils/MPCommon.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/ReceiverWindow.cs Removed Paths: ------------- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/NativeMethods.cs Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-11-02 14:13:28 UTC (rev 1017) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-11-03 12:41:55 UTC (rev 1018) @@ -612,15 +612,15 @@ if (!origin.Checked) return; - if (origin != checkBoxMouseClickLeft) checkBoxMouseClickLeft.Checked = false; - if (origin != checkBoxMouseClickRight) checkBoxMouseClickRight.Checked = false; - if (origin != checkBoxMouseClickMiddle) checkBoxMouseClickMiddle.Checked = false; - if (origin != checkBoxMouseMoveUp) checkBoxMouseMoveUp.Checked = false; - if (origin != checkBoxMouseMoveDown) checkBoxMouseMoveDown.Checked = false; - if (origin != checkBoxMouseMoveLeft) checkBoxMouseMoveLeft.Checked = false; - if (origin != checkBoxMouseMoveRight) checkBoxMouseMoveRight.Checked = false; - if (origin != checkBoxMouseScrollUp) checkBoxMouseScrollUp.Checked = false; - if (origin != checkBoxMouseScrollDown) checkBoxMouseScrollDown.Checked = false; + if (origin != checkBoxMouseClickLeft) checkBoxMouseClickLeft.Checked = false; + if (origin != checkBoxMouseClickRight) checkBoxMouseClickRight.Checked = false; + if (origin != checkBoxMouseClickMiddle) checkBoxMouseClickMiddle.Checked = false; + if (origin != checkBoxMouseMoveUp) checkBoxMouseMoveUp.Checked = false; + if (origin != checkBoxMouseMoveDown) checkBoxMouseMoveDown.Checked = false; + if (origin != checkBoxMouseMoveLeft) checkBoxMouseMoveLeft.Checked = false; + if (origin != checkBoxMouseMoveRight) checkBoxMouseMoveRight.Checked = false; + if (origin != checkBoxMouseScrollUp) checkBoxMouseScrollUp.Checked = false; + if (origin != checkBoxMouseScrollDown) checkBoxMouseScrollDown.Checked = false; } private void KeystrokeToolStripMenuItem_Click(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-11-02 14:13:28 UTC (rev 1017) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.Designer.cs 2007-11-03 12:41:55 UTC (rev 1018) @@ -269,7 +269,7 @@ this.Controls.Add(this.textBoxApp); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(392, 308); + this.MinimumSize = new System.Drawing.Size(392, 396); this.Name = "EditProgramForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-11-02 14:13:28 UTC (rev 1017) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-11-03 12:41:55 UTC (rev 1018) @@ -62,6 +62,7 @@ comboBoxCommands.Items.Add(Common.UITextWindowMsg); comboBoxCommands.Items.Add(Common.UITextTcpMsg); comboBoxCommands.Items.Add(Common.UITextKeys); + comboBoxCommands.Items.Add(Common.UITextMouse); comboBoxCommands.Items.Add(Common.UITextEject); comboBoxCommands.Items.Add(Common.UITextStandby); comboBoxCommands.Items.Add(Common.UITextHibernate); @@ -137,6 +138,11 @@ writer.WriteAttributeString("command", Common.XmlTagKeys); writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixKeys.Length)); } + else if (item.StartsWith(Common.CmdPrefixMouse)) + { + writer.WriteAttributeString("command", Common.XmlTagMouse); + writer.WriteAttributeString("cmdproperty", item.Substring(Common.CmdPrefixMouse.Length)); + } else if (item.StartsWith(Common.CmdPrefixEject)) { writer.WriteAttributeString("command", Common.XmlTagEject); @@ -234,6 +240,10 @@ listBoxMacro.Items.Add(Common.CmdPrefixKeys + commandProperty); break; + case Common.XmlTagMouse: + listBoxMacro.Items.Add(Common.CmdPrefixMouse + commandProperty); + break; + case Common.XmlTagEject: listBoxMacro.Items.Add(Common.CmdPrefixEject + commandProperty); break; @@ -312,6 +322,12 @@ if (keysCommand.ShowDialog(this) == DialogResult.OK) listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString); } + else if (selected == Common.UITextMouse) + { + MouseCommand mouseCommand = new MouseCommand(); + if (mouseCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixMouse + mouseCommand.CommandString); + } else if (selected == Common.UITextEject) { EjectCommand ejectCommand = new EjectCommand(); @@ -528,6 +544,17 @@ listBoxMacro.Items.Insert(index, Common.CmdPrefixKeys + keysCommand.CommandString); listBoxMacro.SelectedIndex = index; } + else if (selected.StartsWith(Common.CmdPrefixMouse)) + { + MouseCommand mouseCommand = new MouseCommand(selected.Substring(Common.CmdPrefixMouse.Length)); + if (mouseCommand.ShowDialog(this) == DialogResult.Cancel) + return; + + int index = listBoxMacro.SelectedIndex; + listBoxMacro.Items.RemoveAt(index); + listBoxMacro.Items.Insert(index, Common.CmdPrefixMouse + mouseCommand.CommandString); + listBoxMacro.SelectedIndex = index; + } else if (selected.StartsWith(Common.CmdPrefixEject)) { EjectCommand ejectCommand = new EjectCommand(selected.Substring(Common.CmdPrefixEject.Length)); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2007-11-02 14:13:28 UTC (rev 1017) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs 2007-11-03 12:41:55 UTC (rev 1018) @@ -1,7 +1,9 @@ namespace Translator { + partial class MainForm { + /// <summary> /// Required designer variable. /// </summary> @@ -30,11 +32,9 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.comboBoxProgram = new System.Windows.Forms.ComboBox(); - this.groupBoxProgram = new System.Windows.Forms.GroupBox(); - this.buttonEditProgram = new System.Windows.Forms.Button(); - this.buttonRemoveProgram = new System.Windows.Forms.Button(); - this.buttonAddProgram = new System.Windows.Forms.Button(); + this.listViewPrograms = new System.Windows.Forms.ListView(); + this.contextMenuStripPrograms = new System.Windows.Forms.ContextMenuStrip(this.components); + this.imageListPrograms = new System.Windows.Forms.ImageList(this.components); this.buttonClear = new System.Windows.Forms.Button(); this.buttonModify = new System.Windows.Forms.Button(); this.buttonDelete = new System.Windows.Forms.Button(); @@ -55,18 +55,20 @@ this.comboBoxEvents = new System.Windows.Forms.ComboBox(); this.listViewEventMap = new System.Windows.Forms.ListView(); this.columnHeaderEvent = new System.Windows.Forms.ColumnHeader(); - this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); - this.tabPageIRCommands = new System.Windows.Forms.TabPage(); - this.listViewIR = new System.Windows.Forms.ListView(); - this.buttonNewIR = new System.Windows.Forms.Button(); - this.buttonEditIR = new System.Windows.Forms.Button(); - this.buttonDeleteIR = new System.Windows.Forms.Button(); + this.columnHeaderEventCommand = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStripEvents = new System.Windows.Forms.ContextMenuStrip(this.components); + this.removeEventToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.tabPageMacro = new System.Windows.Forms.TabPage(); this.listViewMacro = new System.Windows.Forms.ListView(); this.buttonTestMacro = new System.Windows.Forms.Button(); this.buttonDeleteMacro = new System.Windows.Forms.Button(); this.buttonNewMacro = new System.Windows.Forms.Button(); this.buttonEditMacro = new System.Windows.Forms.Button(); + this.tabPageIRCommands = new System.Windows.Forms.TabPage(); + this.listViewIR = new System.Windows.Forms.ListView(); + this.buttonNewIR = new System.Windows.Forms.Button(); + this.buttonEditIR = new System.Windows.Forms.Button(); + this.buttonDeleteIR = new System.Windows.Forms.Button(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.checkBoxAutoRun = new System.Windows.Forms.CheckBox(); this.menuStrip = new System.Windows.Forms.MenuStrip(); @@ -84,83 +86,53 @@ this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.groupBoxProgram.SuspendLayout(); this.tabControl.SuspendLayout(); this.tabPagePrograms.SuspendLayout(); this.tabPageEvents.SuspendLayout(); - this.tabPageIRCommands.SuspendLayout(); + this.contextMenuStripEvents.SuspendLayout(); this.tabPageMacro.SuspendLayout(); + this.tabPageIRCommands.SuspendLayout(); this.menuStrip.SuspendLayout(); this.SuspendLayout(); // - // comboBoxProgram + // listViewPrograms // - this.comboBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.listViewPrograms.Alignment = System.Windows.Forms.ListViewAlignment.Left; + this.listViewPrograms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxProgram.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxProgram.FormattingEnabled = true; - this.comboBoxProgram.Location = new System.Drawing.Point(8, 16); - this.comboBoxProgram.Name = "comboBoxProgram"; - this.comboBoxProgram.Size = new System.Drawing.Size(288, 21); - this.comboBoxProgram.TabIndex = 0; - this.toolTip.SetToolTip(this.comboBoxProgram, "Select a program to setup button mappings for"); - this.comboBoxProgram.SelectedIndexChanged += new System.EventHandler(this.comboBoxProgram_SelectedIndexChanged); + this.listViewPrograms.ContextMenuStrip = this.contextMenuStripPrograms; + this.listViewPrograms.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewPrograms.HideSelection = false; + this.listViewPrograms.LargeImageList = this.imageListPrograms; + this.listViewPrograms.Location = new System.Drawing.Point(8, 8); + this.listViewPrograms.MultiSelect = false; + this.listViewPrograms.Name = "listViewPrograms"; + this.listViewPrograms.ShowGroups = false; + this.listViewPrograms.ShowItemToolTips = true; + this.listViewPrograms.Size = new System.Drawing.Size(504, 80); + this.listViewPrograms.TabIndex = 0; + this.listViewPrograms.TileSize = new System.Drawing.Size(128, 48); + this.toolTip.SetToolTip(this.listViewPrograms, "Choose a Program to modify mappings for here"); + this.listViewPrograms.UseCompatibleStateImageBehavior = false; + this.listViewPrograms.DoubleClick += new System.EventHandler(this.listViewPrograms_DoubleClick); + this.listViewPrograms.SelectedIndexChanged += new System.EventHandler(this.listViewPrograms_SelectedIndexChanged); // - // groupBoxProgram + // contextMenuStripPrograms // - this.groupBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxProgram.Controls.Add(this.buttonEditProgram); - this.groupBoxProgram.Controls.Add(this.buttonRemoveProgram); - this.groupBoxProgram.Controls.Add(this.buttonAddProgram); - this.groupBoxProgram.Controls.Add(this.comboBoxProgram); - this.groupBoxProgram.Location = new System.Drawing.Point(8, 8); - this.groupBoxProgram.Name = "groupBoxProgram"; - this.groupBoxProgram.Size = new System.Drawing.Size(416, 48); - this.groupBoxProgram.TabIndex = 0; - this.groupBoxProgram.TabStop = false; - this.groupBoxProgram.Text = "Program"; + this.contextMenuStripPrograms.Name = "contextMenuStripPrograms"; + this.contextMenuStripPrograms.Size = new System.Drawing.Size(61, 4); + this.contextMenuStripPrograms.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripPrograms_Opening); // - // buttonEditProgram + // imageListPrograms // - this.buttonEditProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonEditProgram.Location = new System.Drawing.Point(368, 16); - this.buttonEditProgram.Name = "buttonEditProgram"; - this.buttonEditProgram.Size = new System.Drawing.Size(40, 24); - this.buttonEditProgram.TabIndex = 3; - this.buttonEditProgram.Text = "Edit"; - this.toolTip.SetToolTip(this.buttonEditProgram, "Edit the current program"); - this.buttonEditProgram.UseVisualStyleBackColor = true; - this.buttonEditProgram.Click += new System.EventHandler(this.buttonEditProgram_Click); + this.imageListPrograms.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; + this.imageListPrograms.ImageSize = new System.Drawing.Size(32, 32); + this.imageListPrograms.TransparentColor = System.Drawing.Color.Transparent; // - // buttonRemoveProgram - // - this.buttonRemoveProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonRemoveProgram.Image = global::Translator.Properties.Resources.Delete; - this.buttonRemoveProgram.Location = new System.Drawing.Point(336, 16); - this.buttonRemoveProgram.Name = "buttonRemoveProgram"; - this.buttonRemoveProgram.Size = new System.Drawing.Size(24, 24); - this.buttonRemoveProgram.TabIndex = 2; - this.toolTip.SetToolTip(this.buttonRemoveProgram, "Remove the current program from the list"); - this.buttonRemoveProgram.UseVisualStyleBackColor = true; - this.buttonRemoveProgram.Click += new System.EventHandler(this.buttonRemoveProgram_Click); - // - // buttonAddProgram - // - this.buttonAddProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAddProgram.Image = global::Translator.Properties.Resources.Plus; - this.buttonAddProgram.Location = new System.Drawing.Point(304, 16); - this.buttonAddProgram.Name = "buttonAddProgram"; - this.buttonAddProgram.Size = new System.Drawing.Size(24, 24); - this.buttonAddProgram.TabIndex = 1; - this.toolTip.SetToolTip(this.buttonAddProgram, "Add a program to the list"); - this.buttonAddProgram.UseVisualStyleBackColor = true; - this.buttonAddProgram.Click += new System.EventHandler(this.buttonAddProgram_Click); - // // buttonClear // this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonClear.Location = new System.Drawing.Point(368, 344); + this.buttonClear.Location = new System.Drawing.Point(456, 344); this.buttonClear.Name = "buttonClear"; this.buttonClear.Size = new System.Drawing.Size(56, 24); this.buttonClear.TabIndex = 5; @@ -217,10 +189,10 @@ this.listViewButtons.FullRowSelect = true; this.listViewButtons.GridLines = true; this.listViewButtons.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.listViewButtons.Location = new System.Drawing.Point(8, 64); + this.listViewButtons.Location = new System.Drawing.Point(8, 96); this.listViewButtons.MultiSelect = false; this.listViewButtons.Name = "listViewButtons"; - this.listViewButtons.Size = new System.Drawing.Size(416, 272); + this.listViewButtons.Size = new System.Drawing.Size(504, 240); this.listViewButtons.TabIndex = 1; this.listViewButtons.UseCompatibleStateImageBehavior = false; this.listViewButtons.View = System.Windows.Forms.View.Details; @@ -230,23 +202,23 @@ // columnHeaderButton // this.columnHeaderButton.Text = "Code"; - this.columnHeaderButton.Width = 50; + this.columnHeaderButton.Width = 100; // // columnHeaderDescription // this.columnHeaderDescription.Text = "Description"; - this.columnHeaderDescription.Width = 102; + this.columnHeaderDescription.Width = 180; // // columnHeaderCommand // this.columnHeaderCommand.Text = "Command"; - this.columnHeaderCommand.Width = 239; + this.columnHeaderCommand.Width = 200; // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(384, 440); + this.buttonOK.Location = new System.Drawing.Point(472, 440); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 3; @@ -261,27 +233,27 @@ | System.Windows.Forms.AnchorStyles.Right))); this.tabControl.Controls.Add(this.tabPagePrograms); this.tabControl.Controls.Add(this.tabPageEvents); - this.tabControl.Controls.Add(this.tabPageIRCommands); this.tabControl.Controls.Add(this.tabPageMacro); + this.tabControl.Controls.Add(this.tabPageIRCommands); this.tabControl.Location = new System.Drawing.Point(8, 32); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(440, 400); + this.tabControl.Size = new System.Drawing.Size(528, 400); this.tabControl.TabIndex = 1; this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); // // tabPagePrograms // this.tabPagePrograms.Controls.Add(this.buttonClear); - this.tabPagePrograms.Controls.Add(this.groupBoxProgram); this.tabPagePrograms.Controls.Add(this.buttonModify); - this.tabPagePrograms.Controls.Add(this.listViewButtons); this.tabPagePrograms.Controls.Add(this.buttonDelete); this.tabPagePrograms.Controls.Add(this.buttonNew); + this.tabPagePrograms.Controls.Add(this.listViewButtons); + this.tabPagePrograms.Controls.Add(this.listViewPrograms); this.tabPagePrograms.Location = new System.Drawing.Point(4, 22); this.tabPagePrograms.Name = "tabPagePrograms"; this.tabPagePrograms.Padding = new System.Windows.Forms.Padding(3); - this.tabPagePrograms.Size = new System.Drawing.Size(432, 374); + this.tabPagePrograms.Size = new System.Drawing.Size(520, 374); this.tabPagePrograms.TabIndex = 0; this.tabPagePrograms.Text = "Programs"; this.tabPagePrograms.UseVisualStyleBackColor = true; @@ -298,15 +270,15 @@ this.tabPageEvents.Location = new System.Drawing.Point(4, 22); this.tabPageEvents.Name = "tabPageEvents"; this.tabPageEvents.Padding = new System.Windows.Forms.Padding(3); - this.tabPageEvents.Size = new System.Drawing.Size(432, 374); - this.tabPageEvents.TabIndex = 2; + this.tabPageEvents.Size = new System.Drawing.Size(520, 374); + this.tabPageEvents.TabIndex = 1; this.tabPageEvents.Text = "Events"; this.tabPageEvents.UseVisualStyleBackColor = true; // // buttonSetCommand // this.buttonSetCommand.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSetCommand.Location = new System.Drawing.Point(368, 344); + this.buttonSetCommand.Location = new System.Drawing.Point(456, 344); this.buttonSetCommand.Name = "buttonSetCommand"; this.buttonSetCommand.Size = new System.Drawing.Size(56, 24); this.buttonSetCommand.TabIndex = 6; @@ -317,7 +289,7 @@ // buttonAddEvent // this.buttonAddEvent.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAddEvent.Location = new System.Drawing.Point(368, 312); + this.buttonAddEvent.Location = new System.Drawing.Point(456, 312); this.buttonAddEvent.Name = "buttonAddEvent"; this.buttonAddEvent.Size = new System.Drawing.Size(56, 24); this.buttonAddEvent.TabIndex = 3; @@ -343,7 +315,7 @@ this.comboBoxCommands.FormattingEnabled = true; this.comboBoxCommands.Location = new System.Drawing.Point(88, 344); this.comboBoxCommands.Name = "comboBoxCommands"; - this.comboBoxCommands.Size = new System.Drawing.Size(272, 21); + this.comboBoxCommands.Size = new System.Drawing.Size(352, 21); this.comboBoxCommands.TabIndex = 5; // // labelEvent @@ -364,7 +336,7 @@ this.comboBoxEvents.FormattingEnabled = true; this.comboBoxEvents.Location = new System.Drawing.Point(88, 312); this.comboBoxEvents.Name = "comboBoxEvents"; - this.comboBoxEvents.Size = new System.Drawing.Size(272, 21); + this.comboBoxEvents.Size = new System.Drawing.Size(352, 21); this.comboBoxEvents.TabIndex = 2; // // listViewEventMap @@ -374,14 +346,15 @@ | System.Windows.Forms.AnchorStyles.Right))); this.listViewEventMap.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeaderEvent, - this.columnHeader1}); + this.columnHeaderEventCommand}); + this.listViewEventMap.ContextMenuStrip = this.contextMenuStripEvents; this.listViewEventMap.FullRowSelect = true; this.listViewEventMap.GridLines = true; this.listViewEventMap.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.listViewEventMap.HideSelection = false; this.listViewEventMap.Location = new System.Drawing.Point(8, 8); this.listViewEventMap.Name = "listViewEventMap"; - this.listViewEventMap.Size = new System.Drawing.Size(416, 296); + this.listViewEventMap.Size = new System.Drawing.Size(504, 296); this.listViewEventMap.TabIndex = 0; this.listViewEventMap.UseCompatibleStateImageBehavior = false; this.listViewEventMap.View = System.Windows.Forms.View.Details; @@ -391,83 +364,29 @@ // columnHeaderEvent // this.columnHeaderEvent.Text = "Event"; - this.columnHeaderEvent.Width = 163; + this.columnHeaderEvent.Width = 200; // - // columnHeader1 + // columnHeaderEventCommand // - this.columnHeader1.Text = "Command"; - this.columnHeader1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; - this.columnHeader1.Width = 230; + this.columnHeaderEventCommand.Text = "Command"; + this.columnHeaderEventCommand.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnHeaderEventCommand.Width = 280; // - // tabPageIRCommands + // contextMenuStripEvents // - this.tabPageIRCommands.Controls.Add(this.listViewIR); - this.tabPageIRCommands.Controls.Add(this.buttonNewIR); - this.tabPageIRCommands.Controls.Add(this.buttonEditIR); - this.tabPageIRCommands.Controls.Add(this.buttonDeleteIR); - this.tabPageIRCommands.Location = new System.Drawing.Point(4, 22); - this.tabPageIRCommands.Name = "tabPageIRCommands"; - this.tabPageIRCommands.Padding = new System.Windows.Forms.Padding(3); - this.tabPageIRCommands.Size = new System.Drawing.Size(432, 374); - this.tabPageIRCommands.TabIndex = 2; - this.tabPageIRCommands.Text = "IR Commands"; - this.tabPageIRCommands.UseVisualStyleBackColor = true; + this.contextMenuStripEvents.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.removeEventToolStripMenuItem}); + this.contextMenuStripEvents.Name = "contextMenuStripEvents"; + this.contextMenuStripEvents.Size = new System.Drawing.Size(125, 26); // - // listViewIR + // removeEventToolStripMenuItem // - this.listViewIR.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.listViewIR.FullRowSelect = true; - this.listViewIR.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.listViewIR.HideSelection = false; - this.listViewIR.LabelEdit = true; - this.listViewIR.Location = new System.Drawing.Point(8, 8); - this.listViewIR.MultiSelect = false; - this.listViewIR.Name = "listViewIR"; - this.listViewIR.Size = new System.Drawing.Size(416, 328); - this.listViewIR.TabIndex = 0; - this.listViewIR.UseCompatibleStateImageBehavior = false; - this.listViewIR.View = System.Windows.Forms.View.List; - this.listViewIR.DoubleClick += new System.EventHandler(this.listViewIR_DoubleClick); - this.listViewIR.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewIR_AfterLabelEdit); + this.removeEventToolStripMenuItem.Image = global::Translator.Properties.Resources.Delete; + this.removeEventToolStripMenuItem.Name = "removeEventToolStripMenuItem"; + this.removeEventToolStripMenuItem.Size = new System.Drawing.Size(124, 22); + this.removeEventToolStripMenuItem.Text = "&Remove"; + this.removeEventToolStripMenuItem.Click += new System.EventHandler(this.removeEventToolStripMenuItem_Click); // - // buttonNewIR - // - this.buttonNewIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonNewIR.Location = new System.Drawing.Point(8, 344); - this.buttonNewIR.Name = "buttonNewIR"; - this.buttonNewIR.Size = new System.Drawing.Size(56, 24); - this.buttonNewIR.TabIndex = 1; - this.buttonNewIR.Text = "New"; - this.toolTip.SetToolTip(this.buttonNewIR, "Learn a new IR Command"); - this.buttonNewIR.UseVisualStyleBackColor = true; - this.buttonNewIR.Click += new System.EventHandler(this.buttonNewIR_Click); - // - // buttonEditIR - // - this.buttonEditIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonEditIR.Location = new System.Drawing.Point(72, 344); - this.buttonEditIR.Name = "buttonEditIR"; - this.buttonEditIR.Size = new System.Drawing.Size(56, 24); - this.buttonEditIR.TabIndex = 2; - this.buttonEditIR.Text = "Edit"; - this.toolTip.SetToolTip(this.buttonEditIR, "Re-Learn the currently selected IR Command"); - this.buttonEditIR.UseVisualStyleBackColor = true; - this.buttonEditIR.Click += new System.EventHandler(this.buttonEditIR_Click); - // - // buttonDeleteIR - // - this.buttonDeleteIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonDeleteIR.Location = new System.Drawing.Point(136, 344); - this.buttonDeleteIR.Name = "buttonDeleteIR"; - this.buttonDeleteIR.Size = new System.Drawing.Size(56, 24); - this.buttonDeleteIR.TabIndex = 3; - this.buttonDeleteIR.Text = "Delete"; - this.toolTip.SetToolTip(this.buttonDeleteIR, "Delete the currently selected IR Command"); - this.buttonDeleteIR.UseVisualStyleBackColor = true; - this.buttonDeleteIR.Click += new System.EventHandler(this.buttonDeleteIR_Click); - // // tabPageMacro // this.tabPageMacro.Controls.Add(this.listViewMacro); @@ -478,8 +397,8 @@ this.tabPageMacro.Location = new System.Drawing.Point(4, 22); this.tabPageMacro.Name = "tabPageMacro"; this.tabPageMacro.Padding = new System.Windows.Forms.Padding(3); - this.tabPageMacro.Size = new System.Drawing.Size(432, 374); - this.tabPageMacro.TabIndex = 3; + this.tabPageMacro.Size = new System.Drawing.Size(520, 374); + this.tabPageMacro.TabIndex = 2; this.tabPageMacro.Text = "Macros"; this.tabPageMacro.UseVisualStyleBackColor = true; // @@ -495,7 +414,7 @@ this.listViewMacro.Location = new System.Drawing.Point(8, 8); this.listViewMacro.MultiSelect = false; this.listViewMacro.Name = "listViewMacro"; - this.listViewMacro.Size = new System.Drawing.Size(416, 328); + this.listViewMacro.Size = new System.Drawing.Size(504, 328); this.listViewMacro.TabIndex = 5; this.listViewMacro.UseCompatibleStateImageBehavior = false; this.listViewMacro.View = System.Windows.Forms.View.List; @@ -550,6 +469,75 @@ this.buttonEditMacro.UseVisualStyleBackColor = true; this.buttonEditMacro.Click += new System.EventHandler(this.buttonEditMacro_Click); // + // tabPageIRCommands + // + this.tabPageIRCommands.Controls.Add(this.listViewIR); + this.tabPageIRCommands.Controls.Add(this.buttonNewIR); + this.tabPageIRCommands.Controls.Add(this.buttonEditIR); + this.tabPageIRCommands.Controls.Add(this.buttonDeleteIR); + this.tabPageIRCommands.Location = new System.Drawing.Point(4, 22); + this.tabPageIRCommands.Name = "tabPageIRCommands"; + this.tabPageIRCommands.Padding = new System.Windows.Forms.Padding(3); + this.tabPageIRCommands.Size = new System.Drawing.Size(520, 374); + this.tabPageIRCommands.TabIndex = 3; + this.tabPageIRCommands.Text = "IR Commands"; + this.tabPageIRCommands.UseVisualStyleBackColor = true; + // + // listViewIR + // + this.listViewIR.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.listViewIR.FullRowSelect = true; + this.listViewIR.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewIR.HideSelection = false; + this.listViewIR.LabelEdit = true; + this.listViewIR.Location = new System.Drawing.Point(8, 8); + this.listViewIR.MultiSelect = false; + this.listViewIR.Name = "listViewIR"; + this.listViewIR.Size = new System.Drawing.Size(504, 328); + this.listViewIR.TabIndex = 0; + this.listViewIR.UseCompatibleStateImageBehavior = false; + this.listViewIR.View = System.Windows.Forms.View.List; + this.listViewIR.DoubleClick += new System.EventHandler(this.listViewIR_DoubleClick); + this.listViewIR.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewIR_AfterLabelEdit); + // + // buttonNewIR + // + this.buttonNewIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonNewIR.Location = new System.Drawing.Point(8, 344); + this.buttonNewIR.Name = "buttonNewIR"; + this.buttonNewIR.Size = new System.Drawing.Size(56, 24); + this.buttonNewIR.TabIndex = 1; + this.buttonNewIR.Text = "New"; + this.toolTip.SetToolTip(this.buttonNewIR, "Learn a new IR Command"); + this.buttonNewIR.UseVisualStyleBackColor = true; + this.buttonNewIR.Click += new System.EventHandler(this.buttonNewIR_Click); + // + // buttonEditIR + // + this.buttonEditIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonEditIR.Location = new System.Drawing.Point(72, 344); + this.buttonEditIR.Name = "buttonEditIR"; + this.buttonEditIR.Size = new System.Drawing.Size(56, 24); + this.buttonEditIR.TabIndex = 2; + this.buttonEditIR.Text = "Edit"; + this.toolTip.SetToolTip(this.buttonEditIR, "Re-Learn the currently selected IR Command"); + this.buttonEditIR.UseVisualStyleBackColor = true; + this.buttonEditIR.Click += new System.EventHandler(this.buttonEditIR_Click); + // + // buttonDeleteIR + // + this.buttonDeleteIR.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonDeleteIR.Location = new System.Drawing.Point(136, 344); + this.buttonDeleteIR.Name = "buttonDeleteIR"; + this.buttonDeleteIR.Size = new System.Drawing.Size(56, 24); + this.buttonDeleteIR.TabIndex = 3; + this.buttonDeleteIR.Text = "Delete"; + this.toolTip.SetToolTip(this.buttonDeleteIR, "Delete the currently selected IR Command"); + this.buttonDeleteIR.UseVisualStyleBackColor = true; + this.buttonDeleteIR.Click += new System.EventHandler(this.buttonDeleteIR_Click); + // // checkBoxAutoRun // this.checkBoxAutoRun.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -570,7 +558,7 @@ this.helpToolStripMenuItem}); this.menuStrip.Location = new System.Drawing.Point(0, 0); this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(456, 24); + this.menuStrip.Size = new System.Drawing.Size(544, 24); this.menuStrip.TabIndex = 0; this.menuStrip.Text = "menuStrip"; // @@ -586,58 +574,58 @@ this.toolStripSeparator2, this.quitToolStripMenuItem}); this.configurationToolStripMenuItem.Name = "configurationToolStripMenuItem"; - this.configurationToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.configurationToolStripMenuItem.Size = new System.Drawing.Size(35, 20); this.configurationToolStripMenuItem.Text = "&File"; // // newToolStripMenuItem // this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.newToolStripMenuItem.Size = new System.Drawing.Size(132, 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(122, 22); + this.openToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.openToolStripMenuItem.Text = "&Open ..."; this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); // // importToolStripMenuItem // this.importToolStripMenuItem.Name = "importToolStripMenuItem"; - this.importToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.importToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.importToolStripMenuItem.Text = "&Import ..."; this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click); // // exportToolStripMenuItem // this.exportToolStripMenuItem.Name = "exportToolStripMenuItem"; - this.exportToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.exportToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.exportToolStripMenuItem.Text = "&Export ..."; this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(119, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(129, 6); // // serverToolStripMenuItem // this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; - this.serverToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.serverToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.serverToolStripMenuItem.Text = "&Server ..."; this.serverToolStripMenuItem.Click += new System.EventHandler(this.serverToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(119, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(129, 6); // // quitToolStripMenuItem // this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; - this.quitToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.quitToolStripMenuItem.Size = new System.Drawing.Size(132, 22); this.quitToolStripMenuItem.Text = "&Quit"; this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); // @@ -647,20 +635,20 @@ this.translatorHelpToolStripMenuItem, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20); this.helpToolStripMenuItem.Text = "&Help"; // // translatorHelpToolStripMenuItem // this.translatorHelpToolStripMenuItem.Name = "translatorHelpToolStripMenuItem"; - this.translatorHelpToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.translatorHelpToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.translatorHelpToolStripMenuItem.Text = "&Contents"; this.translatorHelpToolStripMenuItem.Click += new System.EventHandler(this.translatorHelpToolStripMenuItem_Click); // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(122, 22); + this.aboutToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // @@ -679,26 +667,26 @@ this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(456, 472); - this.Controls.Add(this.checkBoxAutoRun); + this.ClientSize = new System.Drawing.Size(544, 472); this.Controls.Add(this.tabControl); this.Controls.Add(this.buttonOK); + this.Controls.Add(this.checkBoxAutoRun); this.Controls.Add(this.menuStrip); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.menuStrip; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(472, 508); + this.MinimumSize = new System.Drawing.Size(472, 448); this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Translator"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.Load += new System.EventHandler(this.MainForm_Load); - this.groupBoxProgram.ResumeLayout(false); this.tabControl.ResumeLayout(false); this.tabPagePrograms.ResumeLayout(false); this.tabPageEvents.ResumeLayout(false); - this.tabPageIRCommands.ResumeLayout(false); + this.contextMenuStripEvents.ResumeLayout(false); this.tabPageMacro.ResumeLayout(false); + this.tabPageIRCommands.ResumeLayout(false); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.ResumeLayout(false); @@ -708,18 +696,13 @@ #endregion - private System.Windows.Forms.ComboBox comboBoxProgram; - private System.Windows.Forms.GroupBox groupBoxProgram; - private System.Windows.Forms.Button buttonAddProgram; private System.Windows.Forms.ListView listViewButtons; private System.Windows.Forms.ColumnHeader columnHeaderButton; private System.Windows.Forms.ColumnHeader columnHeaderCommand; private System.Windows.Forms.Button buttonNew; private System.Windows.Forms.Button buttonModify; private System.Windows.Forms.Button buttonDelete; - private System.Windows.Forms.Button buttonRemoveProgram; private System.Windows.Forms.Button buttonClear; - private System.Windows.Forms.Button buttonEditProgram; private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.TabControl tabControl; private System.Windows.Forms.TabPage tabPagePrograms; @@ -740,7 +723,7 @@ private System.Windows.Forms.ComboBox comboBoxEvents; private System.Windows.Forms.ListView listViewEventMap; private System.Windows.Forms.ColumnHeader columnHeaderEvent; - private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeaderEventCommand; private System.Windows.Forms.Button buttonSetCommand; private System.Windows.Forms.Button buttonAddEvent; private System.Windows.Forms.Label labelCommand; @@ -762,6 +745,11 @@ private System.Windows.Forms.SaveFileDialog saveFileDialog; private System.Windows.Forms.ListView listViewIR; private System.Windows.Forms.ListView listViewMacro; + private System.Windows.Forms.ListView listViewPrograms; + private System.Windows.Forms.ImageList imageListPrograms; + private System.Windows.Forms.ContextMenuStrip contextMenuStripPrograms; + private System.Windows.Forms.ContextMenuStrip contextMenuStripEvents; + private System.Windows.Forms.ToolStripMenuItem removeEventToolStripMenuItem; } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-11-02 14:13:28 UTC (rev 1017) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-11-03 12:41:55 UTC (rev 1018) @@ -19,6 +19,12 @@ partial class MainForm : Form { + #region Constants + + const string SystemWide = "System Wide"; + + #endregion Constants + #region Enumerations /// <summary> @@ -87,6 +93,10 @@ #region Variables LearnIR _learnIR; + + ToolStripMenuItem _addProgramToolStripMenuItem; + ToolStripMenuItem _editProgramToolStripMenuItem; + ToolStripMenuItem _removeProgramToolStripMenuItem; #endregion Variables @@ -97,12 +107,16 @@ InitializeComponent(); RefreshProgramList(); + listViewPrograms.Items[0].Selected = true; + RefreshButtonList(); RefreshEventList(); RefreshEventCommands(); RefreshIRList(); RefreshMacroList(); + SetupProgramsContextMenu(); + try { checkBoxAutoRun.Checked = SystemRegistry.GetAutoRun("Translator"); @@ -114,14 +128,27 @@ void RefreshProgramList() { - comboBoxProgram.Items.Clear(); - comboBoxProgram.Items.Add("System wide"); + imageListPrograms.Images.Clear(); + imageListPrograms.Images.Add(Properties.Resources.WinLogo); + listViewPrograms.Items.Clear(); + + ListViewItem newItem = new ListViewItem(SystemWide, 0); + newItem.ToolTipText = "Defines mappings that effect the whole computer"; + listViewPrograms.Items.Add(newItem); + + int imageIndex = 1; foreach (ProgramSettings progSettings in Program.Config.Programs) - comboBoxProgram.Items.Add(progSettings.Name); + { + Icon icon = Win32.GetIconFor(progSettings.Filename); - comboBoxProgram.SelectedIndex = 0; + imageListPrograms.Images.Add(icon); + newItem = new ListViewItem(progSettings.Name, imageIndex++); + newItem.ToolTipText = progSettings.Filename; + listViewPrograms.Items.Add(newItem); + } + Program.UpdateNotifyMenu(); } void RefreshButtonList() @@ -210,14 +237,13 @@ List<ButtonMapping> GetCurrentSettings() { - string selectedItem = comboBoxProgram.SelectedItem as string; + if (listViewPrograms.SelectedItems.Count == 0) + return null; - if (selectedItem == null) + string selectedItem = listViewPrograms.SelectedItems[0].Text; + + if (selectedItem == SystemWide) { - return null; - } - else if (selectedItem == "System wide") - { return Program.Config.SystemWideMappings; } else @@ -230,6 +256,59 @@ return null; } + void SetupProgramsContextMenu() + { + _addProgramToolStripMenuItem = new ToolStripMenuItem("&Add Program", Properties.Resources.Plus, new EventHandler(addProgramToolStripMenuItem_Click)); + _editProgramToolStripMenuItem = new ToolStripMenuItem("&Edit Program", Properties.Resources.Edit, new EventHandler(editProgramToolStripMenuItem_Click)); + _removeProgramToolStripMenuItem = new ToolStripMenuItem("&Remove Program", Properties.Resources.Delete, new EventHandler(removeProgramToolStripMenuItem_Click)); + + contextMenuStripPrograms.Items.Add(_addProgramToolStripMenuItem); + contextMenuStripPrograms.Items.Add(_editProgramToolStripMenuItem); + contextMenuStripPrograms.Items.Add(_removeProgramToolStripMenuItem); + } + void RefreshProgramsContextMenu() + { + if (listViewPrograms.SelectedItems.Count == 0 || + listViewPrograms.SelectedItems[0].Text == SystemWide) + { + _editProgramToolStripMenuItem.Enabled = false; + _removeProgramToolStripMenuItem.Enabled = false; + } + else + { + _editProgramToolStripMenuItem.Enabled = true; + _removeProgramToolStripMenuItem.Enabled = true; + } + + if (listViewPrograms.SelectedItems.Count == 0) + { + _editProgramToolStripMenuItem.Text = "&Edit ..."; + _removeProgramToolStripMenuItem.Text = "&Remove ..."; + }/* + else if (listViewPrograms.SelectedItems[0].Text == SystemWide) + { + }*/ + else + { + string program = listViewPrograms.SelectedItems[0].Text; + _editProgramToolStripMenuItem.Text = "&Edit \"" + program + "\""; + _removeProgramToolStripMenuItem.Text = "&Remove \"" + program + "\""; + } + + } + + void AddProgram() + { + ProgramSettings progSettings = new ProgramSettings(); + + if (EditProgram(progSettings)) + { + Program.Config.Programs.Add(progSettings); + + RefreshProgramList(); + } + } + bool EditProgram(ProgramSettings progSettings) { EditProgramForm editProg = new EditProgramForm(progSettings); @@ -250,7 +329,27 @@ return false; } + bool EditProgram(string programName) + { + foreach (ProgramSettings progSettings in Program.Config.Programs) + { + if (progSettings.Name.Equals(programName)) + { + if (EditProgram(progSettings)) + { + RefreshProgramList(); + return true; + } + else + { + return false; + } + } + } + return false; + } + void EditIR() { if (listViewIR.SelectedItems.Count != 1) @@ -378,71 +477,6 @@ } } - private void comboBoxProgram_SelectedIndexChanged(object sender, EventArgs e) - { - if ((comboBoxProgram.SelectedItem as string) == "System wide") - { - buttonRemoveProgram.Enabled = false; - buttonEditProgram.Enabled = false; - } - else - { - buttonRemoveProgram.Enabled = true; - buttonEditProgram.Enabled = true; - } - - RefreshButtonList(); - } - - private void buttonAddProgram_Click(object sender, EventArgs e) - { - ProgramSettings progSettings = new ProgramSettings(); - - if (EditProgram(progSettings)) - { - // TODO: check for duplicates in Program.Config.Programs ... - - comboBoxProgram.Items.Add(progSettings.Name); - Program.Config.Programs.Add(progSettings); - comboBoxProgram.SelectedIndex = comboBoxProgram.Items.Count - 1; - } - } - private void buttonRemoveProgram_Click(object sender, EventArgs e) - { - ProgramSettings progSettings = null; - - foreach (ProgramSettings settings in Program.Config.Programs) - { - if (settings.Name == comboBoxProgram.SelectedItem as string) - { - progSettings = settings; - } - } - - if (progSettings != null) - { - if (MessageBox.Show(this, String.Format("Are you sure you want to remove all mappings for {0}?", progSettings.Name), String.Format("Remove {0}?", progSettings.Name), MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) - { - Program.Config.Programs.Remove(progSettings); - comboBoxProgram.Items.Remove(comboBoxProgram.SelectedItem); - comboBoxProgram.SelectedIndex = 0; - - Program.UpdateNotifyMenu(); - } - } - } - private void buttonEditProgram_Click(object sender, EventArgs e) - { - foreach (ProgramSettings progSettings in Program.Config.Programs) - if (progSettings.Name == comboBoxProgram.SelectedItem as string) - if (EditProgram(progSettings)) - { - comboBoxProgram.Items.Remove(comboBoxProgram.SelectedItem); - comboBoxProgram.Items.Add(progSettings.Name); - comboBoxProgram.SelectedItem = progSettings.Name; - } - } - private void buttonNew_Click(object sender, EventArgs e) { GetKeyCodeForm getKeyCode = new GetKeyCodeForm(); @@ -716,16 +750,18 @@ return; } - if (!Common.IsValidFileName(e.Label)) + string name = e.Label.Trim(); + + if (!Common.IsValidFileName(name)) { - MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("File name not valid: " + name, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); e.CancelEdit = true; return; } try { - string newFileName = Common.FolderIRCommands + e.Label + Common.FileExtensionIR; + string newFileName = Common.FolderIRCommands + name + Common.FileExtensionIR; File.Move(oldFileName, newFileName); } @@ -760,16 +796,18 @@ return; } - if (!Common.IsValidFileName(e.Label)) + string name = e.Label.Trim(); + + if (!Common.IsValidFileName(name)) { - MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show("File name not valid: " + name, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); e.CancelEdit = true; return; } try { - string newFileName = Program.FolderMacros + e.Label + Common.FileExtensionMacro; + string newFileName = Program.FolderMacros + name + Common.FileExtensionMacro; File.Move(oldFileName, newFileName); } @@ -790,11 +828,12 @@ private void buttonAddEvent_Click(object sender, EventArgs e) { - listViewEventMap.Items.Add( - new ListViewItem( - new string[] { comboBoxEvents.SelectedItem as string, String.Empty } - ) - ); + ListViewItem newItem = + new ListViewItem(new string[] { comboBoxEvents.SelectedItem as string, String.Empty }); + + listViewEventMap.SelectedIndices.Clear(); + listViewEventMap.Items.Add(newItem); + newItem.Selected = true; } private void buttonSetCommand_Click(object sender, EventArgs e) { @@ -870,7 +909,6 @@ foreach (ListViewItem listViewItem in listViewEventMap.SelectedItems) listViewEventMap.Items.Remove(listViewItem); } - private void listViewEventMap_DoubleClick(object sender, EventArgs e) { if (listViewEventMap.SelectedItems.Count != 1) @@ -936,6 +974,20 @@ listViewEventMap.SelectedItems[0].SubItems[1].Text = command; } + private void listViewPrograms_DoubleClick(object sender, EventArgs e) + { + if (listViewPrograms.SelectedItems.Count == 1 && listViewPrograms.SelectedItems[0].Text != SystemWide) + { + string selectedItem = listViewPrograms.SelectedItems[0].Text; + + EditProgram(selectedItem); + } + } + private void listViewPrograms_SelectedIndexChanged(object sender, EventArgs e) + { + RefreshButtonList(); + } + #endregion Controls #region Menu @@ -1034,6 +1086,55 @@ MessageBox.Show(this, "Translator\nVersion 1.0.3.5 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information); } + private void addProgramToolStripMenuItem_Click(object sender, EventArgs e) + { + AddProgram(); + } + private void editProgramToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listViewPrograms.SelectedItems.Count == 0) + return; + + stri... [truncated message content] |