예제 #1
0
        public App()
        {
#if __LOCAL__
            // Set webservice
            WService = new Service(host: "192.168.1.12",
                                   port: 3000,
                                   sslCertificate: false);
#else
            // Set webservice
            WService = new Service(host: "pinnate-beautiful-marigold.glitch.me",
                                   sslCertificate: true);
#endif


            Sources = new Collection <Source>();

            InitializeComponent();



            // Start the db
            StartDb();

            SqLiteConn.CreateTable <Source>();
            SqLiteConn.CreateTable <Article>();
            BackUpConn.CreateTable <Source>();
            BackUpConn.CreateTable <Article>();

            // Close the db
            //CloseDb();

            MainPage = new AppShell();
        }
예제 #2
0
 /// <summary>
 ///  Function to close the database
 /// </summary>
 public static void CloseDb()
 {
     SqLiteConn.Dispose();
     //SqLiteConn.Close();
 }