Esempio n. 1
0
 public MockSQLiteService()
 {
     conn = new SQLiteAsyncConnection(FileAccessHelper.GetLocalFilePath("ESDonationsTestDb.db"));
     conn.CreateTablesAsync <Donor, Session>().Wait();
     conn.DeleteAllAsync <Donor>().Wait();
     conn.DeleteAllAsync <Session>().Wait();
 }
Esempio n. 2
0
        public App()
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("dog16.db3");

            DogRep = new DogRepository(dbPath);

            var applicationStartPage = new FirstPage();

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

            MainPage = myNavigationPage;

            //Initialize Dog Photo View Page
            MyDogListPhotoPage = new DogListPhotoPage();

            //THIS WILL RUN EACH TIME YOU CHANGE THE DATABASE (ie. changing dbPath)
            IfDogSQLListEmptyThenFill();
        }
Esempio n. 3
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method
            string dbpath = FileAccessHelper.GetLocalFilePath("ethanslist.db3");

            databaseConnection = new DatabaseConnection(dbpath);

            // Code to start the Xamarin Test Cloud Agent
            #if ENABLE_TEST_CLOUD
            Xamarin.Calabash.Start();
            #endif

            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);

            UINavigationBar.Appearance.BarTintColor        = ColorScheme.WetAsphalt;
            UINavigationBar.Appearance.TintColor           = ColorScheme.Clouds;
            UINavigationBar.Appearance.TitleTextAttributes = new UIStringAttributes()
            {
                Font            = UIFont.FromName(Constants.NormalFont, 16f),
                ForegroundColor = ColorScheme.Clouds,
            };

            #if RELEASE
            Insights.Initialize("ec87be89090cdee48f57cce9ee5ca4d230b1f314");
            #endif


            return(true);
        }
Esempio n. 4
0
        public MainPage()
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("MHWDB.db3");

            this.InitializeComponent();

            LoadApplication(new MHW.App(dbPath));
        }
Esempio n. 5
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your fragment here

            service = new TranslationService(FileAccessHelper.GetLocalFilePath("TravelersGuide.db"));
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            string dbPath = FileAccessHelper.GetLocalFilePath("Songs.db");

            LoadApplication(new App(dbPath, new SQLitePlatformIOS()));

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 7
0
        public App()
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("people5.db3");

            DogRepo = new DogRepository(dbPath);
            // DogRepo.AddNewDog("Olive", "Black");
            // The root page of your application
            MainPage = new NavigationPage(new FirstPage());
        }
Esempio n. 8
0
        private List <Note> GetAllNotes()
        {
            var database = new NoteDatabase
                               (FileAccessHelper.GetLocalFilePath("Notes.db3"));

            var NotesFromDB = database.ReadNotes();

            return(new List <Note>(NotesFromDB));
        }
Esempio n. 9
0
        public App()
        {
            //MAKE THIS ASYNC AND PULL THIS OUT OF THE CONSTRUCTOR



            MyAzureBlobStorage   = new AzureBlobStorage();
            MyCloudBlobClient    = MyAzureBlobStorage.CreateCloudBlobClient();
            MyCloudBlobContainer = MyAzureBlobStorage.CreateCloudBlobClientAndContainer(ContainerName);



            string dbPath = FileAccessHelper.GetLocalFilePath("adog1.db3");

            //USE THIS FOR LIST AND LIST PHOTO PAGE
            DogRep = new DogRepository(dbPath);

            //USE THIS FOR LIST PHOTO PAGE

            DogPhotoRep = new DogPhotoRepository(dbPath);
            //USE THIS FOR LIST PHOTO BASE SIXTY FOUR PAGE
            DogRepBaseSixtyFour = new DogRepositoryBaseSixtyFour(dbPath);

            DogRepBlob = new DogRepositoryBlob(dbPath);

            var applicationStartPage = new FirstPage();

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

            MainPage = myNavigationPage;

            //Initialize Dog Photo View Page

            MyDogListMVVMPage        = new DogListMVVMPage();
            MyDogListPhotoPage       = new DogListPhotoPage();
            MyDogListPhotoBase64Page = new DogListPhotoBase64Page();

            MyDogListPhotoBlobPage = new DogListPhotoBlobPage();



            //THIS WILL RUN EACH TIME YOU CHANGE THE PATH OF THE DATABASE (ie. creating a new Database)
            //            IfDogSQLListEmptyThenFill();
        }
Esempio n. 10
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();

            string dbPath = FileAccessHelper.GetLocalFilePath("HopeDB.db3");

            LoadApplication(new App(dbPath));

            return(base.FinishedLaunching(app, options));
        }
        public MainPage()
        {
            this.InitializeComponent();

            var repository = new PantryPalDatabase(FileAccessHelper.GetLocalFilePath("PantryPal.db3"));

            FreshIOC.Container.Register(repository);

            LoadApplication(new PantryPalwithFreshMVVM.App());
        }
Esempio n. 12
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();
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
            //acesso a pasta do nosso aplicativo criando a base de dados com seu respectivo nome
            string dbPath = FileAccessHelper.GetLocalFilePath("lista.db3");

            LoadApplication(new App(dbPath));
            return(base.FinishedLaunching(app, options));
        }
Esempio n. 13
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("LittleVictories.db3");

            Forms.Init();

            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 14
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.SetFlags("Shell_Experimental", "CollectionView_Experimental");
            global::Xamarin.Forms.Forms.Init();
            string dbpath = FileAccessHelper.GetLocalFilePath("eLiDAR.sqlite");

            //  Xamarin.RisePlugin.AutoCompleteTextView.iOS.AutoCompleteTextViewRenderer.Init();
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
Esempio n. 15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            InitializeAssembly();
            FileAccessHelper.GetLocalFilePath("StationData.sqlite");
            LoadApplication(new App());
        }
Esempio n. 16
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            string dbPath = FileAccessHelper.GetLocalFilePath("datastoragedemo.db3");

            LoadApplication(new App(dbPath));
        }
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = KaraokeTOP2.Droid.Resource.Layout.Tabbar;
            ToolbarResource   = KaraokeTOP2.Droid.Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            string dbPath = FileAccessHelper.GetLocalFilePath("Songs.db");

            LoadApplication(new App(dbPath, new SQLitePlatformAndroid()));
        }
        public static void Initialize(ContainerBuilder containerBuilder)
        {
            if (_isInitialized)
            {
                return;
            }

            _isInitialized = true;

            var dbPath = FileAccessHelper.GetLocalFilePath("UKTA.db");

            containerBuilder.Register(x => new DbOptions {
                DbPath = dbPath
            }).SingleInstance();
        }
Esempio n. 19
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 uiApplication, NSDictionary launchOptions)
        {
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.BlackOpaque, false);
            UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes
            {
                TextColor = UIColor.Blue
            });

            global::Xamarin.Forms.Forms.Init();
            InitializeAssembly();
            FileAccessHelper.GetLocalFilePath("StationData.sqlite");
            LoadApplication(new App());

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Esempio n. 20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
            //Verificando Informacoes de Rede em Android
            ConnectivityManager conn = (ConnectivityManager)Application.Context.GetSystemService(Context.ConnectivityService);
            bool isConnected         = conn.ActiveNetworkInfo != null && conn.ActiveNetworkInfo.IsConnected;
            //acesso a pasta do nosso aplicativo criando a base de dados com seu respectivo nome
            string dbPath = FileAccessHelper.GetLocalFilePath("lista.db3");

            UserDialogs.Init(this);
            base.OnCreate(savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            LoadApplication(new App(dbPath));
        }
Esempio n. 21
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

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

            string dbPath = FileAccessHelper.GetLocalFilePath("investingph.db3");

            //string companyCSV = FileAccessHelper.GetLocalFilePath("Company.csv");
            LoadApplication(new App(dbPath));
            SendNotification();
            SendNotification("Close");
        }
Esempio n. 22
0
        public SQLiteConnection GetConnection()
        {
            // Documents folder

            string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string libFolder = Path.Combine(docFolder, "..", "Library", "Databases");
            string dbPath    = Path.Combine(libFolder, DatabaseHelper.DbFileName);

            if (!Directory.Exists(libFolder))
            {
                dbPath = FileAccessHelper.GetLocalFilePath(DatabaseHelper.DbFileName);
            }

            var conn = new SQLiteConnection(dbPath);

            // Return the database connection
            return(conn);
        }
Esempio n. 23
0
        public App()
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("dog4.db3");

            DogRep = new DogRepository(dbPath);

            var applicationStartPage = new FirstPage();

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

            MainPage = new NavigationPage(applicationStartPage);
        }
Esempio n. 24
0
        public App()
        {
            //HTTPClient
            myHttpClient = new HttpClient();


            //MAKE THIS ASYNC AND PULL THIS OUT OF THE CONSTRUCTOR
            MyAzureBlobStorage   = new AzureBlobStorage();
            MyCloudBlobClient    = MyAzureBlobStorage.CreateCloudBlobClient();
            MyCloudBlobContainer = MyAzureBlobStorage.CreateCloudBlobClientAndContainer(ContainerName);

            string dbPath = FileAccessHelper.GetLocalFilePath("asa17dog12.db3");

            //USE THIS FOR LIST PAGE
            DogRep = new DogRepository(dbPath);

            //USE THIS FOR LIST PHOTO PAGE
            DogPhotoRep = new DogPhotoRepository(dbPath);

            //USE THIS FOR LIST PHOTO BASE SIXTY FOUR PAGE
            DogRepBaseSixtyFour = new DogRepositoryBaseSixtyFour(dbPath);

            DogRepBlob = new DogRepositoryBlob(dbPath);

            var applicationStartPage = new FirstPage();

            var myNavigationPage = new NavigationPage(applicationStartPage);

            MainPage = myNavigationPage;

            //Initialize Dog Photo View Page
            MyDogListMVVMPage        = new DogListMVVMPage();
            MyDogListPhotoPage       = new DogListPhotoPage();
            MyDogListPhotoBase64Page = new DogListPhotoBase64Page();
            MyDogListPhotoBlobPage   = new DogListPhotoBlobPage();
        }
Esempio n. 25
0
        public WordDao()
        {
            string dbPath = FileAccessHelper.GetLocalFilePath("wordsdbandroid.db");

            db = new SQLiteConnection(dbPath);
        }
Esempio n. 26
0
 public SQLiteAsyncConnection GetConnection()
 {
     return(new SQLiteAsyncConnection(FileAccessHelper.GetLocalFilePath("EasterSealsDonors.db")));
 }