[ReachabilitySample] Actually listen for changed events, and update the UI accordingly.

This commit is contained in:
Rolf Bjarne Kvinge 2013-10-02 10:18:49 +02:00
Родитель 6ec139bae6
Коммит 6e3f89f376
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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 ()