зеркало из https://github.com/xamarin/ios-samples.git
Adjust FinishedLaunching() structure
This commit is contained in:
Родитель
8c8f46ffd0
Коммит
4d399add0e
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -70,8 +70,8 @@
|
|||
<Compile Include="MainWindow.xib.designer.cs">
|
||||
<DependentUpon>MainWindow.xib</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="reachability.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="MainWindow.xib" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче