Discussion on the technology of symbol mc1000 ----- the code of the display. Reg light-on under Platform
**************************************** **************************************** *********************
; *** This file is provided to configure the defaults for contrast and backlight settings .***
; *** The template settings provided below shocould be uncommented to set the desired registry value .***
; *** The termconfig driver will not overwrite any registry keys uncommented from this file .***
; **************************************** **************************************** *********************
; [HKEY_LOCAL_MACHINE/hardware/devicemap/contrast]
; "Contrastlevels" = DWORD: 00000010
; "Contrastmin" = DWORD: 00000009
; "Contrastmax" = DWORD: 00000018
; "Contrast" = DWORD: 00000007
[HKEY_LOCAL_MACHINE/Drivers/builtin/backlight]
"Initialstate" = DWORD: 1
[HKEY_CURRENT_USER/controlpanel/backlight]
"Batterytimeout" = DWORD: 00000000
[HKEY_CURRENT_USER/controlpanel/backlight]
"Backlightontap" = DWORD: 00000001
Technical Discussion on symbol mc1000 ----- startup. Reg Automatic Installation code under apllication
;--------------------------------------------------------------------
; Filename: musestart. Reg
;
; Copyright (c) 2007 wood. All rights reserved.
;
; Description: registry setting used by wood Managed class libraries
;
; Notes none
;
; Coder: yanghang
;
;
;--------------------------------------------------------------------
; For symbol DOTNET SDK
[HKEY_CURRENT_USER/software/symbol/startup/programs/prog10]
"Name" = "/Windows/wceload.exe"
"Command" = "/noaskdest/application/ARM/DOT. Cab"
"Continue" = DWORD: 0
"Coldbootonly" = DWORD: 1
For Windows CE. Net devices
[HKEY_CURRENT_USER/software/symbol/startup/programs/prog11]
"Name" = "/Windows/wceload.exe"
"Command" = "/noaskdest/application/ARM/symbol. Cab"
"Continue" = DWORD: 0
"Coldbootonly" = DWORD: 1
; For DOTNET sqlce20
[HKEY_CURRENT_USER/software/symbol/startup/programs/prog15]
"Name" = "/Windows/wceload.exe"
"Command" = "/noaskdest/application/ARM/sqlce1_cab"
"Continue" = DWORD: 0
"Coldbootonly" = DWORD: 1
[HKEY_LOCAL_MACHINE/Drivers/builtin/termconfig/devices/touch]
;
; Indicates which configure type, from 0-max_config_type
;
"Configtype" = DWORD: 7
;
; Configdata value-translates DWORD data (in Hex) to meaningful string name
;
"0" = "notouch"
"1" = "preproduction"
"2" = "production"
[HKEY_LOCAL_MACHINE/Drivers/builtin/termconfig/devices/touch/startup]
"Regsection" = DWORD: 80000001; hkcu
"Regpath" = "software // symbol // startup"
"Regoverride" = DWORD: 1
[HKEY_CURRENT_USER/software/symbol/startup]
"Path" = "// application // startup"
"Nosetup" = DWORD: 1
"Forcecalibrate" = DWORD: 1
"Allowuserescape" = DWORD: 1
[HKEY_CURRENT_USER/software/symbol/startup/deployments/notouch]
"Forcecalibrate" = DWORD: 0
"Skipcalibrate" = DWORD: 1
Development of the setting event for the symbol mc1000 shortcut key
Switch (E. keycode)
{
//////////////////////////////////////// //////////////////////////////////////// /// Data
Case keys. F1: // clear data
If (file. exists ("storage card/CG. SDF "))
{
MC. gconn. Close ();
MC. gconn. Dispose ();
File. Delete ("storage card/CG. SDF ");
}
MessageBox. Show ("all data is cleared successfully. Please restart this program! ");
This. Close ();
Break;
Case keys. F2: // import data
Changetexttodb ();
This. recnum. Text = "0 ";
This. lbgczs. Text = mc. inallgc ();
This. lbgczs. Refresh ();
This. lbgczzs. Text = mc. inallgczs ();
This. lbgczzs. Refresh ();
Break;
Case keys. F3: // export data
Changedbtotext ();
This. recnum. Text = "0 ";
Break;
Case keys. F4: // clear the pre-Database
Sqlcecommand delydk = mc. gconn. createcommand ();
Delydk. commandtext = "delete from ydk ";
Delydk. executenonquery ();
This. lbydzs. Text = mc. inallyd ();
This. lbgczzs. Text = mc. inallydzs ();
This. lbgczzs. Refresh ();
This. lbydzs. Refresh ();
MessageBox. Show ("the pre-database has been cleared successfully ");
Break;
//////////////////////////////////////// //////////////////////////////////////// /// Data
Case keys. Right:
This. caigou. Visible = true;
This. shushangshezhi. Visible = false;
This. Tongji. Visible = false;
Break;
Case keys. down:
This. shushang. Focus ();
This. caigou. Visible = false;
This. shushangshezhi. Visible = true;
This. Tongji. Visible = false;
Break;
Case keys. Up:
// This. lbgczs. Text = mc. inallgc ();
This. lbydzs. Text = mc. inallyd ();
This. lbgczzs. Text = mc. inallgczs ();
This. lbydzzs. Text = mc. inallydzs ();
This. caigou. Visible = false;
This. shushangshezhi. Visible = false;
This. Tongji. Visible = true;
Break;
Case keys. left:
If (this. caigou. Visible = false & this. shushangshezhi. Visible = false & this. Tongji. Visible = false)
{
This. Close ();
This. Dispose ();
}
Else
{
This. caigou. Visible = false;
This. shushangshezhi. Visible = false;
This. Tongji. Visible = false;
}
Break;
}
Set and play the symbol mc1000 sound
First reference symbol. Audio
Add the namespace using symbol. Audio;
/////////// Sound device settings
// Select device from Device List
Symbol. Audio. device mydevice = (symbol. Audio. Device) symbol. standardforms. selectdevice. Select (
Symbol. Audio. Controller. title,
Symbol. Audio. device. availabledevices );
If (mydevice = NULL)
{
MessageBox. Show ("no device selected", "selectdevice ");
// Close the form
This. Close ();
Return;
}
// Check the device type
Switch (mydevice. audiotype)
{
// If Standard Device
Case symbol. Audio. audiotype. standardaudio:
Myaudiocontroller = new symbol. Audio. standardaudio (mydevice );
Break;
// If simulated Device
Case symbol. Audio. audiotype. simulatedaudio:
Myaudiocontroller = new symbol. Audio. simulatedaudio (mydevice );
Break;
Default:
Throw new symbol. Exceptions. invaliddatatypeexception ("unknown device type ");
}
// Events and above are used for load event Loading
/// <Summary>
/// Call sound
/// </Summary>
Private void playsound (INT soundnum)
{
Switch (soundnum)
{
Case 1: // normal
Sound ();
Break;
Case 2: // Error
Sound ();
Sound ();
Break;
}
}
Private void sound ()
{
Int duration; // Length
Int frequency; // Hz
Duration = 60; // Length
Frequency = 2670; // Hz
This. myaudiocontroller. playaudio (duration, frequency); // play a clip
This. myaudiocontroller. Dispose (); // release resources
} // Audio operations above