Ejemplo n.º 1
0
        public App(IPlatformBootstrapper platformBootstrapper)
        {
            InitializeComponent();

            // The root page of your application
            var content = new ContentPage
            {
                Title   = "MobileArchitecture",
                Content = new StackLayout
                {
                    VerticalOptions = LayoutOptions.Center,
                    Children        =
                    {
                        new Label {
                            HorizontalTextAlignment = TextAlignment.Center,
                            Text = "Welcome to Xamarin Forms!"
                        }
                    }
                }
            };

            var bootstrapper = Bootstrapper.GetInstance(platformBootstrapper);

            bootstrapper.Init();

            MainPage = new NavigationPage(content);
        }
        private Bootstrapper(IPlatformBootstrapper platformBootstrapper)
        {
            _platformBootstrapper = platformBootstrapper;

            // Initialize Injection Proxy
            _injection = new Injection();
        }
Ejemplo n.º 3
0
        public static Bootstrapper GetInstance(IPlatformBootstrapper platformBootstrapper)
        {
            if (_instance == null)
            {
                _instance = new Bootstrapper(platformBootstrapper);
            }

            return(_instance);
        }
Ejemplo n.º 4
0
 public App(IPlatformBootstrapper platformBootstrapper)
 {
     Bootstrapper.GetInstance(platformBootstrapper)
     .Init()
     .Get <INavigationService>()
     .Navigate(new StackOptions()
     {
         StackChoice = TeslaDefinition.Stacks.Authentication
     });
 }
Ejemplo n.º 5
0
        public App(IPlatformBootstrapper platform)
        {
            InitializeComponent();

            // Intializes everything and sets the MainPage to the navigation option set.
            Bootstrapper.GetInstance()
            .Init()
            .Get <INavigationService>()
            .Navigate(new StackOptions()
            {
                StackChoice = Stacks.Authentication
            });
        }
Ejemplo n.º 6
0
        public App(IPlatformBootstrapper platform)
        {
            InitializeComponent();

            // Intializes everything and sets the MainPage to the navigation option set.
            var navService = Bootstrapper.GetInstance()
                             .Init()
                             .Get <INavigationService>();

            navService.Navigate(new StackOptions()
            {
                StackChoice = Stacks.Main
            });

            //var inspector = new Exrin.Inspector.Inspector(navService);

            //Task.Run(() => inspector.Init("10.0.2.15", 8888));
        }
Ejemplo n.º 7
0
        public App(IPlatformBootstrapper platformBootstrapper)
        {
            Bootstrapper.GetInstance(platformBootstrapper).Init();

            Resources = new ResourceDictionary();
            Resources.Add("primaryGreen", Color.FromHex("91CA47"));
            Resources.Add("primaryDarkGreen", Color.FromHex("6FA22E"));

            var nav = new NavigationPage(new TodoListPage());

            nav.BarBackgroundColor = (Color)App.Current.Resources["primaryGreen"];
            nav.BarTextColor       = Color.White;


            Plugin.Connectivity.CrossConnectivity.Current.ConnectivityChanged += async(sender, args) => {
                await Task.Run(async() => await EnforceDataIntegrityAsync());
            };

            MainPage = nav;
        }
Ejemplo n.º 8
0
 private Bootstrapper(IPlatformBootstrapper platformBootstrapper) : base(new InjectionProxy(), (view) => Application.Current.MainPage = view as Page, () => { return(Application.Current.MainPage); })
 {
     platformBootstrapper?.Register(_injection);
 }
Ejemplo n.º 9
0
 private Bootstrapper(IPlatformBootstrapper platformBootstrapper)
 {
     _platformBootstrapper = platformBootstrapper;
     _injection            = new Proxy.Injection();
 }