Exemple #1
0
        public MainPage()
        {
            this.InitializeComponent();

            var app = new XamForms.App();

            app.DBPath         = Path.Combine(ApplicationData.Current.LocalFolder.Path, "Stocks.db");;
            app.SQLitePlatform = new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(app.DBPath);

            LoadApplication(app);
        }
Exemple #2
0
        //
        // 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)
        {
            global::Xamarin.Forms.Forms.Init();

            var myApp = new XamForms.App();

            myApp.DBPath         = GetLocalFilePath("Stocks.db");
            myApp.SQLitePlatform = new SQLite.Net.Platform.XamarinIOS.SQLitePlatformIOS();

            LoadApplication(myApp);

            return(base.FinishedLaunching(app, options));
        }
Exemple #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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


            var app = new XamForms.App();

            app.DBPath         = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "stocks.db");
            app.SQLitePlatform = new SQLite.Net.Platform.XamarinAndroid.SQLitePlatformAndroid();

            LoadApplication(app);
        }