зеркало из https://github.com/xamarin/ios-samples.git
[ExtensionsDemo] Code refactoring and formatting
This commit is contained in:
Родитель
080a2236dd
Коммит
e928b3b572
|
@ -1,16 +1,12 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using NotificationCenter;
|
||||
using Foundation;
|
||||
using Social;
|
||||
using UIKit;
|
||||
using CoreGraphics;
|
||||
using Foundation;
|
||||
using NotificationCenter;
|
||||
using UIKit;
|
||||
|
||||
namespace EvolveCountdownWidget
|
||||
{
|
||||
public partial class EvolveCountdownViewController : UIViewController, INCWidgetProviding
|
||||
{
|
||||
namespace EvolveCountdownWidget {
|
||||
public partial class EvolveCountdownViewController : UIViewController, INCWidgetProviding {
|
||||
public EvolveCountdownViewController (IntPtr handle)
|
||||
: base (handle)
|
||||
{
|
||||
|
|
|
@ -1,47 +1,13 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Foundation;
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace ExtensionsDemo
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
// application events from iOS.
|
||||
namespace ExtensionsDemo {
|
||||
[Register ("AppDelegate")]
|
||||
public partial class AppDelegate : UIApplicationDelegate
|
||||
{
|
||||
// class-level declarations
|
||||
|
||||
public class AppDelegate : UIApplicationDelegate {
|
||||
public override UIWindow Window {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
// This method is invoked when the application is about to move from active to inactive state.
|
||||
// OpenGL applications should use this method to pause.
|
||||
public override void OnResignActivation (UIApplication application)
|
||||
{
|
||||
}
|
||||
|
||||
// This method should be used to release shared resources and it should store the application state.
|
||||
// If your application supports background exection this method is called instead of WillTerminate
|
||||
// when the user quits.
|
||||
public override void DidEnterBackground (UIApplication application)
|
||||
{
|
||||
}
|
||||
|
||||
// This method is called as part of the transiton from background to active state.
|
||||
public override void WillEnterForeground (UIApplication application)
|
||||
{
|
||||
}
|
||||
|
||||
// This method is called when the application is about to terminate. Save data, if needed.
|
||||
public override void WillTerminate (UIApplication application)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
using NotificationCenter;
|
||||
using WebKit;
|
||||
|
||||
namespace ExtensionsDemo
|
||||
{
|
||||
public partial class ExtensionsDemoViewController : UIViewController
|
||||
{
|
||||
WKWebView webView;
|
||||
namespace ExtensionsDemo {
|
||||
public partial class ExtensionsDemoViewController : UIViewController {
|
||||
WKWebView webView;
|
||||
|
||||
public ExtensionsDemoViewController (IntPtr handle) : base (handle)
|
||||
{
|
||||
|
@ -21,20 +18,20 @@ namespace ExtensionsDemo
|
|||
base.ViewWillAppear (animated);
|
||||
|
||||
var controller = NCWidgetController.GetWidgetController ();
|
||||
controller.SetHasContent (true, "com.xamarin.ExtensionsDemo.EvolveCountdownWidget");
|
||||
controller.SetHasContent (true, "com.xamarin.ExtensionsDemo.EvolveCountdownWidget");
|
||||
}
|
||||
|
||||
public override void ViewDidLoad ()
|
||||
{
|
||||
base.ViewDidLoad ();
|
||||
public override void ViewDidLoad ()
|
||||
{
|
||||
base.ViewDidLoad ();
|
||||
|
||||
webView = new WKWebView (View.Frame, new WKWebViewConfiguration ());
|
||||
View.AddSubview (webView);
|
||||
webView = new WKWebView (View.Frame, new WKWebViewConfiguration ());
|
||||
View.AddSubview (webView);
|
||||
|
||||
var url = new NSUrl ("https://evolve.xamarin.com");
|
||||
var request = new NSUrlRequest (url);
|
||||
webView.LoadRequest (request);
|
||||
}
|
||||
var url = new NSUrl ("https://evolve.xamarin.com");
|
||||
var request = new NSUrlRequest (url);
|
||||
webView.LoadRequest (request);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UIKit;
|
||||
|
||||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace ExtensionsDemo
|
||||
{
|
||||
public class Application
|
||||
{
|
||||
namespace ExtensionsDemo {
|
||||
public class Application {
|
||||
// This is the main entry point of the application.
|
||||
static void Main (string[] args)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче