开发学院手机开发Windows Mobile 开发 windows mobile 信号检测 阅读

windows mobile 信号检测

 2010-06-03 22:55:00 来源:WEB开发网   
核心提示:view sourceprint?001using System;002using System.Collections.Generic;003using System.ComponentModel;004using System.Data;005using System.Drawing;006using System

view sourceprint?001using System;

002using System.Collections.Generic;

003using System.ComponentModel;

004using System.Data;

005using System.Drawing;

006using System.Text;

007using System.Windows.Forms;

008

009using System.Collections;

010using Microsoft.WindowsMobile.Status;

011

012

013namespace simple_snapi_ul

014{

015 public partial class Form1 : Form

016 {

017 private Timer SyncTimer = null;

018

019 public Form1()

020 {

021 InitializeComponent();

022 SetUpNotifications();

023 }

024

025

026 private ArrayList stateList = new ArrayList();

027

028 public void SetUpNotifications()

029 {

030 // This tells which states to monitor

031 SystemState s;

032 // Monitor for ActiveSync Connection

033 s = new SystemState(SystemProperty.CradlePresent);

034 s.Changed += new ChangeEventHandler(ChangeOccurred);

035 stateList.Add(s);

036 // Monitor for GPRS Connection

037 s = new SystemState(SystemProperty.PhoneGprsCoverage);

038 s.Changed += new ChangeEventHandler(ChangeOccurred);

039 stateList.Add(s);

040 //Monitor for Network Connection (eg. WiFi)

041 s = new SystemState(SystemProperty.ConnectionsNetworkCount);

042 s.Changed += new ChangeEventHandler(ChangeOccurred);

043 stateList.Add(s);

044

045

046

047 UpdateConnectionState();

048 }

049

050 public void ChangeOccurred(object sender, ChangeEventArgs args)

051 {

052 // If a change occurs

053 SystemState state = (SystemState)sender;

1 2  下一页

Tags:windows mobile 信号

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      0%(0)
更多精彩
    赞助商链接

    热点阅读
      焦点图片
        最新推荐
          精彩阅读