Example #1
0
        private void SetupSiaqodb()
        {
            string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);              // Documents folder

            SiaqodbConfigurator.SetLicense(@"put your license key");
            db      = new Siaqodb(documentsPath);
            TaskMgr = new TaskManager(db);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:SiaqodbMVVM.SiaqoDbManager"/> class.
        /// </summary>
        /// <param name="database">Database.</param>
        public SiaqoDbManager(string database = "DEFAULTDB")
        {
            siaqodb = DependencyService.Get <ISiaqo>().GetInstance(database);

            //Getting the count of a type in the database..
            if (siaqodb.LoadAll <TaskItem>().Count() < 1)
            {
                LoadInitialData();
            }
        }
Example #3
0
        private void SetupSiaqodb()
        {
            string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); // Documents folder
            string dbpath        = Path.Combine(documentsPath, "../Library/siaqodb");             // Library folder

            if (!System.IO.Directory.Exists(dbpath))
            {
                System.IO.Directory.CreateDirectory(dbpath);
            }
            SiaqodbConfigurator.SetLicense(@"put your license key");
            db      = new Siaqodb(dbpath);
            TaskMgr = new TaskManager(db);
        }
 public static ISiaqodb GetInstance()
 {
     return instance ?? (instance = DependencyService.Get<ISiaqoDatabase>().GetInstant());
 }
Example #5
0
 public TaskManager(ISiaqodb siaqodb)
 {
     this.siaqodb = siaqodb;
 }
Example #6
0
 public DatabaseManager(ISiaqodb siaqodb)
 {
     this.siaqodb = siaqodb;
 }