예제 #1
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            AppCenter.Start("bca33005-cfef-486e-ae2b-5237cd93a727",
                            typeof(Analytics), typeof(Crashes));

            Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(SYNC_FUSION_KEY);

            new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();

            var realmConfiguration = new Realms.RealmConfiguration();

            realmConfiguration.ShouldDeleteIfMigrationNeeded = true;
            Realms.RealmConfiguration.DefaultConfiguration   = realmConfiguration;

            Forms.Init();
            OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init();
            KeyboardOverlapRenderer.Init();
            AppInitializerViewModel.Initialize();
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => {
                System.Diagnostics.Debug.WriteLine(e.ToString());
            };

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var viewController = new LaunchScreen().CreateViewController();

            SetAsMainScreen(viewController);
            return(true);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SushiHangover.RealmThread"/> class.
 /// </summary>
 /// <param name="realmConfig">RealmConfiguration</param>
 /// <param name="autoCommmit">If set to <c>true</c> auto commmit open transaction on Dispose</param>
 public RealmThread(Realms.RealmConfiguration realmConfig, bool autoCommmit)
 {
     autoCommmitOnDispose = autoCommmit;
     workQueue            = new BlockingCollection <RealmWork>();
     realmThread          = new InternalThread(workQueue);
     realmThread.Start(realmConfig);
 }
예제 #3
0
        public XamApplication()
        {
            InitializeComponent();

            AppCenter.Start("android=f5528420-5065-4e4d-b4be-73a423f1569a;" +
                            "ios=bca33005-cfef-486e-ae2b-5237cd93a727",
                            typeof(Analytics), typeof(Crashes));

            var realmConfiguration = new Realms.RealmConfiguration();

            realmConfiguration.ShouldDeleteIfMigrationNeeded = true;
            Realms.RealmConfiguration.DefaultConfiguration   = realmConfiguration;

            MainPage = new LaunchScreen();
        }
예제 #4
0
        protected override async void OnInitialized()
        {
            InitializeComponent();

            Realms.RealmConfiguration realmConfiguration = new Realms.RealmConfiguration();
            Realms.RealmConfiguration.DefaultConfiguration = realmConfiguration;

            Realms.Realm realm = Realms.Realm.GetInstance();

            Realms.Transaction transaction = realm.BeginWrite();

            realm.RemoveAll();

            transaction.Commit();
            transaction.Dispose();



            await NavigationService.NavigateAsync($"/{nameof(MainPageView)}");
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SushiHangover.RealmThread"/> class.
 /// </summary>
 /// <param name="realmConfig">RealmConfiguration</param>
 public RealmThread(Realms.RealmConfiguration realmConfig) : this(realmConfig, false)
 {
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SushiHangover.RealmThread"/> class.
 /// </summary>
 /// <param name="realmConfig">RealmConfiguration</param>
 /// <param name="autoCommmit">If set to <c>true</c> auto commmit open transaction on Dispose</param>
 public RealmThread(Realms.RealmConfiguration realmConfig, bool autoCommmit)
 {
     PCLHelpers.ThrowProxyShouldNeverBeUsed();
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SushiHangover.RealmThread"/> class.
 /// </summary>
 /// <param name="realmConfig">RealmConfiguration</param>
 public RealmThread(Realms.RealmConfiguration realmConfig) : this(realmConfig, false)
 {
     PCLHelpers.ThrowProxyShouldNeverBeUsed();
 }