Example #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            if (AppManager.CurrentApplication.Error == null)
            {
                ViewModel.ShowMenu();
            }
            else
            {
                UIAlertView alert = new UIAlertView();

                alert.Title = "Error";

                alert.AddButton("OK");

                alert.Message = AppManager.CurrentApplication.Error.Message;

                alert.Clicked += (object s, UIButtonEventArgs ev) => {
                    Process.GetCurrentProcess().Kill();
                    NSThread.Exit();
                };

                alert.Show();
            }
        }
Example #2
0
        static void TerminateApplication()
        {
            Console.WriteLine("Closing the running application to re-launch...");

            Console.WriteLine("Trying Exit Option 1...");
            Exit(0);
            Console.WriteLine("Option 1 failed. Trying Exit Option 2...");
            NSThread.Exit();
            Console.WriteLine("Option 2 failed. Trying Exit Option 3...");
            TerminateWithSuccess();
            Console.WriteLine("Option 3 failed. Trying Exit Option 4...");
            throw new Xamarin.iOS.HotRestart.KillApplicationException();
        }
Example #3
0
 public void CloseApp()
 {
     NSThread.Exit();
 }