コード例 #1
0
ファイル: Setup.cs プロジェクト: asierdanjou/xabre-ble
        protected override IMvxIosViewPresenter CreatePresenter()
        {
            Forms.Init();
            var xamarinFormsApp = new BleMvxFormsApp();

            return(new MvxFormsIosPagePresenter(Window, xamarinFormsApp));
        }
コード例 #2
0
ファイル: MainActivity.cs プロジェクト: zuize47/rfid-demo
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate
            {
                return(true);
            };

            /*System.Net.ServicePointManager
             *  .ServerCertificateValidationCallback +=
             *  (sender, cert, chain, sslPolicyErrors) => true;
             */

            base.OnCreate(bundle);

            //Plugin.CurrentActivity.CrossCurrentActivity.Current.Init();
            //Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);

            UserDialogs.Init(this);
            Forms.Init(this, bundle);
            var formsApp = new BleMvxFormsApp();

            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter)Mvx.Resolve <IMvxViewPresenter>();

            presenter.MvxFormsApp = formsApp;

            Mvx.Resolve <IMvxAppStart>().Start();
        }
コード例 #3
0
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            SvgImageRenderer.Init();

            UserDialogs.Init(this);
            Forms.Init(this, bundle);

            if (((int)Android.OS.Build.VERSION.SdkInt) >= 23)
            {
                CheckPermissions();
            }

            var formsApp = new BleMvxFormsApp();

            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter)Mvx.Resolve <IMvxViewPresenter>();

            presenter.MvxFormsApp = formsApp;

            Mvx.Resolve <IMvxAppStart>().Start();
        }
コード例 #4
0
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            base.OnCreate(bundle);

            UserDialogs.Init(this);
            Forms.Init(this, bundle);
            var formsApp = new BleMvxFormsApp();
            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter) Mvx.Resolve<IMvxViewPresenter>();
            presenter.MvxFormsApp = formsApp;

            Mvx.Resolve<IMvxAppStart>().Start();
        }
コード例 #5
0
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            base.OnCreate(bundle);

            UserDialogs.Init(this);
            Forms.Init(this, bundle);
            var formsApp = new BleMvxFormsApp();

            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter)Mvx.Resolve <IMvxViewPresenter>();

            presenter.FormsApplication = formsApp;
            Mvx.Resolve <IMvxAppStart>().Start();
        }
コード例 #6
0
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate
            {
                return(true);
            };

            base.OnCreate(bundle);
            Xamarin.Essentials.Platform.Init(this, bundle); // add this line to your code, it may also be called: bundle

            if (Device.Idiom == TargetIdiom.Phone)
            {
                this.RequestedOrientation = ScreenOrientation.Portrait;
            }
            else
            {
                this.RequestedOrientation = ScreenOrientation.Landscape;
            }

            //ActivityCompat.RequestPermissions(CrossCurrentActivity.Current.Activity, new[] { Manifest.Permission.AccessBackgroundLocation.ToString() }, 1000);

            UserDialogs.Init(this);
            Forms.Init(this, bundle);
            var formsApp = new BleMvxFormsApp();

            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter)Mvx.Resolve <IMvxViewPresenter>();

            presenter.FormsApplication = formsApp;

            Mvx.Resolve <IMvxAppStart>().Start();
        }
コード例 #7
0
        protected override void OnCreate(Bundle bundle)
        {
            ToolbarResource   = Resource.Layout.toolbar;
            TabLayoutResource = Resource.Layout.tabs;

            System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate
            {
                return(true);
            };

            base.OnCreate(bundle);

            UserDialogs.Init(this);
            Forms.Init(this, bundle);
            var formsApp = new BleMvxFormsApp();

            LoadApplication(formsApp);

            var presenter = (MvxFormsDroidPagePresenter)Mvx.Resolve <IMvxViewPresenter>();

            presenter.FormsApplication = formsApp;

            Mvx.Resolve <IMvxAppStart>().Start();
        }