/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { AnalyticsHelper.Initialize(Xamarin.Forms.Device.UWP); this.InitializeComponent(); this.Suspending += OnSuspending; }
// // 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) { // If these are not used the ToString for DateTime throws an exception in some cultures // For more information: https://forums.xamarin.com/discussion/42899/datetime-tostring-throws-argumentoutofrangeexception-in-thai-locale var c1 = new System.Globalization.ChineseLunisolarCalendar(); var c2 = new System.Globalization.GregorianCalendar(); var c3 = new System.Globalization.HebrewCalendar(); var c4 = new System.Globalization.HijriCalendar(); var c5 = new System.Globalization.JapaneseCalendar(); var c6 = new System.Globalization.JapaneseLunisolarCalendar(); var c7 = new System.Globalization.JulianCalendar(); var c8 = new System.Globalization.KoreanCalendar(); var c9 = new System.Globalization.KoreanLunisolarCalendar(); var c10 = new System.Globalization.PersianCalendar(); var c11 = new System.Globalization.TaiwanCalendar(); var c12 = new System.Globalization.TaiwanLunisolarCalendar(); var c13 = new System.Globalization.ThaiBuddhistCalendar(); var c14 = new System.Globalization.UmAlQuraCalendar(); AnalyticsHelper.Initialize(Xamarin.Forms.Device.iOS); global::Xamarin.Forms.Forms.Init(); CachedImageRenderer.Init(); LoadApplication(new App()); UITextField.Appearance.TintColor = Xamarin.Forms.Color.FromHex("#2548D8").ToUIColor(); #if __TESTS__ Xamarin.Calabash.Start(); #endif return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { AnalyticsHelper.Initialize(Xamarin.Forms.Device.Android); base.OnCreate(savedInstanceState); var intent = new Intent(this, typeof(MainActivity)); this.StartActivity(intent); this.Finish(); }
// // 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) { AnalyticsHelper.Initialize(Xamarin.Forms.Device.iOS); global::Xamarin.Forms.Forms.Init(); CachedImageRenderer.Init(); LoadApplication(new App()); UITextField.Appearance.TintColor = Xamarin.Forms.Color.FromHex("#2548D8").ToUIColor(); #if __TESTS__ Xamarin.Calabash.Start(); #endif return(base.FinishedLaunching(app, options)); }