Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            // 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();

            StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
            StrictMode.SetVmPolicy(builder.Build());

            base.OnCreate(bundle);

            CrossCurrentActivity.Current.Init(this, bundle);
            PermissionsHelper.Activity = this;

            this.SetTheme(Resource.Style.Theme_Design_Light);

            //CachedImageRenderer.Init(false);
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(false);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LoadApplication(new App());
        }
        //
        // 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));
        }
Exemplo n.º 3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var thai = new System.Globalization.ThaiBuddhistCalendar();

            var en = new System.Globalization.CultureInfo("en-US");

            System.Threading.Thread.CurrentThread.CurrentCulture = en;

            notificationManager = GetSystemService(Context.NotificationService) as NotificationManager;

            this.Window.SetFlags(WindowManagerFlags.KeepScreenOn, WindowManagerFlags.KeepScreenOn);

            builder = new Notification.Builder(this)
                      .SetContentTitle("")
                      .SetContentText("")
                      .SetSmallIcon(Resource.Drawable.icon);


            global::Xamarin.Forms.Forms.Init(this, bundle);
            global::ZXing.Net.Mobile.Forms.Android.Platform.Init();
            Xamarin.FormsMaps.Init(this, bundle);

            //PowerManager pm = (PowerManager)GetSystemService(Context.PowerService);
            //PowerManager.WakeLock wl = pm.NewWakeLock(WakeLockFlags.ScreenDim, "My Tag");
            //wl.Acquire();

            AppCenter.Start("fc4a1f62-9bbe-407e-91e4-d7edd9e880c6", typeof(Analytics), typeof(Crashes));

            LoadApplication(new App());
        }
Exemplo n.º 4
0
 public void AFVTau(System.Runtime.Versioning.ResourceExposureAttribute Bhpjwb, System.Web.UI.WebControls.MailMessageEventHandler lcclVgz, System.ComponentModel.DesignOnlyAttribute LJoU, System.Security.Cryptography.X509Certificates.X509ChainPolicy JAthRKz)
 {
     System.Web.Configuration.ProfilePropertySettingsCollection YPN = new System.Web.Configuration.ProfilePropertySettingsCollection();
     System.Web.UI.WebControls.CommandEventArgs         coGHdY      = new System.Web.UI.WebControls.CommandEventArgs("wyKJlYHiXhmuI", 939670288);
     System.Windows.Forms.TreeNodeConverter             TQkITGk     = new System.Windows.Forms.TreeNodeConverter();
     System.CodeDom.CodeNamespaceImport                 AMuF        = new System.CodeDom.CodeNamespaceImport();
     System.Runtime.Remoting.Channels.TransportHeaders  ZPhf        = new System.Runtime.Remoting.Channels.TransportHeaders();
     System.Web.Configuration.ProfileSettingsCollection bGxTyT      = new System.Web.Configuration.ProfileSettingsCollection();
     System.Web.UI.Triplet NKo = new System.Web.UI.Triplet(94201957, 204067286, 181795136);
     System.Web.UI.WebControls.CreateUserWizardStep                 YVz     = new System.Web.UI.WebControls.CreateUserWizardStep();
     System.Net.Configuration.HttpCachePolicyElement                gvpb    = new System.Net.Configuration.HttpCachePolicyElement();
     System.Runtime.InteropServices.IDispatchImplAttribute          JMUwahj = new System.Runtime.InteropServices.IDispatchImplAttribute(-658);
     System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute WvLbFF  = new System.Web.UI.WebControls.WebParts.ConnectionConsumerAttribute("tibFWnWRwJiTRnijF");
     System.Web.UI.WebControls.MenuItemCollection   QjImiIB = new System.Web.UI.WebControls.MenuItemCollection(new System.Web.UI.WebControls.MenuItem());
     System.ComponentModel.WarningException         Edl     = new System.ComponentModel.WarningException("hLJ", "RxUjFInvYnsN");
     System.Web.UI.WebControls.CreateUserWizardStep tnLG    = new System.Web.UI.WebControls.CreateUserWizardStep();
     System.Threading.ThreadExceptionEventArgs      oVqHzS  = new System.Threading.ThreadExceptionEventArgs(new System.Exception());
     System.Windows.Forms.ToolStripPanel            ubWJjW  = new System.Windows.Forms.ToolStripPanel();
     System.Windows.Forms.CheckedListBox            vQnk    = new System.Windows.Forms.CheckedListBox();
     System.Data.EvaluateException lZuPd = new System.Data.EvaluateException("VDiWDw");
     System.Collections.Specialized.OrderedDictionary     NrEiCx = new System.Collections.Specialized.OrderedDictionary();
     System.Web.Configuration.ExpressionBuilderCollection rKe    = new System.Web.Configuration.ExpressionBuilderCollection();
     System.Security.VerificationException               gjQbpO  = new System.Security.VerificationException("HdwsMd", new System.Exception());
     System.Web.UI.WebControls.GridView                  hKm     = new System.Web.UI.WebControls.GridView();
     System.Collections.Specialized.StringCollection     xaB     = new System.Collections.Specialized.StringCollection();
     System.Runtime.InteropServices.PreserveSigAttribute eVvQ    = new System.Runtime.InteropServices.PreserveSigAttribute();
     System.IO.IODescriptionAttribute       aNN   = new System.IO.IODescriptionAttribute("VPjQMtDWfg");
     System.ComponentModel.BooleanConverter FvgYn = new System.ComponentModel.BooleanConverter();
     System.Web.UI.WebControls.DetailsViewInsertedEventArgs PwpT     = new System.Web.UI.WebControls.DetailsViewInsertedEventArgs(1190630802, new System.Exception());
     System.Windows.Forms.ImageList                  xRwZA           = new System.Windows.Forms.ImageList();
     System.Globalization.JapaneseCalendar           afnDCPz         = new System.Globalization.JapaneseCalendar();
     System.Web.Configuration.PassportAuthentication MfCQkqL         = new System.Web.Configuration.PassportAuthentication();
     System.Runtime.Remoting.RemotingException       naDyQF          = new System.Runtime.Remoting.RemotingException();
     System.MissingFieldException                            ubX     = new System.MissingFieldException("wtnxbHmoATXw", new System.Exception());
     System.Web.UI.HtmlControls.HtmlInputText                VLBD    = new System.Web.UI.HtmlControls.HtmlInputText("gXFG");
     System.Runtime.Remoting.ActivatedServiceTypeEntry       doa     = new System.Runtime.Remoting.ActivatedServiceTypeEntry("CWPQ", "eKcxOFlcYMF");
     System.MissingMethodException                           PSQBjgG = new System.MissingMethodException("BQoFN", new System.Exception());
     System.Windows.Forms.FolderBrowserDialog                nyTD    = new System.Windows.Forms.FolderBrowserDialog();
     System.Runtime.InteropServices.OutAttribute             sBWytdq = new System.Runtime.InteropServices.OutAttribute();
     System.Web.UI.WebControls.FormViewUpdateEventArgs       wrFEU   = new System.Web.UI.WebControls.FormViewUpdateEventArgs(614564652);
     System.ArgumentOutOfRangeException                      Tyfmqs  = new System.ArgumentOutOfRangeException("XOLQzNCqfjKHnxfq", new System.Exception());
     System.Web.UI.ControlBuilder                            ubZZw   = new System.Web.UI.ControlBuilder();
     System.Windows.Forms.FlowLayoutPanel                    huyOf   = new System.Windows.Forms.FlowLayoutPanel();
     System.Configuration.UserSettingsGroup                  VkIAhTM = new System.Configuration.UserSettingsGroup();
     System.Security.Cryptography.MD5CryptoServiceProvider   ixAZ    = new System.Security.Cryptography.MD5CryptoServiceProvider();
     System.Runtime.Remoting.Metadata.SoapParameterAttribute QHvwhq  = new System.Runtime.Remoting.Metadata.SoapParameterAttribute();
     System.Reflection.AssemblyInformationalVersionAttribute IGrOTW  = new System.Reflection.AssemblyInformationalVersionAttribute("qdWByXvKzB");
     System.Windows.Forms.SelectionRangeConverter            rwbzo   = new System.Windows.Forms.SelectionRangeConverter();
     Microsoft.SqlServer.Server.SqlTriggerAttribute          PsugLs  = new Microsoft.SqlServer.Server.SqlTriggerAttribute();
     System.Globalization.ThaiBuddhistCalendar               iMwCC   = new System.Globalization.ThaiBuddhistCalendar();
 }
Exemplo n.º 5
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            UNUserNotificationCenter.Current.Delegate = new MyNotificationDelegate();
            global::Xamarin.Forms.Forms.Init();
            global::ZXing.Net.Mobile.Forms.iOS.Platform.Init();

            Xamarin.FormsMaps.Init();

            var thai = new System.Globalization.ThaiBuddhistCalendar();

            var en = new System.Globalization.CultureInfo("en-US");

            System.Threading.Thread.CurrentThread.CurrentCulture = en;

            //if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            //{
            //    var notificationSettings = UIUserNotificationSettings.GetSettingsForTypes(
            //        UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, null
            //    );

            //    UIApplication.SharedApplication.RegisterUserNotificationSettings(notificationSettings);
            //}

            //UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;

            if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
            {
                UIUserNotificationType     userNotificationTypes = UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound;
                UIUserNotificationSettings notificationSettings  = UIUserNotificationSettings.GetSettingsForTypes(userNotificationTypes, null);
                UIApplication.SharedApplication.RegisterUserNotificationSettings(notificationSettings);
                UIApplication.SharedApplication.RegisterForRemoteNotifications();
            }
            else
            {
                UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound;
                UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes);
            }

            AppCenter.Start("3e99bed8-99b8-4485-80ce-86d2a93649ef", typeof(Analytics), typeof(Crashes));
            AppCenter.Start("3e99bed8-99b8-4485-80ce-86d2a93649ef", typeof(Push));

            LoadApplication(new App());

            UIApplication.SharedApplication.BeginBackgroundTask(() => {});

            UIApplication.SharedApplication.IdleTimerDisabled = true;

            return(base.FinishedLaunching(app, options));
        }