using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.WindowsMobile.Status;

namespace CradleDemo
{
    public partial class Form1 : Form
    {
        private SystemState cradledDevice = 
            new SystemState(SystemProperty.CradlePresent, true);


        public Form1()
        {
            InitializeComponent();
            this.checkCradle.Checked = SystemState.CradlePresent;
            cradledDevice.Changed +=new ChangeEventHandler(cradledDevice_Changed);
        }

        void cradledDevice_Changed(object sender, ChangeEventArgs args)
        {
            checkCradle.Checked = SystemState.CradlePresent;
        }

        

        private void menuExit_Click(object sender, EventArgs e)
        {
            Close();
        }


    }
}