Symbol MC1000开发

symbol mc1000技术探讨-----platform下的Display.reg开机亮灯的代码

*****************************************************************************************************
; *** 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

symbol mc1000技术探讨-----apllication下的Startup.reg自动安装代码

;--------------------------------------------------------------------
; 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 

Symbol Mc1000 快捷键 的 设置 事件 开发

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;
   }

Symbol Mc1000 声音的设置以及播放

首先引用Symbol.Audio

加一命名空间using Symbol.Audio;

/声音设备的设置
   //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");

   } 

 

//--------------------------------------------------------------------------------------以上为Load事件加载用的

///


  /// 叫唤声音
  ///

  private void PlaySound(int SoundNum)
  {
  
  
   switch (SoundNum)
   {

    case 1://正常
     Sound();
     break;
    case 2://出错
     Sound();
     Sound();
     break;

   }
 
  }
  private void Sound()
  {
  
   int Duration;//长短
   int Frequency;//赫兹
   Duration = 60;//长短
   Frequency = 2670;//赫兹
   this.MyAudioController.PlayAudio(Duration, Frequency);//播放一段
   this.MyAudioController.Dispose();//释放资源
  }//----------------------------------------------------------------------------------------------------------以上为声音操作

你可能感兴趣的:(Symbol MC1000开发)