Adjust FinishedLaunching() structure

This commit is contained in:
Dylan Kelly 2015-04-01 11:35:58 -04:00
Родитель 49d3a3af15
Коммит 82a427bdfd
3 изменённых файлов: 36 добавлений и 32 удалений

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

@ -0,0 +1,35 @@
using UIKit;
using Foundation;
namespace OpenGLESSample
{
// The name AppDelegate is referenced in the MainWindow.xib file.
public partial class OpenGLESSampleAppDelegate : UIApplicationDelegate
{
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
glView.AnimationInterval = 1.0 / 60.0;
glView.StartAnimation();
window.MakeKeyAndVisible ();
return true;
}
public override void OnResignActivation (UIApplication application)
{
glView.AnimationInterval = 1.0 / 5.0;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
glView.AnimationInterval = 1.0 / 60.0;
}
}
}

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

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using OpenTK.Platform;
using OpenGLES;
@ -20,33 +16,5 @@ namespace OpenGLESSample
}
}
// The name AppDelegate is referenced in the MainWindow.xib file.
public partial class OpenGLESSampleAppDelegate : UIApplicationDelegate
{
// This method is invoked when the application has loaded its UI and its ready to run
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// If you have defined a view, add it here:
// window.AddSubview (navigationController.View);
glView.AnimationInterval = 1.0 / 60.0;
glView.StartAnimation();
window.MakeKeyAndVisible ();
return true;
}
public override void OnResignActivation (UIApplication application)
{
glView.AnimationInterval = 1.0 / 5.0;
}
// This method is required in iPhoneOS 3.0
public override void OnActivated (UIApplication application)
{
glView.AnimationInterval = 1.0 / 60.0;
}
}
}

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

@ -79,6 +79,7 @@
</Compile>
<Compile Include="Main.cs" />
<Compile Include="EAGLView.cs" />
<Compile Include="AppDelegate.cs" />
</ItemGroup>
<ItemGroup>
<InterfaceDefinition Include="MainWindow.xib" />