Renaming Form files.
authorsl
Mon, 22 Dec 2014 11:43:55 +0100
changeset 3783b3361510a7
parent 36 259e823a8e84
child 38 98cd08fa1d6d
Renaming Form files.
Form1.cs
Form1.resx
MainForm.cs
MainForm.resx
RemoteControlSample.csproj
     1.1 --- a/Form1.cs	Mon Dec 22 11:40:23 2014 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,168 +0,0 @@
     1.4 -using System;
     1.5 -using System.Drawing;
     1.6 -using System.Collections;
     1.7 -using System.ComponentModel;
     1.8 -using System.Windows.Forms;
     1.9 -using System.Data;
    1.10 -using Devices.RemoteControl;
    1.11 -
    1.12 -namespace RemoteControlSample
    1.13 -{
    1.14 -	/// <summary>
    1.15 -	/// Summary description for Form1.
    1.16 -	/// </summary>
    1.17 -	public class MainForm : System.Windows.Forms.Form
    1.18 -	{
    1.19 -		/// <summary>
    1.20 -		/// Required designer variable.
    1.21 -		/// </summary>
    1.22 -		private System.ComponentModel.Container components = null;
    1.23 -		private System.Windows.Forms.Label label1;
    1.24 -		private RemoteControlDevice _remote;
    1.25 -		private System.Windows.Forms.Label label2;
    1.26 -		private Timer _timer;
    1.27 -
    1.28 -		public MainForm()
    1.29 -		{
    1.30 -			//
    1.31 -			// Required for Windows Form Designer support
    1.32 -			//
    1.33 -			InitializeComponent();
    1.34 -
    1.35 -			_timer = new Timer();
    1.36 -			_timer.Interval = 3000;
    1.37 -			_timer.Enabled = false;
    1.38 -			_timer.Tick +=new EventHandler(_timer_Tick);            
    1.39 -		}
    1.40 -
    1.41 -		/// <summary>
    1.42 -		/// Clean up any resources being used.
    1.43 -		/// </summary>
    1.44 -		protected override void Dispose( bool disposing )
    1.45 -		{
    1.46 -			if( disposing )
    1.47 -			{
    1.48 -				if (components != null)
    1.49 -				{
    1.50 -					components.Dispose();
    1.51 -				}
    1.52 -			}
    1.53 -			base.Dispose( disposing );
    1.54 -		}
    1.55 -
    1.56 -		#region Windows Form Designer generated code
    1.57 -		/// <summary>
    1.58 -		/// Required method for Designer support - do not modify
    1.59 -		/// the contents of this method with the code editor.
    1.60 -		/// </summary>
    1.61 -		private void InitializeComponent()
    1.62 -		{
    1.63 -			this.label1 = new System.Windows.Forms.Label();
    1.64 -			this.label2 = new System.Windows.Forms.Label();
    1.65 -			this.SuspendLayout();
    1.66 -			//
    1.67 -			// label1
    1.68 -			//
    1.69 -			this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
    1.70 -			this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    1.71 -			this.label1.ForeColor = System.Drawing.Color.White;
    1.72 -			this.label1.Location = new System.Drawing.Point(0, 0);
    1.73 -			this.label1.Name = "label1";
    1.74 -			this.label1.Size = new System.Drawing.Size(736, 266);
    1.75 -			this.label1.TabIndex = 0;
    1.76 -			this.label1.Text = "Ready...";
    1.77 -			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    1.78 -			//
    1.79 -			// label2
    1.80 -			//
    1.81 -			this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    1.82 -			this.label2.Location = new System.Drawing.Point(72, 32);
    1.83 -			this.label2.Name = "label2";
    1.84 -			this.label2.Size = new System.Drawing.Size(576, 23);
    1.85 -			this.label2.TabIndex = 1;
    1.86 -			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    1.87 -			//
    1.88 -			// Form1
    1.89 -			//
    1.90 -			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    1.91 -			this.BackColor = System.Drawing.Color.LightSteelBlue;
    1.92 -			this.ClientSize = new System.Drawing.Size(736, 266);
    1.93 -			this.Controls.Add(this.label2);
    1.94 -			this.Controls.Add(this.label1);
    1.95 -			this.Name = "Form1";
    1.96 -			this.Text = "Remote Control Sample";
    1.97 -			this.Load += new System.EventHandler(this.Form1_Load);
    1.98 -			this.ResumeLayout(false);
    1.99 -
   1.100 -		}
   1.101 -		#endregion Windows Form Designer generated code
   1.102 -
   1.103 -		/// <summary>
   1.104 -		/// The main entry point for the application.
   1.105 -		/// </summary>
   1.106 -		[STAThread]
   1.107 -		static void Main()
   1.108 -		{
   1.109 -			Application.Run(new MainForm());
   1.110 -		}
   1.111 -
   1.112 -		private void Form1_Load(object sender, System.EventArgs e)
   1.113 -		{
   1.114 -            _remote = new RemoteControlDevice(this.Handle);
   1.115 -            _remote.ButtonPressed += new Devices.RemoteControl.RemoteControlDevice.RemoteControlDeviceEventHandler(_remote_ButtonPressed);
   1.116 -		}
   1.117 -
   1.118 -
   1.119 -		protected override void WndProc(ref Message message)
   1.120 -		{
   1.121 -            if (_remote != null)
   1.122 -            {
   1.123 -                _remote.ProcessMessage(message);
   1.124 -            }
   1.125 -			base.WndProc(ref message);
   1.126 -		}
   1.127 -
   1.128 -		private bool _remote_ButtonPressed(object sender, RemoteControlEventArgs e)
   1.129 -		{
   1.130 -            bool processed = false;
   1.131 -			_timer.Enabled = false;
   1.132 -            if (e.Button != RemoteControlButton.Unknown)
   1.133 -            {
   1.134 -                label1.Text = e.Button.ToString();
   1.135 -                processed = true;
   1.136 -            }
   1.137 -            else if (e.MceButton != Hid.UsageTables.WindowsMediaCenterRemoteControl.Null)
   1.138 -            {
   1.139 -                //Display MCE button name
   1.140 -                label1.Text = e.MceButton.ToString();
   1.141 -                //Check if this is an HP extension
   1.142 -                if (Enum.IsDefined(typeof(Hid.UsageTables.HpWindowsMediaCenterRemoteControl), (ushort)e.MceButton))
   1.143 -                {
   1.144 -                    //Also display HP button name
   1.145 -                    label1.Text += " / HP:" + ((Hid.UsageTables.HpWindowsMediaCenterRemoteControl)e.MceButton).ToString();
   1.146 -                }
   1.147 -
   1.148 -                processed = true;
   1.149 -            }
   1.150 -            else if (e.ConsumerControl != Hid.UsageTables.ConsumerControl.Null)
   1.151 -            {
   1.152 -                //Display consumer control name
   1.153 -                label1.Text = e.ConsumerControl.ToString();
   1.154 -                processed = true;
   1.155 -            }
   1.156 -            else
   1.157 -            {
   1.158 -                label1.Text = "Unknown";
   1.159 -            }
   1.160 -			label2.Text = e.Device.ToString();
   1.161 -			_timer.Enabled = true;
   1.162 -            return processed;
   1.163 -		}
   1.164 -
   1.165 -		private void _timer_Tick(object sender, EventArgs e)
   1.166 -		{
   1.167 -			_timer.Enabled = false;
   1.168 -			label1.Text = "Ready...";
   1.169 -		}
   1.170 -	}
   1.171 -}
     2.1 --- a/Form1.resx	Mon Dec 22 11:40:23 2014 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,148 +0,0 @@
     2.4 -<?xml version="1.0" encoding="utf-8"?>
     2.5 -<root>
     2.6 -  <!-- 
     2.7 -    Microsoft ResX Schema 
     2.8 -    
     2.9 -    Version 1.3
    2.10 -    
    2.11 -    The primary goals of this format is to allow a simple XML format 
    2.12 -    that is mostly human readable. The generation and parsing of the 
    2.13 -    various data types are done through the TypeConverter classes 
    2.14 -    associated with the data types.
    2.15 -    
    2.16 -    Example:
    2.17 -    
    2.18 -    ... ado.net/XML headers & schema ...
    2.19 -    <resheader name="resmimetype">text/microsoft-resx</resheader>
    2.20 -    <resheader name="version">1.3</resheader>
    2.21 -    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    2.22 -    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    2.23 -    <data name="Name1">this is my long string</data>
    2.24 -    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    2.25 -    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    2.26 -        [base64 mime encoded serialized .NET Framework object]
    2.27 -    </data>
    2.28 -    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    2.29 -        [base64 mime encoded string representing a byte array form of the .NET Framework object]
    2.30 -    </data>
    2.31 -                
    2.32 -    There are any number of "resheader" rows that contain simple 
    2.33 -    name/value pairs.
    2.34 -    
    2.35 -    Each data row contains a name, and value. The row also contains a 
    2.36 -    type or mimetype. Type corresponds to a .NET class that support 
    2.37 -    text/value conversion through the TypeConverter architecture. 
    2.38 -    Classes that don't support this are serialized and stored with the 
    2.39 -    mimetype set.
    2.40 -    
    2.41 -    The mimetype is used forserialized objects, and tells the 
    2.42 -    ResXResourceReader how to depersist the object. This is currently not 
    2.43 -    extensible. For a given mimetype the value must be set accordingly:
    2.44 -    
    2.45 -    Note - application/x-microsoft.net.object.binary.base64 is the format 
    2.46 -    that the ResXResourceWriter will generate, however the reader can 
    2.47 -    read any of the formats listed below.
    2.48 -    
    2.49 -    mimetype: application/x-microsoft.net.object.binary.base64
    2.50 -    value   : The object must be serialized with 
    2.51 -            : System.Serialization.Formatters.Binary.BinaryFormatter
    2.52 -            : and then encoded with base64 encoding.
    2.53 -    
    2.54 -    mimetype: application/x-microsoft.net.object.soap.base64
    2.55 -    value   : The object must be serialized with 
    2.56 -            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    2.57 -            : and then encoded with base64 encoding.
    2.58 -
    2.59 -    mimetype: application/x-microsoft.net.object.bytearray.base64
    2.60 -    value   : The object must be serialized into a byte array 
    2.61 -            : using a System.ComponentModel.TypeConverter
    2.62 -            : and then encoded with base64 encoding.
    2.63 -    -->
    2.64 -  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    2.65 -    <xsd:element name="root" msdata:IsDataSet="true">
    2.66 -      <xsd:complexType>
    2.67 -        <xsd:choice maxOccurs="unbounded">
    2.68 -          <xsd:element name="data">
    2.69 -            <xsd:complexType>
    2.70 -              <xsd:sequence>
    2.71 -                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    2.72 -                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    2.73 -              </xsd:sequence>
    2.74 -              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
    2.75 -              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    2.76 -              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    2.77 -            </xsd:complexType>
    2.78 -          </xsd:element>
    2.79 -          <xsd:element name="resheader">
    2.80 -            <xsd:complexType>
    2.81 -              <xsd:sequence>
    2.82 -                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    2.83 -              </xsd:sequence>
    2.84 -              <xsd:attribute name="name" type="xsd:string" use="required" />
    2.85 -            </xsd:complexType>
    2.86 -          </xsd:element>
    2.87 -        </xsd:choice>
    2.88 -      </xsd:complexType>
    2.89 -    </xsd:element>
    2.90 -  </xsd:schema>
    2.91 -  <resheader name="resmimetype">
    2.92 -    <value>text/microsoft-resx</value>
    2.93 -  </resheader>
    2.94 -  <resheader name="version">
    2.95 -    <value>1.3</value>
    2.96 -  </resheader>
    2.97 -  <resheader name="reader">
    2.98 -    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    2.99 -  </resheader>
   2.100 -  <resheader name="writer">
   2.101 -    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   2.102 -  </resheader>
   2.103 -  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.104 -    <value>False</value>
   2.105 -  </data>
   2.106 -  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.107 -    <value>Private</value>
   2.108 -  </data>
   2.109 -  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.110 -    <value>Private</value>
   2.111 -  </data>
   2.112 -  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.113 -    <value>False</value>
   2.114 -  </data>
   2.115 -  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.116 -    <value>Private</value>
   2.117 -  </data>
   2.118 -  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.119 -    <value>Private</value>
   2.120 -  </data>
   2.121 -  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.122 -    <value>False</value>
   2.123 -  </data>
   2.124 -  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.125 -    <value>(Default)</value>
   2.126 -  </data>
   2.127 -  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.128 -    <value>False</value>
   2.129 -  </data>
   2.130 -  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.131 -    <value>False</value>
   2.132 -  </data>
   2.133 -  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   2.134 -    <value>8, 8</value>
   2.135 -  </data>
   2.136 -  <data name="$this.Name">
   2.137 -    <value>Form1</value>
   2.138 -  </data>
   2.139 -  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.140 -    <value>True</value>
   2.141 -  </data>
   2.142 -  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.143 -    <value>80</value>
   2.144 -  </data>
   2.145 -  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.146 -    <value>True</value>
   2.147 -  </data>
   2.148 -  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   2.149 -    <value>Private</value>
   2.150 -  </data>
   2.151 -</root>
   2.152 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/MainForm.cs	Mon Dec 22 11:43:55 2014 +0100
     3.3 @@ -0,0 +1,168 @@
     3.4 +using System;
     3.5 +using System.Drawing;
     3.6 +using System.Collections;
     3.7 +using System.ComponentModel;
     3.8 +using System.Windows.Forms;
     3.9 +using System.Data;
    3.10 +using Devices.RemoteControl;
    3.11 +
    3.12 +namespace RemoteControlSample
    3.13 +{
    3.14 +	/// <summary>
    3.15 +	/// Summary description for Form1.
    3.16 +	/// </summary>
    3.17 +	public class MainForm : System.Windows.Forms.Form
    3.18 +	{
    3.19 +		/// <summary>
    3.20 +		/// Required designer variable.
    3.21 +		/// </summary>
    3.22 +		private System.ComponentModel.Container components = null;
    3.23 +		private System.Windows.Forms.Label label1;
    3.24 +		private RemoteControlDevice _remote;
    3.25 +		private System.Windows.Forms.Label label2;
    3.26 +		private Timer _timer;
    3.27 +
    3.28 +		public MainForm()
    3.29 +		{
    3.30 +			//
    3.31 +			// Required for Windows Form Designer support
    3.32 +			//
    3.33 +			InitializeComponent();
    3.34 +
    3.35 +			_timer = new Timer();
    3.36 +			_timer.Interval = 3000;
    3.37 +			_timer.Enabled = false;
    3.38 +			_timer.Tick +=new EventHandler(_timer_Tick);            
    3.39 +		}
    3.40 +
    3.41 +		/// <summary>
    3.42 +		/// Clean up any resources being used.
    3.43 +		/// </summary>
    3.44 +		protected override void Dispose( bool disposing )
    3.45 +		{
    3.46 +			if( disposing )
    3.47 +			{
    3.48 +				if (components != null)
    3.49 +				{
    3.50 +					components.Dispose();
    3.51 +				}
    3.52 +			}
    3.53 +			base.Dispose( disposing );
    3.54 +		}
    3.55 +
    3.56 +		#region Windows Form Designer generated code
    3.57 +		/// <summary>
    3.58 +		/// Required method for Designer support - do not modify
    3.59 +		/// the contents of this method with the code editor.
    3.60 +		/// </summary>
    3.61 +		private void InitializeComponent()
    3.62 +		{
    3.63 +			this.label1 = new System.Windows.Forms.Label();
    3.64 +			this.label2 = new System.Windows.Forms.Label();
    3.65 +			this.SuspendLayout();
    3.66 +			//
    3.67 +			// label1
    3.68 +			//
    3.69 +			this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
    3.70 +			this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    3.71 +			this.label1.ForeColor = System.Drawing.Color.White;
    3.72 +			this.label1.Location = new System.Drawing.Point(0, 0);
    3.73 +			this.label1.Name = "label1";
    3.74 +			this.label1.Size = new System.Drawing.Size(736, 266);
    3.75 +			this.label1.TabIndex = 0;
    3.76 +			this.label1.Text = "Ready...";
    3.77 +			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    3.78 +			//
    3.79 +			// label2
    3.80 +			//
    3.81 +			this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
    3.82 +			this.label2.Location = new System.Drawing.Point(72, 32);
    3.83 +			this.label2.Name = "label2";
    3.84 +			this.label2.Size = new System.Drawing.Size(576, 23);
    3.85 +			this.label2.TabIndex = 1;
    3.86 +			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
    3.87 +			//
    3.88 +			// Form1
    3.89 +			//
    3.90 +			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    3.91 +			this.BackColor = System.Drawing.Color.LightSteelBlue;
    3.92 +			this.ClientSize = new System.Drawing.Size(736, 266);
    3.93 +			this.Controls.Add(this.label2);
    3.94 +			this.Controls.Add(this.label1);
    3.95 +			this.Name = "Form1";
    3.96 +			this.Text = "Remote Control Sample";
    3.97 +			this.Load += new System.EventHandler(this.Form1_Load);
    3.98 +			this.ResumeLayout(false);
    3.99 +
   3.100 +		}
   3.101 +		#endregion Windows Form Designer generated code
   3.102 +
   3.103 +		/// <summary>
   3.104 +		/// The main entry point for the application.
   3.105 +		/// </summary>
   3.106 +		[STAThread]
   3.107 +		static void Main()
   3.108 +		{
   3.109 +			Application.Run(new MainForm());
   3.110 +		}
   3.111 +
   3.112 +		private void Form1_Load(object sender, System.EventArgs e)
   3.113 +		{
   3.114 +            _remote = new RemoteControlDevice(this.Handle);
   3.115 +            _remote.ButtonPressed += new Devices.RemoteControl.RemoteControlDevice.RemoteControlDeviceEventHandler(_remote_ButtonPressed);
   3.116 +		}
   3.117 +
   3.118 +
   3.119 +		protected override void WndProc(ref Message message)
   3.120 +		{
   3.121 +            if (_remote != null)
   3.122 +            {
   3.123 +                _remote.ProcessMessage(message);
   3.124 +            }
   3.125 +			base.WndProc(ref message);
   3.126 +		}
   3.127 +
   3.128 +		private bool _remote_ButtonPressed(object sender, RemoteControlEventArgs e)
   3.129 +		{
   3.130 +            bool processed = false;
   3.131 +			_timer.Enabled = false;
   3.132 +            if (e.Button != RemoteControlButton.Unknown)
   3.133 +            {
   3.134 +                label1.Text = e.Button.ToString();
   3.135 +                processed = true;
   3.136 +            }
   3.137 +            else if (e.MceButton != Hid.UsageTables.WindowsMediaCenterRemoteControl.Null)
   3.138 +            {
   3.139 +                //Display MCE button name
   3.140 +                label1.Text = e.MceButton.ToString();
   3.141 +                //Check if this is an HP extension
   3.142 +                if (Enum.IsDefined(typeof(Hid.UsageTables.HpWindowsMediaCenterRemoteControl), (ushort)e.MceButton))
   3.143 +                {
   3.144 +                    //Also display HP button name
   3.145 +                    label1.Text += " / HP:" + ((Hid.UsageTables.HpWindowsMediaCenterRemoteControl)e.MceButton).ToString();
   3.146 +                }
   3.147 +
   3.148 +                processed = true;
   3.149 +            }
   3.150 +            else if (e.ConsumerControl != Hid.UsageTables.ConsumerControl.Null)
   3.151 +            {
   3.152 +                //Display consumer control name
   3.153 +                label1.Text = e.ConsumerControl.ToString();
   3.154 +                processed = true;
   3.155 +            }
   3.156 +            else
   3.157 +            {
   3.158 +                label1.Text = "Unknown";
   3.159 +            }
   3.160 +			label2.Text = e.Device.ToString();
   3.161 +			_timer.Enabled = true;
   3.162 +            return processed;
   3.163 +		}
   3.164 +
   3.165 +		private void _timer_Tick(object sender, EventArgs e)
   3.166 +		{
   3.167 +			_timer.Enabled = false;
   3.168 +			label1.Text = "Ready...";
   3.169 +		}
   3.170 +	}
   3.171 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/MainForm.resx	Mon Dec 22 11:43:55 2014 +0100
     4.3 @@ -0,0 +1,148 @@
     4.4 +<?xml version="1.0" encoding="utf-8"?>
     4.5 +<root>
     4.6 +  <!-- 
     4.7 +    Microsoft ResX Schema 
     4.8 +    
     4.9 +    Version 1.3
    4.10 +    
    4.11 +    The primary goals of this format is to allow a simple XML format 
    4.12 +    that is mostly human readable. The generation and parsing of the 
    4.13 +    various data types are done through the TypeConverter classes 
    4.14 +    associated with the data types.
    4.15 +    
    4.16 +    Example:
    4.17 +    
    4.18 +    ... ado.net/XML headers & schema ...
    4.19 +    <resheader name="resmimetype">text/microsoft-resx</resheader>
    4.20 +    <resheader name="version">1.3</resheader>
    4.21 +    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    4.22 +    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    4.23 +    <data name="Name1">this is my long string</data>
    4.24 +    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    4.25 +    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
    4.26 +        [base64 mime encoded serialized .NET Framework object]
    4.27 +    </data>
    4.28 +    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    4.29 +        [base64 mime encoded string representing a byte array form of the .NET Framework object]
    4.30 +    </data>
    4.31 +                
    4.32 +    There are any number of "resheader" rows that contain simple 
    4.33 +    name/value pairs.
    4.34 +    
    4.35 +    Each data row contains a name, and value. The row also contains a 
    4.36 +    type or mimetype. Type corresponds to a .NET class that support 
    4.37 +    text/value conversion through the TypeConverter architecture. 
    4.38 +    Classes that don't support this are serialized and stored with the 
    4.39 +    mimetype set.
    4.40 +    
    4.41 +    The mimetype is used forserialized objects, and tells the 
    4.42 +    ResXResourceReader how to depersist the object. This is currently not 
    4.43 +    extensible. For a given mimetype the value must be set accordingly:
    4.44 +    
    4.45 +    Note - application/x-microsoft.net.object.binary.base64 is the format 
    4.46 +    that the ResXResourceWriter will generate, however the reader can 
    4.47 +    read any of the formats listed below.
    4.48 +    
    4.49 +    mimetype: application/x-microsoft.net.object.binary.base64
    4.50 +    value   : The object must be serialized with 
    4.51 +            : System.Serialization.Formatters.Binary.BinaryFormatter
    4.52 +            : and then encoded with base64 encoding.
    4.53 +    
    4.54 +    mimetype: application/x-microsoft.net.object.soap.base64
    4.55 +    value   : The object must be serialized with 
    4.56 +            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
    4.57 +            : and then encoded with base64 encoding.
    4.58 +
    4.59 +    mimetype: application/x-microsoft.net.object.bytearray.base64
    4.60 +    value   : The object must be serialized into a byte array 
    4.61 +            : using a System.ComponentModel.TypeConverter
    4.62 +            : and then encoded with base64 encoding.
    4.63 +    -->
    4.64 +  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    4.65 +    <xsd:element name="root" msdata:IsDataSet="true">
    4.66 +      <xsd:complexType>
    4.67 +        <xsd:choice maxOccurs="unbounded">
    4.68 +          <xsd:element name="data">
    4.69 +            <xsd:complexType>
    4.70 +              <xsd:sequence>
    4.71 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    4.72 +                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    4.73 +              </xsd:sequence>
    4.74 +              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
    4.75 +              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
    4.76 +              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
    4.77 +            </xsd:complexType>
    4.78 +          </xsd:element>
    4.79 +          <xsd:element name="resheader">
    4.80 +            <xsd:complexType>
    4.81 +              <xsd:sequence>
    4.82 +                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    4.83 +              </xsd:sequence>
    4.84 +              <xsd:attribute name="name" type="xsd:string" use="required" />
    4.85 +            </xsd:complexType>
    4.86 +          </xsd:element>
    4.87 +        </xsd:choice>
    4.88 +      </xsd:complexType>
    4.89 +    </xsd:element>
    4.90 +  </xsd:schema>
    4.91 +  <resheader name="resmimetype">
    4.92 +    <value>text/microsoft-resx</value>
    4.93 +  </resheader>
    4.94 +  <resheader name="version">
    4.95 +    <value>1.3</value>
    4.96 +  </resheader>
    4.97 +  <resheader name="reader">
    4.98 +    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    4.99 +  </resheader>
   4.100 +  <resheader name="writer">
   4.101 +    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   4.102 +  </resheader>
   4.103 +  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.104 +    <value>False</value>
   4.105 +  </data>
   4.106 +  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.107 +    <value>Private</value>
   4.108 +  </data>
   4.109 +  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.110 +    <value>Private</value>
   4.111 +  </data>
   4.112 +  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.113 +    <value>False</value>
   4.114 +  </data>
   4.115 +  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.116 +    <value>Private</value>
   4.117 +  </data>
   4.118 +  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.119 +    <value>Private</value>
   4.120 +  </data>
   4.121 +  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.122 +    <value>False</value>
   4.123 +  </data>
   4.124 +  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.125 +    <value>(Default)</value>
   4.126 +  </data>
   4.127 +  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.128 +    <value>False</value>
   4.129 +  </data>
   4.130 +  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.131 +    <value>False</value>
   4.132 +  </data>
   4.133 +  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
   4.134 +    <value>8, 8</value>
   4.135 +  </data>
   4.136 +  <data name="$this.Name">
   4.137 +    <value>Form1</value>
   4.138 +  </data>
   4.139 +  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.140 +    <value>True</value>
   4.141 +  </data>
   4.142 +  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.143 +    <value>80</value>
   4.144 +  </data>
   4.145 +  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.146 +    <value>True</value>
   4.147 +  </data>
   4.148 +  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   4.149 +    <value>Private</value>
   4.150 +  </data>
   4.151 +</root>
   4.152 \ No newline at end of file
     5.1 --- a/RemoteControlSample.csproj	Mon Dec 22 11:40:23 2014 +0100
     5.2 +++ b/RemoteControlSample.csproj	Mon Dec 22 11:43:55 2014 +0100
     5.3 @@ -124,13 +124,13 @@
     5.4      <Compile Include="AssemblyInfo.cs">
     5.5        <SubType>Code</SubType>
     5.6      </Compile>
     5.7 -    <Compile Include="Form1.cs">
     5.8 -      <SubType>Form</SubType>
     5.9 -    </Compile>
    5.10      <Compile Include="HidDevice.cs" />
    5.11      <Compile Include="HidEvent.cs" />
    5.12      <Compile Include="HidHandler.cs" />
    5.13      <Compile Include="HidUsageTables.cs" />
    5.14 +    <Compile Include="MainForm.cs">
    5.15 +      <SubType>Form</SubType>
    5.16 +    </Compile>
    5.17      <Compile Include="RawInput.cs" />
    5.18      <Compile Include="RemoteControlDevice.cs">
    5.19        <SubType>Code</SubType>
    5.20 @@ -139,9 +139,6 @@
    5.21      <Compile Include="Win32Hid.cs" />
    5.22      <Compile Include="Win32RawInput.cs" />
    5.23      <Content Include="App.ico" />
    5.24 -    <EmbeddedResource Include="Form1.resx">
    5.25 -      <DependentUpon>Form1.cs</DependentUpon>
    5.26 -    </EmbeddedResource>
    5.27    </ItemGroup>
    5.28    <ItemGroup>
    5.29      <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
    5.30 @@ -155,6 +152,11 @@
    5.31        <Install>true</Install>
    5.32      </BootstrapperPackage>
    5.33    </ItemGroup>
    5.34 +  <ItemGroup>
    5.35 +    <EmbeddedResource Include="MainForm.resx">
    5.36 +      <DependentUpon>MainForm.cs</DependentUpon>
    5.37 +    </EmbeddedResource>
    5.38 +  </ItemGroup>
    5.39    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    5.40    <PropertyGroup>
    5.41      <PreBuildEvent />