From 6e3f89f376e4920fa71a24153c48c20f561ef5f9 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 2 Oct 2013 10:18:49 +0200 Subject: [PATCH] [ReachabilitySample] Actually listen for changed events, and update the UI accordingly. --- ReachabilitySample/main.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReachabilitySample/main.cs b/ReachabilitySample/main.cs index e11cef59..a7e10fc0 100644 --- a/ReachabilitySample/main.cs +++ b/ReachabilitySample/main.cs @@ -16,6 +16,7 @@ namespace reachability { { AddTable (); UpdateStatus (); + Reachability.ReachabilityChanged += (object sender, EventArgs e) => { UpdateStatus (); }; window.MakeKeyAndVisible (); @@ -27,6 +28,7 @@ namespace reachability { remoteHostStatus = Reachability.RemoteHostStatus (); internetStatus = Reachability.InternetConnectionStatus (); localWifiStatus = Reachability.LocalWifiConnectionStatus (); + tableView.ReloadData (); } void AddTable ()