Problems with State and Notification Broker

  • Thread starter Thread starter Cub71
  • Start date Start date
C

Cub71

I found the following code on this(http://blogs.msdn.com/lokeuei/
archive/2007/02/06/how-to-monitor-calls-on-windows-mobile-using-
c.aspx) page:



InitializeComponent();
SystemState _PhoneRoaming = new SystemState(
SystemProperty.PhoneRoaming);


_PhoneRoaming.Change += new ChangeEventHandler(
_PhoneRoaming_Changed);


void _PhoneRoaming_Changed(object sender, ChangeEventArgs args)
{
throw new Exception("The method or operation is not implemented.");
}

void _PhoneRoaming_Changed(object sender, ChangeEventArgs args)
{
if (SystemProperty.PhoneRoaming == false)
{
// Perform data network access
}
}


I would like to use the 'if (SystemProperty.PhoneRoaming == false' but
get this error on this line:
Operator '==' cannot be applied to operands of type
'Microsoft.WindowsMobile.Status.SystemProperty' and 'bool'

I have Googled alot but I cant find a way to utilize the
SystemProperty.PhoneRoaming.
Who can put me right here?
 
That line should read:-

SystemState.PhoneRoaming == false

SystemState is the class which exposes these properties, SystemProperty is
an enumeration of all the possible state and notification properties.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
 
Oh, great! Thank you, that did it for me. I've spent some hours on
this (Wich reveals at what level I'm on ;-) )
 
Back
Top