コード例 #1
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            KPManager.SharedManager =  new KPManager("799cd5dabaae331d900801f0ac86a672","85c521a809899003bbec3e7b418ce391",100);
            KPManager.SharedManager.DidStartSession += DidStartSession;
            KPManager.SharedManager.DidUpdateLocation += DidUpdateLocation;
            KPManager.SharedManager.DidEndSession += DidEndSession;
            KPManager.SharedManager.DidGetActivePromos += DidGetActivePromos;
            KPManager.SharedManager.DidUnlockAchievement += DidUnlockAchievement;
            KPManager.SharedManager.DidUpdateLeaderboard += DidUpdateLeaderboard;
            KPManager.SharedManager.DidReceiveError += DidReceiveError;
            KPManager.SharedManager.WillPresentNotification += WillPresentNotification;
            KPManager.SharedManager.DidReceiveContent += DidReceiveContent;
            KPManager.SharedManager.DidCloseNotification += DidCloseNotification;
            KPManager.SharedManager.DidCloseWebView += DidCloseWebView;
            KPManager.SharedManager.DidPresentNotification += DidPresentNotification;

            //Manager.Delegate = new MyDelegate();

            viewController = new MainViewController ();
            window.RootViewController = viewController;
            window.MakeKeyAndVisible ();

            return true;
        }
コード例 #2
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);


            KPManager.SharedManager = new KPManager("799cd5dabaae331d900801f0ac86a672", "85c521a809899003bbec3e7b418ce391", 100);
            KPManager.SharedManager.DidStartSession         += DidStartSession;
            KPManager.SharedManager.DidUpdateLocation       += DidUpdateLocation;
            KPManager.SharedManager.DidEndSession           += DidEndSession;
            KPManager.SharedManager.DidGetActivePromos      += DidGetActivePromos;
            KPManager.SharedManager.DidUnlockAchievement    += DidUnlockAchievement;
            KPManager.SharedManager.DidUpdateLeaderboard    += DidUpdateLeaderboard;
            KPManager.SharedManager.DidReceiveError         += DidReceiveError;
            KPManager.SharedManager.WillPresentNotification += WillPresentNotification;
            KPManager.SharedManager.DidReceiveContent       += DidReceiveContent;
            KPManager.SharedManager.DidCloseNotification    += DidCloseNotification;
            KPManager.SharedManager.DidCloseWebView         += DidCloseWebView;
            KPManager.SharedManager.DidPresentNotification  += DidPresentNotification;

            //Manager.Delegate = new MyDelegate();

            viewController            = new MainViewController();
            window.RootViewController = viewController;
            window.MakeKeyAndVisible();

            return(true);
        }
コード例 #3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);
            var Manager = new KPManager("APIKEY","SECRET");
            KPManager.SharedManager = Manager;
            KPManager.SharedManager.DidStartSession += DidStartSession;
            //Manager.Delegate = new myDelegate();
            KPManager.SharedManager.StartSession();
            viewController = new MainViewController ();
            window.RootViewController = viewController;
            window.MakeKeyAndVisible ();

            return true;
        }