Adding status bar to show the device that just sent an event.
authorStephaneLenclud
Sun, 15 Feb 2015 23:16:57 +0100
changeset 67bda062e75e47
parent 66 3461ee6800e3
child 68 bbe61b1021bb
Adding status bar to show the device that just sent an event.
MainForm.Designer.cs
MainForm.cs
MainForm.resx
     1.1 --- a/MainForm.Designer.cs	Sun Feb 15 23:06:54 2015 +0100
     1.2 +++ b/MainForm.Designer.cs	Sun Feb 15 23:16:57 2015 +0100
     1.3 @@ -29,9 +29,12 @@
     1.4              this.treeViewDevices = new System.Windows.Forms.TreeView();
     1.5              this.buttonTreeViewCollapseAll = new System.Windows.Forms.Button();
     1.6              this.buttonTreeViewExpandAll = new System.Windows.Forms.Button();
     1.7 +            this.statusStrip = new System.Windows.Forms.StatusStrip();
     1.8 +            this.toolStripStatusLabelDevice = new System.Windows.Forms.ToolStripStatusLabel();
     1.9              this.tabControl.SuspendLayout();
    1.10              this.tabPageMessages.SuspendLayout();
    1.11              this.tabPageDevices.SuspendLayout();
    1.12 +            this.statusStrip.SuspendLayout();
    1.13              this.SuspendLayout();
    1.14              // 
    1.15              // labelButtonName
    1.16 @@ -66,12 +69,14 @@
    1.17              // 
    1.18              // tabControl
    1.19              // 
    1.20 +            this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    1.21 +            | System.Windows.Forms.AnchorStyles.Left)));
    1.22              this.tabControl.Controls.Add(this.tabPageMessages);
    1.23              this.tabControl.Controls.Add(this.tabPageDevices);
    1.24              this.tabControl.Location = new System.Drawing.Point(12, 12);
    1.25              this.tabControl.Name = "tabControl";
    1.26              this.tabControl.SelectedIndex = 0;
    1.27 -            this.tabControl.Size = new System.Drawing.Size(902, 514);
    1.28 +            this.tabControl.Size = new System.Drawing.Size(902, 532);
    1.29              this.tabControl.TabIndex = 4;
    1.30              // 
    1.31              // tabPageMessages
    1.32 @@ -147,7 +152,7 @@
    1.33              this.tabPageDevices.Location = new System.Drawing.Point(4, 22);
    1.34              this.tabPageDevices.Name = "tabPageDevices";
    1.35              this.tabPageDevices.Padding = new System.Windows.Forms.Padding(3);
    1.36 -            this.tabPageDevices.Size = new System.Drawing.Size(894, 488);
    1.37 +            this.tabPageDevices.Size = new System.Drawing.Size(894, 506);
    1.38              this.tabPageDevices.TabIndex = 1;
    1.39              this.tabPageDevices.Text = "Devices";
    1.40              this.tabPageDevices.UseVisualStyleBackColor = true;
    1.41 @@ -158,7 +163,7 @@
    1.42              | System.Windows.Forms.AnchorStyles.Left)));
    1.43              this.treeViewDevices.Location = new System.Drawing.Point(8, 6);
    1.44              this.treeViewDevices.Name = "treeViewDevices";
    1.45 -            this.treeViewDevices.Size = new System.Drawing.Size(713, 474);
    1.46 +            this.treeViewDevices.Size = new System.Drawing.Size(713, 492);
    1.47              this.treeViewDevices.TabIndex = 0;
    1.48              // 
    1.49              // buttonTreeViewCollapseAll
    1.50 @@ -181,11 +186,28 @@
    1.51              this.buttonTreeViewExpandAll.UseVisualStyleBackColor = true;
    1.52              this.buttonTreeViewExpandAll.Click += new System.EventHandler(this.buttonTreeViewExpandAll_Click);
    1.53              // 
    1.54 +            // statusStrip
    1.55 +            // 
    1.56 +            this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
    1.57 +            this.toolStripStatusLabelDevice});
    1.58 +            this.statusStrip.Location = new System.Drawing.Point(0, 547);
    1.59 +            this.statusStrip.Name = "statusStrip";
    1.60 +            this.statusStrip.Size = new System.Drawing.Size(935, 22);
    1.61 +            this.statusStrip.TabIndex = 5;
    1.62 +            this.statusStrip.Text = "statusStrip1";
    1.63 +            // 
    1.64 +            // toolStripStatusLabelDevice
    1.65 +            // 
    1.66 +            this.toolStripStatusLabelDevice.Name = "toolStripStatusLabelDevice";
    1.67 +            this.toolStripStatusLabelDevice.Size = new System.Drawing.Size(61, 17);
    1.68 +            this.toolStripStatusLabelDevice.Text = "No Device";
    1.69 +            // 
    1.70              // MainForm
    1.71              // 
    1.72              this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    1.73              this.BackColor = System.Drawing.SystemColors.Control;
    1.74 -            this.ClientSize = new System.Drawing.Size(926, 538);
    1.75 +            this.ClientSize = new System.Drawing.Size(935, 569);
    1.76 +            this.Controls.Add(this.statusStrip);
    1.77              this.Controls.Add(this.tabControl);
    1.78              this.Name = "MainForm";
    1.79              this.Text = "Remote Control Sample";
    1.80 @@ -194,13 +216,18 @@
    1.81              this.tabPageMessages.ResumeLayout(false);
    1.82              this.tabPageMessages.PerformLayout();
    1.83              this.tabPageDevices.ResumeLayout(false);
    1.84 +            this.statusStrip.ResumeLayout(false);
    1.85 +            this.statusStrip.PerformLayout();
    1.86              this.ResumeLayout(false);
    1.87 +            this.PerformLayout();
    1.88  
    1.89          }
    1.90          #endregion Windows Form Designer generated code
    1.91  
    1.92          private System.Windows.Forms.Button buttonTreeViewExpandAll;
    1.93          private System.Windows.Forms.Button buttonTreeViewCollapseAll;
    1.94 +        private System.Windows.Forms.StatusStrip statusStrip;
    1.95 +        private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelDevice;
    1.96  
    1.97      }
    1.98  }
     2.1 --- a/MainForm.cs	Sun Feb 15 23:06:54 2015 +0100
     2.2 +++ b/MainForm.cs	Sun Feb 15 23:16:57 2015 +0100
     2.3 @@ -104,6 +104,7 @@
     2.4              {
     2.5                  //We are in the proper thread
     2.6                  listViewEvents.Items.Insert(0, aHidEvent.ToListViewItem());
     2.7 +                toolStripStatusLabelDevice.Text = aHidEvent.Device.FriendlyName;
     2.8              }
     2.9          }
    2.10  
     3.1 --- a/MainForm.resx	Sun Feb 15 23:06:54 2015 +0100
     3.2 +++ b/MainForm.resx	Sun Feb 15 23:16:57 2015 +0100
     3.3 @@ -117,4 +117,7 @@
     3.4    <resheader name="writer">
     3.5      <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
     3.6    </resheader>
     3.7 +  <metadata name="statusStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     3.8 +    <value>17, 17</value>
     3.9 +  </metadata>
    3.10  </root>
    3.11 \ No newline at end of file