Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SystemState Class

Windows Mobile 6.5
3/29/2010

Gives the ability to get the current value of a system state as well as the ability to be notified when that state changes

Namespace: Microsoft.WindowsMobile.Status
Assembly: Microsoft.WindowsMobile.Status (in microsoft.windowsmobile.status.dll)

public class SystemState : StateBase, IDisposable

When defining an instance of SystemState that is going to handle the Changed event, make sure that the instance is defined globally in the class where the event will be handled. If it is defined in a method, it will be up for garbage collection after it goes out of scope.

public class MyClass
{
    SystemState state; // defined globally to class
    private void Form1_Load(object sender, EventArgs e)
    {
        // SystemState state;  // This instance will go out of scope if defined here

        state =  new SystemState(SystemProperty.OwnerName);
        state.Changed += new ChangeEventHandler(state_Changed);
    }
}

System.Object
   Microsoft.WindowsMobile.Status.StateBase
    Microsoft.WindowsMobile.Status.SystemState

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.
Show:
© 2015 Microsoft