<li>Define the event handlers:
<pre class="prettyprint">
-public static void EventHandlerIpAddressChanged(object sender, EventArgs e)
+public static void EventHandlerIpAddressChanged(object sender, AddressEventArgs e)
{
- Log.Info(Globals.LogTag, "IPCHANGE = " + ((AddressEventArgs)e).IPv4Address);
+ Log.Info(Globals.LogTag, "IPCHANGE = " + e.IPv4Address);
}
-public static void EventHandlerConnectionTypeChanged(object sender, EventArgs e)
+public static void EventHandlerConnectionTypeChanged(object sender, ConnectionTypeEventArgs e)
{
- Log.Info(Globals.LogTag, "ConnectionType = " + ((ConnectionTypeEventArgs)e).ConnectionType);
+ Log.Info(Globals.LogTag, "ConnectionType = " + e.ConnectionType);
}
</pre></li>