From 4d399add0eb9faa9b6d135d9ed2fde0499a9fb06 Mon Sep 17 00:00:00 2001 From: Dylan Kelly Date: Wed, 1 Apr 2015 12:06:36 -0400 Subject: [PATCH] Adjust FinishedLaunching() structure --- .../{main.cs => AppDelegate.cs} | 31 ++++++++++--------- ReachabilitySample/reachability.csproj | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) rename ReachabilitySample/{main.cs => AppDelegate.cs} (94%) diff --git a/ReachabilitySample/main.cs b/ReachabilitySample/AppDelegate.cs similarity index 94% rename from ReachabilitySample/main.cs rename to ReachabilitySample/AppDelegate.cs index b94f57a2..e8acbdb1 100644 --- a/ReachabilitySample/main.cs +++ b/ReachabilitySample/AppDelegate.cs @@ -1,21 +1,27 @@ -using System; +using System; using CoreGraphics; -using System.Net; using Foundation; using UIKit; -using SystemConfiguration; -using CoreFoundation; -namespace reachability { - public partial class ReachabilityAppDelegate : UIApplicationDelegate { +namespace reachability +{ + public partial class ReachabilityAppDelegate : UIApplicationDelegate + { UITableView tableView; NetworkStatus remoteHostStatus, internetStatus, localWifiStatus; - public override bool FinishedLaunching (UIApplication app, NSDictionary options) + static void Main (string[] args) + { + UIApplication.Main (args, null, (string)null); + } + + public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) { AddTable (); UpdateStatus (); - Reachability.ReachabilityChanged += (object sender, EventArgs e) => { UpdateStatus (); }; + Reachability.ReachabilityChanged += (object sender, EventArgs e) => { + UpdateStatus (); + }; window.MakeKeyAndVisible (); @@ -49,7 +55,8 @@ namespace reachability { tableView.ReloadData (); } - class DataSource : UITableViewSource { + class DataSource : UITableViewSource + { ReachabilityAppDelegate parent; UIImage imageCarrier, imageWiFi, imageStop; @@ -158,10 +165,6 @@ namespace reachability { return cell; } } - - static void Main (string[] args) - { - UIApplication.Main (args, null, (string)null); - } } } + diff --git a/ReachabilitySample/reachability.csproj b/ReachabilitySample/reachability.csproj index 8c417ce0..bea2cb7c 100644 --- a/ReachabilitySample/reachability.csproj +++ b/ReachabilitySample/reachability.csproj @@ -70,8 +70,8 @@ MainWindow.xib - +