HP Dx9000 Resources for Developing Touch-Friendly Applications for HP Business - Page 32

Example 3, XML to Re-task Side Volume Buttons to Control, Display Brightness and Toggle the Display

Page 32 highlights

Example 3 - XML to Re-task Side Volume Buttons to Control Display Brightness and Toggle the Display On/Off Purpose:  Enable side volume up button and re-task it to increase the display brightness. If the button is pressed and held, the auto-repeat interval is 500 miliseconds (simulating a button press every 0.5 seconds while the button is pressed and held)  Enable side volume down button and re-task it to decrease the display brightness. If the button is pressed and held, the auto-repeat interval is 1000 miliseconds (simulating a button press every 1 seconds while the button is pressed and held)  Enable side volume mute button and re-task it to toggle the display on/off. Auto-repeating is disabled. When the side volume down button is pressed and held, it will behave similar to when the button is pressed exactly once. When the side volume mute button is pressed, if the display is on, the display will be turned off. If the display is off, it will be turned on when the volume mute button is pressed. 32

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37

32
<?xml version="1.0" encoding="UTF-8"?>
<HPSystemConfiguration
xmlns="urn:HPSystemConfiguration"
xsi:schemaLocation="urn:HPSystemConfiguration HPSystemConfiguration.xsd"
SchemaVersion="1.0">
<Buttons>
<Button Id="VolumeUpButton" Enabled="true" AutoRepeatEnabled="false"
Action="LaunchExecutable" ActionValue="C:\MyTest.bat param1 /param2 -
param3 &quot;c:\test1\test2\test3.bat&quot; -param5:&quot;param5
value&quot;" />
<Button Id="VolumeMuteButton" Enabled="false" />
<Button Id="VolumeDownButton" Enabled="true"
AutoRepeatEnabled="false" Action="LaunchExecutable"
ActionValue="&quot;C:\Program Files\Internet Explorer\iexplore.exe&quot;
amp;oq=hewlett+packard+com&amp;aqi=g10" />
</Buttons>
</HPSystemConfiguration>
Example 3
XML to Re-task Side Volume Buttons to Control
Display Brightness and Toggle the Display On/Off
Purpose:
Enable side volume up button and re-task it to increase the display brightness.
If the button is pressed and held, the auto-repeat interval is 500 miliseconds
(simulating a button press every 0.5 seconds while the button is pressed and
held)
Enable side volume down button and re-task it to decrease the display
brightness. If the button is pressed and held, the auto-repeat interval is 1000
miliseconds (simulating a button press every 1 seconds while the button is
pressed and held)
Enable side volume mute button and re-task it to toggle the display on/off.
Auto-repeating is disabled. When the side volume down button is pressed and
held, it will behave similar to when the button is pressed exactly once. When
the side volume mute button is pressed, if the display is on, the display will be
turned off. If the display is off, it will be turned on when the volume mute button
is pressed.
<?xml version="1.0" encoding="UTF-8"?>
<HPSystemConfiguration
xmlns="urn:HPSystemConfiguration"
xsi:schemaLocation="urn:HPSystemConfiguration HPSystemConfiguration.xsd"
SchemaVersion="1.0">
<Buttons>
<Button Id="VolumeUpButton" Enabled="true" AutoRepeatEnabled="true"
AutoRepeatInterval="500"
Action="IncreaseDisplayBrightness" />
<Button Id="VolumeDownButton" Enabled="true"
AutoRepeatEnabled="true" AutoRepeatInterval="1000"
Action="DecreaseDisplayBrightness" />
<Button Id="VolumeMuteButton" Enabled="true"
AutoRepeatEnabled="false" Action="ToggleDisplayOnOff" />
</Buttons>
</HPSystemConfiguration>