以下为类程序;--------------------------------------------------------------------
; 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/sqlce20.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/Configurations/NoTouch]
"ForceCalibrate"=dword:0
"SkipCalibrate"=dword:1
;--------------------------------------------------------------------
; 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/sqlce20.CAB"
"Continue"=dword:0
"ColdBootOnly"=dword:1
-
/// <summary>
/// 获取设备id
/// </summary>
/// <returns></returns>
public static string GetDevid()
{
string uuid="";
Symbol.ResourceCoordination.TerminalInfo terminalInfo = new Symbol.ResourceCoordination.TerminalInfo();
foreach (byte b in terminalInfo.UniqueUnitID)
uuid += b.ToString("X2");
return uuid;
}
;--------------------------------------------------------------------
; 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/sqlce20.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/Configurations/NoTouch]
"ForceCalibrate"=dword:0
"SkipCalibrate"=dword:1; *****************************************************************************************************
; *** This file is provided to configure the defaults for Contrast and Backlight settings. ***
; *** The template settings provided below should 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
switch (e.KeyCode)
{
///////////////////////////////////////////////////////////////////////////////////数据
case Keys.F1://清除数据
if(File.Exists("Storage Card/CG.sdf"))
{
Mc.gConn.Close();
Mc.gConn.Dispose();
File.Delete("Storage Card/CG.sdf");
}
MessageBox.Show("全部数据清除成功,请重新启动本程序!");
this.Close();
break;
case Keys.F2://导入数据
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://导出数据
ChangeDbToText();
this.RecNum.Text="0";
break;
case Keys.F4://清除预定库
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("预定库清除成功");
break;
///////////////////////////////////////////////////////////////////////////////////数据
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;
}