From: <che...@us...> - 2009-09-18 11:33:20
|
Revision: 3094 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3094&view=rev Author: chef_koch Date: 2009-09-18 11:33:05 +0000 (Fri, 18 Sep 2009) Log Message: ----------- added a few more icons make more usage of icons Modified Paths: -------------- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/IR File Tool.csproj trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/Program.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/MacroScope.csproj trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/Program.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/Translator/Forms/MainForm.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/Translator/Forms/MainForm.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/Translator/Forms/MainForm.resx trunk/plugins/IR Server Suite/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/IrssUtils.csproj trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Properties/Resources.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Properties/Resources.resx Added Paths: ----------- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/MainForm.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/MainForm.resx trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/MainForm.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/MainForm.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/MainForm.resx trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Graphics/ChangeServer.png trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Graphics/CloseDocument.png trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Graphics/Connect.png trunk/plugins/IR Server Suite/IR Server Suite/Common/IrssUtils/Graphics/Disconnect.png Removed Paths: ------------- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.resx trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/FormMain.Designer.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/FormMain.cs trunk/plugins/IR Server Suite/IR Server Suite/Applications/MacroScope/FormMain.resx Deleted: trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs 2009-09-18 01:12:50 UTC (rev 3093) +++ trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.Designer.cs 2009-09-18 11:33:05 UTC (rev 3094) @@ -1,404 +0,0 @@ -namespace IrFileTool -{ - 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(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); - 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.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.connectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.disconnectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.changeServerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.textBoxPronto = new System.Windows.Forms.TextBox(); - this.toolTips = new System.Windows.Forms.ToolTip(this.components); - this.buttonSetCarrier = new System.Windows.Forms.Button(); - this.checkBoxStoreBinary = new System.Windows.Forms.CheckBox(); - this.buttonAttemptDecode = new System.Windows.Forms.Button(); - this.buttonBlast = new System.Windows.Forms.Button(); - this.buttonLearn = new System.Windows.Forms.Button(); - this.textBoxCarrier = new System.Windows.Forms.TextBox(); - this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); - this.groupBoxCarrier = new System.Windows.Forms.GroupBox(); - this.groupBoxTestBlast = new System.Windows.Forms.GroupBox(); - this.comboBoxPort = new System.Windows.Forms.ComboBox(); - this.statusStrip = new System.Windows.Forms.StatusStrip(); - this.toolStripStatusLabelConnected = new System.Windows.Forms.ToolStripStatusLabel(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.menuStrip.SuspendLayout(); - this.groupBoxCarrier.SuspendLayout(); - this.groupBoxTestBlast.SuspendLayout(); - this.statusStrip.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.serverToolStripMenuItem, - this.helpToolStripMenuItem}); - this.menuStrip.Location = new System.Drawing.Point(0, 0); - this.menuStrip.Name = "menuStrip"; - this.menuStrip.Size = new System.Drawing.Size(512, 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.toolStripSeparator1, - this.quitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "&File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newToolStripMenuItem.Size = new System.Drawing.Size(248, 22); - this.newToolStripMenuItem.Text = "&New"; - this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); - // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openToolStripMenuItem.Size = new System.Drawing.Size(248, 22); - this.openToolStripMenuItem.Text = "&Open..."; - this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); - // - // saveToolStripMenuItem - // - this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; - this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveToolStripMenuItem.Size = new System.Drawing.Size(248, 22); - this.saveToolStripMenuItem.Text = "&Save"; - this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); - // - // saveasToolStripMenuItem - // - this.saveasToolStripMenuItem.Name = "saveasToolStripMenuItem"; - this.saveasToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.S))); - this.saveasToolStripMenuItem.Size = new System.Drawing.Size(248, 22); - this.saveasToolStripMenuItem.Text = "Save &As..."; - this.saveasToolStripMenuItem.Click += new System.EventHandler(this.saveasToolStripMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(245, 6); - // - // quitToolStripMenuItem - // - this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; - this.quitToolStripMenuItem.Size = new System.Drawing.Size(248, 22); - this.quitToolStripMenuItem.Text = "E&xit"; - this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); - // - // serverToolStripMenuItem - // - this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.connectToolStripMenuItem, - this.disconnectToolStripMenuItem, - this.changeServerToolStripMenuItem}); - this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; - this.serverToolStripMenuItem.Size = new System.Drawing.Size(51, 20); - this.serverToolStripMenuItem.Text = "&Server"; - // - // connectToolStripMenuItem - // - this.connectToolStripMenuItem.Name = "connectToolStripMenuItem"; - this.connectToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.connectToolStripMenuItem.Text = "&Connect"; - this.connectToolStripMenuItem.Click += new System.EventHandler(this.connectToolStripMenuItem_Click); - // - // disconnectToolStripMenuItem - // - this.disconnectToolStripMenuItem.Name = "disconnectToolStripMenuItem"; - this.disconnectToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.disconnectToolStripMenuItem.Text = "&Disconnect"; - this.disconnectToolStripMenuItem.Click += new System.EventHandler(this.disconnectToolStripMenuItem_Click); - // - // changeServerToolStripMenuItem - // - this.changeServerToolStripMenuItem.Name = "changeServerToolStripMenuItem"; - this.changeServerToolStripMenuItem.Size = new System.Drawing.Size(159, 22); - this.changeServerToolStripMenuItem.Text = "Change &Server..."; - this.changeServerToolStripMenuItem.Click += new System.EventHandler(this.changeServerToolStripMenuItem_Click); - // - // textBoxPronto - // - this.textBoxPronto.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.textBoxPronto.Font = new System.Drawing.Font("Courier New", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxPronto.Location = new System.Drawing.Point(8, 32); - this.textBoxPronto.Multiline = true; - this.textBoxPronto.Name = "textBoxPronto"; - this.textBoxPronto.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxPronto.Size = new System.Drawing.Size(320, 240); - this.textBoxPronto.TabIndex = 1; - // - // buttonSetCarrier - // - this.buttonSetCarrier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonSetCarrier.Location = new System.Drawing.Point(112, 24); - this.buttonSetCarrier.Name = "buttonSetCarrier"; - this.buttonSetCarrier.Size = new System.Drawing.Size(48, 24); - this.buttonSetCarrier.TabIndex = 1; - this.buttonSetCarrier.Text = "&Set"; - this.toolTips.SetToolTip(this.buttonSetCarrier, "Change the carrier frequency"); - this.buttonSetCarrier.UseVisualStyleBackColor = true; - this.buttonSetCarrier.Click += new System.EventHandler(this.buttonSetCarrier_Click); - // - // checkBoxStoreBinary - // - this.checkBoxStoreBinary.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxStoreBinary.Location = new System.Drawing.Point(344, 248); - this.checkBoxStoreBinary.Name = "checkBoxStoreBinary"; - this.checkBoxStoreBinary.Size = new System.Drawing.Size(160, 24); - this.checkBoxStoreBinary.TabIndex = 6; - this.checkBoxStoreBinary.Text = "Store &mceir.dll compatible"; - this.toolTips.SetToolTip(this.checkBoxStoreBinary, "Store this IR Code in an MceIr.dll compatible form"); - this.checkBoxStoreBinary.UseVisualStyleBackColor = true; - // - // buttonAttemptDecode - // - this.buttonAttemptDecode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAttemptDecode.Location = new System.Drawing.Point(368, 208); - this.buttonAttemptDecode.Name = "buttonAttemptDecode"; - this.buttonAttemptDecode.Size = new System.Drawing.Size(112, 24); - this.buttonAttemptDecode.TabIndex = 5; - this.buttonAttemptDecode.Text = "&Attempt Decode"; - this.toolTips.SetToolTip(this.buttonAttemptDecode, "Try to decode the IR signal into a recognised format"); - this.buttonAttemptDecode.UseVisualStyleBackColor = true; - this.buttonAttemptDecode.Click += new System.EventHandler(this.buttonAttemptDecode_Click); - // - // buttonBlast - // - this.buttonBlast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonBlast.Location = new System.Drawing.Point(112, 24); - this.buttonBlast.Name = "buttonBlast"; - this.buttonBlast.Size = new System.Drawing.Size(48, 24); - this.buttonBlast.TabIndex = 1; - this.buttonBlast.Text = "&Blast"; - this.toolTips.SetToolTip(this.buttonBlast, "Blast the current IR command for testing"); - this.buttonBlast.UseVisualStyleBackColor = true; - this.buttonBlast.Click += new System.EventHandler(this.buttonBlast_Click); - // - // buttonLearn - // - this.buttonLearn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLearn.Enabled = false; - this.buttonLearn.Location = new System.Drawing.Point(368, 168); - this.buttonLearn.Name = "buttonLearn"; - this.buttonLearn.Size = new System.Drawing.Size(112, 24); - this.buttonLearn.TabIndex = 4; - this.buttonLearn.Text = "&Learn IR"; - this.toolTips.SetToolTip(this.buttonLearn, "Learn a new IR command"); - this.buttonLearn.UseVisualStyleBackColor = true; - this.buttonLearn.Click += new System.EventHandler(this.buttonLearn_Click); - // - // textBoxCarrier - // - this.textBoxCarrier.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxCarrier.Location = new System.Drawing.Point(8, 24); - this.textBoxCarrier.Name = "textBoxCarrier"; - this.textBoxCarrier.Size = new System.Drawing.Size(96, 20); - this.textBoxCarrier.TabIndex = 0; - // - // openFileDialog - // - this.openFileDialog.DefaultExt = "IR"; - this.openFileDialog.Filter = "IR Files|*.IR"; - this.openFileDialog.Title = "Open an IR file ..."; - // - // saveFileDialog - // - this.saveFileDialog.DefaultExt = "IR"; - this.saveFileDialog.Filter = "IR Files|*.IR"; - this.saveFileDialog.Title = "Save an IR file ..."; - // - // groupBoxCarrier - // - this.groupBoxCarrier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxCarrier.Controls.Add(this.textBoxCarrier); - this.groupBoxCarrier.Controls.Add(this.buttonSetCarrier); - this.groupBoxCarrier.Location = new System.Drawing.Point(336, 32); - this.groupBoxCarrier.Name = "groupBoxCarrier"; - this.groupBoxCarrier.Size = new System.Drawing.Size(168, 56); - this.groupBoxCarrier.TabIndex = 2; - this.groupBoxCarrier.TabStop = false; - this.groupBoxCarrier.Text = "Carrier frequency"; - // - // groupBoxTestBlast - // - this.groupBoxTestBlast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxTestBlast.Controls.Add(this.buttonBlast); - this.groupBoxTestBlast.Controls.Add(this.comboBoxPort); - this.groupBoxTestBlast.Enabled = false; - this.groupBoxTestBlast.Location = new System.Drawing.Point(336, 96); - this.groupBoxTestBlast.Name = "groupBoxTestBlast"; - this.groupBoxTestBlast.Size = new System.Drawing.Size(168, 56); - this.groupBoxTestBlast.TabIndex = 3; - this.groupBoxTestBlast.TabStop = false; - this.groupBoxTestBlast.Text = "Test blast"; - // - // comboBoxPort - // - this.comboBoxPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxPort.FormattingEnabled = true; - this.comboBoxPort.Location = new System.Drawing.Point(8, 24); - this.comboBoxPort.Name = "comboBoxPort"; - this.comboBoxPort.Size = new System.Drawing.Size(96, 21); - this.comboBoxPort.TabIndex = 0; - // - // statusStrip - // - this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripStatusLabelConnected}); - this.statusStrip.Location = new System.Drawing.Point(0, 284); - this.statusStrip.Name = "statusStrip"; - this.statusStrip.Size = new System.Drawing.Size(512, 22); - this.statusStrip.TabIndex = 7; - this.statusStrip.Text = "statusStrip"; - // - // toolStripStatusLabelConnected - // - this.toolStripStatusLabelConnected.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripStatusLabelConnected.Name = "toolStripStatusLabelConnected"; - this.toolStripStatusLabelConnected.Size = new System.Drawing.Size(497, 17); - this.toolStripStatusLabelConnected.Spring = true; - this.toolStripStatusLabelConnected.Text = "Not connected"; - this.toolStripStatusLabelConnected.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // 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(44, 20); - this.helpToolStripMenuItem.Text = "&Help"; - // - // contentsToolStripMenuItem - // - this.contentsToolStripMenuItem.Name = "contentsToolStripMenuItem"; - this.contentsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.contentsToolStripMenuItem.Text = "&Contents"; - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.aboutToolStripMenuItem.Text = "&About"; - // - // FormMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(512, 306); - this.Controls.Add(this.statusStrip); - this.Controls.Add(this.buttonLearn); - this.Controls.Add(this.groupBoxTestBlast); - this.Controls.Add(this.groupBoxCarrier); - this.Controls.Add(this.buttonAttemptDecode); - this.Controls.Add(this.checkBoxStoreBinary); - this.Controls.Add(this.textBoxPronto); - this.Controls.Add(this.menuStrip); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.menuStrip; - this.MinimumSize = new System.Drawing.Size(520, 332); - this.Name = "FormMain"; - this.Text = "IR File Tool"; - this.menuStrip.ResumeLayout(false); - this.menuStrip.PerformLayout(); - this.groupBoxCarrier.ResumeLayout(false); - this.groupBoxCarrier.PerformLayout(); - this.groupBoxTestBlast.ResumeLayout(false); - this.statusStrip.ResumeLayout(false); - this.statusStrip.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - 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.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem quitToolStripMenuItem; - private System.Windows.Forms.TextBox textBoxPronto; - private System.Windows.Forms.ToolTip toolTips; - private System.Windows.Forms.TextBox textBoxCarrier; - private System.Windows.Forms.Button buttonSetCarrier; - private System.Windows.Forms.CheckBox checkBoxStoreBinary; - private System.Windows.Forms.Button buttonAttemptDecode; - private System.Windows.Forms.OpenFileDialog openFileDialog; - private System.Windows.Forms.SaveFileDialog saveFileDialog; - private System.Windows.Forms.ToolStripMenuItem serverToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem connectToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem disconnectToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem changeServerToolStripMenuItem; - private System.Windows.Forms.GroupBox groupBoxCarrier; - private System.Windows.Forms.GroupBox groupBoxTestBlast; - private System.Windows.Forms.Button buttonBlast; - private System.Windows.Forms.ComboBox comboBoxPort; - private System.Windows.Forms.Button buttonLearn; - private System.Windows.Forms.StatusStrip statusStrip; - private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelConnected; - private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem contentsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; - } -} - Deleted: trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.cs 2009-09-18 01:12:50 UTC (rev 3093) +++ trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.cs 2009-09-18 11:33:05 UTC (rev 3094) @@ -1,779 +0,0 @@ -#region Copyright (C) 2005-2009 Team MediaPortal - -// Copyright (C) 2005-2009 Team MediaPortal -// http://www.team-mediaportal.com -// -// This Program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2, or (at your option) -// any later version. -// -// This Program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with GNU Make; see the file COPYING. If not, write to -// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -// http://www.gnu.org/copyleft/gpl.html - -#endregion - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Text; -using System.Threading; -using System.Windows.Forms; -using System.Xml; -using IrssComms; -using IrssUtils; -using IrssUtils.Forms; - -namespace IrFileTool -{ - /// <summary> - /// IR File Tool Main Form. - /// </summary> - internal partial class FormMain : Form - { - #region Constants - - private static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, - "IR File Tool\\IR File Tool.xml"); - - #endregion Constants - - #region Variables - - private Client _client; - private IrCode _code = new IrCode(); - private string _fileName = String.Empty; - private IRServerInfo _irServerInfo = new IRServerInfo(); - - private bool _registered; - - private string _serverHost = String.Empty; - - #endregion Variables - - #region Constructor - - /// <summary> - /// Initializes a new instance of the <see cref="FormMain"/> class. - /// </summary> - public FormMain() - { - InitializeComponent(); - - SetImages(); - - LoadSettings(); - } - - private void SetImages() - { - this.newToolStripMenuItem.Image = IrssUtils.Properties.Resources.NewDocument; - this.openToolStripMenuItem.Image = IrssUtils.Properties.Resources.OpenDocument; - this.saveToolStripMenuItem.Image = IrssUtils.Properties.Resources.Save; - this.saveasToolStripMenuItem.Image = IrssUtils.Properties.Resources.SaveAs; - this.contentsToolStripMenuItem.Image = IrssUtils.Properties.Resources.Help; - this.aboutToolStripMenuItem.Image = IrssUtils.Properties.Resources.Info; - } - - #endregion Constructor - - private void RefreshForm() - { - if (String.IsNullOrEmpty(_fileName)) - Text = "IR File Tool"; - else - Text = "IR File Tool - " + _fileName; - - textBoxPronto.Text = Encoding.ASCII.GetString(_code.ToByteArray()); - - switch (_code.Carrier) - { - case IrCode.CarrierFrequencyDCMode: - textBoxCarrier.Text = "DC Mode"; - break; - - case IrCode.CarrierFrequencyUnknown: - textBoxCarrier.Text = "Unknown"; - break; - - default: - textBoxCarrier.Text = _code.Carrier.ToString(); - break; - } - } - - private void Save() - { - if (String.IsNullOrEmpty(_fileName)) - if (!GetSaveFileName()) - return; - - if (!checkBoxStoreBinary.Checked) - { - Pronto.WriteProntoFile(_fileName, Pronto.ConvertIrCodeToProntoRaw(_code)); - } - else - { - using (FileStream file = File.OpenWrite(_fileName)) - { - byte[] fileBytes = DataPacket(_code); - - file.Write(fileBytes, 0, fileBytes.Length); - } - } - } - - private bool GetSaveFileName() - { - if (String.IsNullOrEmpty(saveFileDialog.InitialDirectory)) - saveFileDialog.InitialDirectory = Common.FolderIRCommands; - - if (saveFileDialog.ShowDialog(this) != DialogResult.OK) - return false; - - _fileName = saveFileDialog.FileName; - return true; - } - - - private void LoadSettings() - { - try - { - XmlDocument doc = new XmlDocument(); - doc.Load(ConfigurationFile); - - _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; - } - catch (FileNotFoundException) - { - IrssLog.Warn("Configuration file not found, using defaults"); - - CreateDefaultSettings(); - } - catch (Exception ex) - { - IrssLog.Error(ex); - - CreateDefaultSettings(); - } - } - - private void SaveSettings() - { - try - { - using (XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, Encoding.UTF8)) - { - writer.Formatting = Formatting.Indented; - writer.Indentation = 1; - writer.IndentChar = (char) 9; - writer.WriteStartDocument(true); - writer.WriteStartElement("settings"); // <settings> - - writer.WriteAttributeString("ServerHost", _serverHost); - - writer.WriteEndElement(); // </settings> - writer.WriteEndDocument(); - } - } - catch (Exception ex) - { - IrssLog.Error(ex); - } - } - - private void CreateDefaultSettings() - { - _serverHost = "localhost"; - - SaveSettings(); - } - - - private void UpdateWindow(string status) - { - toolStripStatusLabelConnected.Text = status; - - comboBoxPort.Items.Clear(); - comboBoxPort.Items.AddRange(_irServerInfo.Ports); - comboBoxPort.SelectedIndex = 0; - - if (_registered) - { - groupBoxTestBlast.Enabled = _irServerInfo.CanTransmit; - buttonLearn.Enabled = _irServerInfo.CanLearn; - } - else - { - groupBoxTestBlast.Enabled = false; - buttonLearn.Enabled = false; - } - } - - - private void CommsFailure(object obj) - { - Exception ex = obj as Exception; - - if (ex != null) - IrssLog.Error("Communications failure: {0}", ex.Message); - else - IrssLog.Error("Communications failure"); - - StopClient(); - - MessageBox.Show(this, "Please report this error.", "IR File Tool - Communications failure", MessageBoxButtons.OK, - MessageBoxIcon.Error); - } - - private void Connected(object obj) - { - IrssLog.Info("Connected to server"); - - IrssMessage message = new IrssMessage(MessageType.RegisterClient, MessageFlags.Request); - _client.Send(message); - } - - private void Disconnected(object obj) - { - IrssLog.Warn("Communications with server has been lost"); - - Thread.Sleep(1000); - } - - private bool StartClient(IPEndPoint endPoint) - { - if (_client != null) - return false; - - ClientMessageSink sink = ReceivedMessage; - - _client = new Client(endPoint, sink); - _client.CommsFailureCallback = CommsFailure; - _client.ConnectCallback = Connected; - _client.DisconnectCallback = Disconnected; - - if (_client.Start()) - { - return true; - } - else - { - _client = null; - return false; - } - } - - private void StopClient() - { - if (_client == null) - return; - - _client.Dispose(); - _client = null; - } - - private void ReceivedMessage(IrssMessage received) - { - IrssLog.Debug("Received Message \"{0}\"", received.Type); - - try - { - switch (received.Type) - { - case MessageType.RegisterClient: - if ((received.Flags & MessageFlags.Success) == MessageFlags.Success) - { - _irServerInfo = IRServerInfo.FromBytes(received.GetDataAsBytes()); - _registered = true; - - string message = "Connected"; - IrssLog.Info(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure) - { - _registered = false; - - string message = "Failed to connect"; - IrssLog.Warn(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - return; - - case MessageType.BlastIR: - if ((received.Flags & MessageFlags.Success) == MessageFlags.Success) - { - string message = "Blast successful"; - IrssLog.Info(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure) - { - string message = "Failed to blast IR command"; - IrssLog.Error(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - break; - - case MessageType.LearnIR: - if ((received.Flags & MessageFlags.Success) == MessageFlags.Success) - { - byte[] dataBytes = received.GetDataAsBytes(); - - _code = IrCode.FromByteArray(dataBytes); - - _fileName = null; - - string message = "Learned IR Successfully"; - IrssLog.Info(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - - RefreshForm(); - } - else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure) - { - string message = "Failed to learn IR command"; - - IrssLog.Warn(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - else if ((received.Flags & MessageFlags.Timeout) == MessageFlags.Timeout) - { - string message = "Learn IR command timed-out"; - - IrssLog.Warn(message); - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {message}); - } - break; - - case MessageType.ServerShutdown: - _registered = false; - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {"Server shut down"}); - return; - - case MessageType.Error: - IrssLog.Error("Error from server: " + received.GetDataAsString()); - return; - } - } - catch (Exception ex) - { - IrssLog.Error(ex); - MessageBox.Show(this, ex.Message, "IR File Tool Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - - private void newToolStripMenuItem_Click(object sender, EventArgs e) - { - _code = new IrCode(); - _fileName = null; - - RefreshForm(); - } - - private void openToolStripMenuItem_Click(object sender, EventArgs e) - { - if (String.IsNullOrEmpty(openFileDialog.InitialDirectory)) - openFileDialog.InitialDirectory = Common.FolderIRCommands; - - if (openFileDialog.ShowDialog(this) != DialogResult.OK) - return; - - using (FileStream file = File.OpenRead(openFileDialog.FileName)) - { - if (file.Length == 0) - { - MessageBox.Show(this, "The selected file is empty", "Empty file", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - - byte[] fileData = new byte[file.Length]; - file.Read(fileData, 0, (int) file.Length); - - IrCode newCode = IrCode.FromByteArray(fileData); - if (newCode == null) - { - MessageBox.Show(this, "Not a valid IR code file", "Bad file", MessageBoxButtons.OK, MessageBoxIcon.Warning); - return; - } - - _code = newCode; - } - - _fileName = openFileDialog.FileName; - - RefreshForm(); - } - - private void saveToolStripMenuItem_Click(object sender, EventArgs e) - { - Save(); - } - - private void saveasToolStripMenuItem_Click(object sender, EventArgs e) - { - if (GetSaveFileName()) - Save(); - } - - private void quitToolStripMenuItem_Click(object sender, EventArgs e) - { - Close(); - } - - private void buttonAttemptDecode_Click(object sender, EventArgs e) - { - // NOTES: - // All start with a correct RC6 0xFCA93 header. - - /* - int[][] timingData = new int[][] - { - -new int[] { 2800, -750, 550, -350, 500, -400, 500, -800, 550, -800, 1400, -800, 550, -350, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 950, -350, 500, -400, 500, -400, 500, -850, 450, -400, 500, -400, 500, -400, 6550, -850, 450, -400, 500, -400, 500, -850, 500, -800, 1400, -850, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -2800, 350, -400, 500, -400, 450, -450, 900, -25400 }, - -new int[] { 2800, -750, 550, -350, 550, -350, 500, -800, 550, -800, 1400, -800, 550, -350, 550, -350, 500, -400, 500, -350, 550, -350, 500, -400, 500, -400, 500, -350, 550, -350, 500, -3750, 250, -400, 500, -800, 500, -400, 500, -400, 500, -400, 900, -850, 500, -400, 500, -400, 500, -350, 500, -400, 500, -400, 500, -400, 500, -350, 500, -400, 950, -31550 }, - -new int[] { 2700, -850, 500, -400, 450, -400, 500, -850, 500, -850, 1350, -850, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 450, -400, 500, -400, 500, -400, 500, -400, 900, -400, 500, -400, 500, -400, 450, -450, 450, -850, 500, -400, 450, -31750 }, - -new int[] { 2700, -850, 450, -400, 500, -400, 500, -850, 450, -850, 1400, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 1850, -400, 500, -400, 450, -450, 450, -450, 900, -25400 }, - -new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -5350, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 1100, -300, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400, }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -4400, 450, -450, 450, -450, 450, -900, 400, -450, 450, -450, 450, -400, 950, -850, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -31750 }, - -new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 900, -450, 450, -450, 450, -450, 450, -400, 500, -850, 5150, -31750 }, - -new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -950, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -25400 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -3750, 250, -400, 500, -400, 450, -450, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -400, 500, -400, 450, -450, 450, -450, 450, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -450, 450, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -450, 450, -400, 1000, -400, 450, -450, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400 }, - -new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -3550, 450, -450, 450, -450, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -31750 }, - -new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 5300, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -450, 450, -900, 400, -900, 1350, -900, 400, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -12900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -25400 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -2500, 650, -400, 450, -450, 450, -450, 450, -400, 500, -850, 450, -450, 450, -400, 500, -400, 900, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -450, 450, -31750 }, - -new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1350, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 950, -400, 450, -450, 450, -450, 450, -400, 4650, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -11950, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 900, -19050 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 2400, -300, 900, -400, 500, -400, 450, -450, 450, -450, 450, -900, 400, -450, 450, -450, 450, -400, 950, -850, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 4700, -31750 }, - -new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 950, -400, 450, -450, 450, -450, 450, -31750 }, - -new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 5350, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -1300, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -400, 500, -400, 450, -450, 450, -31750 }, - -new int[] { 2700, -850, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 4700, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, - -new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, 3350, 350, -900, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -400, 500, -400, 450, -31750 }, - -new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 10650, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, - -new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 550, -350, 450, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 450, -400, 450, -450, 450, -450, 4700, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -900, 400, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 900, -400, 500, -400, 450, -31750 }, - -new int[] { 2650, -900, 450, -400, 500, -400, 450, -900, 450, -900, 1300, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 10650, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 900, -19050 }, - -new int[] { 2700, -900, 450, -400, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -450, 450, -450, 450, -400, 500, -400, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 450, -450, 450, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 450, -400, 3350, -31750 }, - -new int[] { 2650, -900, 450, -400, 450, -450, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, 2400, 50, -450, 900, -900, 450, -400, 450, -450, 450, -450, 450, -450, 450, -400, 450, -450, 450, -450, 450, -450, 900, -19050 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 450, -400, 500, -400, 450, -450, 450, -900, 450, -400, 450, -450, 450, -450, 900, -900, 400, -450, 450, -450, 4300, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 450, -850, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -450, 3600, -31750 }, - -new int[] { 2700, -850, 450, -450, 450, -400, 500, -850, 450, -900, 1350, -850, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 2300, -200, 450, -400, 900, -900, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -19050 }, - -new int[] { 2650, -900, 450, -400, 450, -450, 450, -900, 450, -900, 1300, -900, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 900, -450, 450, -450, 450, -400, 500, -400, 450, -900, 450, -400, 500, -400, 450, -450, 900, -900, 450, -400, 4650, -31750 }, - -new int[] { 2700, -900, 400, -450, 450, -450, 450, -900, 400, -900, 1350, -900, 450, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 450, -450, 450, -400, 500, -400, 450, -450, 900, -3500, 550, -25400 }, - - }; - - for (int index = 0; index < timingData.GetLength(0); index++) - { - IrDecoder.DecodeIR(timingData[index], new RemoteCallback(RemoteEvent), new KeyboardCallback(KeyboardEvent), new MouseCallback(MouseEvent)); - - //IrCode newCode = new IrCode(timingData[index]); - //Pronto.WriteProntoFile(String.Format("C:\\{0}.ir", index), Pronto.ConvertIrCodeToProntoRaw(newCode)); - } - */ - IrDecoder.DecodeIR(_code.TimingData, RemoteEvent, KeyboardEvent, MouseEvent); - } - - private static byte[] DataPacket(IrCode code) - { - if (code.TimingData.Length == 0) - return null; - - // Construct data bytes into "packet" ... - List<byte> packet = new List<byte>(); - - for (int index = 0; index < code.TimingData.Length; index++) - { - double time = code.TimingData[index]; - - byte duration = (byte) Math.Abs(Math.Round(time / 50)); - bool pulse = (time > 0); - - while (duration > 0x7F) - { - packet.Add((byte) (pulse ? 0xFF : 0x7F)); - - duration -= 0x7F; - } - - packet.Add((byte) (pulse ? 0x80 | duration : duration)); - } - - // Insert byte count markers into packet data bytes ... - int subpackets = (int) Math.Ceiling(packet.Count / (double) 4); - - byte[] output = new byte[packet.Count + subpackets + 1]; - - int outputPos = 0; - - for (int packetPos = 0; packetPos < packet.Count;) - { - byte copyCount = (byte) (packet.Count - packetPos < 4 ? packet.Count - packetPos : 0x04); - - output[outputPos++] = (byte) (0x80 | copyCount); - - for (int index = 0; index < copyCount; index++) - output[outputPos++] = packet[packetPos++]; - } - - output[outputPos] = 0x80; - - return output; - } - - private void RemoteEvent(IrProtocol codeType, uint keyCode, bool firstPress) - { - MessageBox.Show(this, - String.Format("Protocol: {0}\nCode: {1}", Enum.GetName(typeof (IrProtocol), codeType), keyCode), - "Decode IR", MessageBoxButtons.OK, MessageBoxIcon.Information); - - int newCarrier; - switch (codeType) - { - case IrProtocol.Daewoo: - newCarrier = 38000; - break; - case IrProtocol.JVC: - newCarrier = 38000; - break; - case IrProtocol.Matsushita: - newCarrier = 56800; - break; - case IrProtocol.Mitsubishi: - newCarrier = 40000; - break; - case IrProtocol.NEC: - newCarrier = 38000; - break; - case IrProtocol.NRC17: - newCarrier = 38000; - break; - case IrProtocol.Panasonic: - newCarrier = 38000; - break; - case IrProtocol.RC5: - newCarrier = 36000; - break; - case IrProtocol.RC5X: - newCarrier = 36000; - break; - case IrProtocol.RC6: - newCarrier = 36000; - break; - case IrProtocol.RC6A: - newCarrier = 36000; - break; - case IrProtocol.RC6_MCE: - newCarrier = 36000; - break; - case IrProtocol.RC6_16: - newCarrier = 36000; - break; - case IrProtocol.RC6_20: - newCarrier = 36000; - break; - case IrProtocol.RC6_24: - newCarrier = 36000; - break; - case IrProtocol.RC6_32: - newCarrier = 36000; - break; - case IrProtocol.RCA: - newCarrier = 56000; - break; - case IrProtocol.RCMM: - newCarrier = 36000; - break; - case IrProtocol.RECS80: - newCarrier = 38000; - break; - case IrProtocol.Sharp: - newCarrier = 38000; - break; - case IrProtocol.SIRC: - newCarrier = 40000; - break; - case IrProtocol.Toshiba: - newCarrier = 38000; - break; - case IrProtocol.XSAT: - newCarrier = 38000; - break; - - default: - return; - } - - // If the current carrier frequency is within +- 50 hz then it's close enough. - if (_code.Carrier >= newCarrier - 50 && _code.Carrier <= newCarrier + 50) - return; - - if (DialogResult.Yes == - MessageBox.Show(this, String.Format("Use this protocol's carrier frequency ({0})?", newCarrier), "Decode IR", - MessageBoxButtons.YesNo, MessageBoxIcon.Question)) - { - textBoxCarrier.Text = newCarrier.ToString(); - - _code.Carrier = newCarrier; - - RefreshForm(); - } - } - - private void KeyboardEvent(uint keyCode, uint modifiers) - { - MessageBox.Show(this, String.Format("Keyboard: {0}, {1}", keyCode, modifiers), "Decode IR", MessageBoxButtons.OK, - MessageBoxIcon.Information); - } - - private void MouseEvent(int deltaX, int deltaY, bool right, bool left) - { - MessageBox.Show(this, String.Format("Mouse: DX {0}, DY {1}, Right: {2}, Left: {3}", deltaX, deltaY, right, left), - "Decode IR", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void buttonSetCarrier_Click(object sender, EventArgs e) - { - if (textBoxCarrier.Text == "Unknown") - return; - - if (textBoxCarrier.Text == "DC Mode") - _code.Carrier = IrCode.CarrierFrequencyDCMode; - - _code.Carrier = int.Parse(textBoxCarrier.Text); - - RefreshForm(); - } - - - private void connectToolStripMenuItem_Click(object sender, EventArgs e) - { - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {"Connecting ..."}); - - IPAddress serverIP = Client.GetIPFromName(_serverHost); - IPEndPoint endPoint = new IPEndPoint(serverIP, Server.DefaultPort); - - StartClient(endPoint); - } - - private void disconnectToolStripMenuItem_Click(object sender, EventArgs e) - { - if (_registered) - { - IrssMessage message = new IrssMessage(MessageType.UnregisterClient, MessageFlags.Request); - _client.Send(message); - - _registered = false; - } - - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {"Disconnected"}); - - StopClient(); - } - - private void changeServerToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerAddress serverAddress = new ServerAddress(_serverHost); - serverAddress.ShowDialog(this); - - _serverHost = serverAddress.ServerHost; - - SaveSettings(); - } - - - private void buttonBlast_Click(object sender, EventArgs e) - { - if (!_registered) - MessageBox.Show(this, "Not registered to an active IR Server", "Cannot blast", MessageBoxButtons.OK, - MessageBoxIcon.Warning); - - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {"Blasting ..."}); - - string port = comboBoxPort.Text; - byte[] codeBytes = _code.ToByteArray(); - - byte[] outData = new byte[4 + port.Length + codeBytes.Length]; - - BitConverter.GetBytes(port.Length).CopyTo(outData, 0); - Encoding.ASCII.GetBytes(port).CopyTo(outData, 4); - - Array.Copy(codeBytes, 0, outData, 4 + port.Length, codeBytes.Length); - - IrssMessage message = new IrssMessage(MessageType.BlastIR, MessageFlags.Request, outData); - _client.Send(message); - } - - private void buttonLearn_Click(object sender, EventArgs e) - { - if (!_registered) - MessageBox.Show(this, "Not registered to an active IR Server", "Cannot learn", MessageBoxButtons.OK, - MessageBoxIcon.Warning); - - Invoke(new UpdateWindowDel(UpdateWindow), new string[] {"Learning ..."}); - - IrssMessage message = new IrssMessage(MessageType.LearnIR, MessageFlags.Request); - _client.Send(message); - } - - #region Nested type: UpdateWindowDel - - private delegate void UpdateWindowDel(string status); - - #endregion - } -} \ No newline at end of file Deleted: trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.resx =================================================================== --- trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.resx 2009-09-18 01:12:50 UTC (rev 3093) +++ trunk/plugins/IR Server Suite/IR Server Suite/Applications/IR File Tool/FormMain.resx 2009-09-18 11:33:05 UTC (rev 3094) @@ -1,231 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type... [truncated message content] |