Esempio n. 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);
        }
Esempio n. 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();
            }
        }
Esempio n. 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);
        }
Esempio n. 4
0
 public static ISiaqodb GetInstance()
 {
     return instance ?? (instance = DependencyService.Get<ISiaqoDatabase>().GetInstant());
 }
Esempio n. 5
0
 public TaskManager(ISiaqodb siaqodb)
 {
     this.siaqodb = siaqodb;
 }
Esempio n. 6
0
 public DatabaseManager(ISiaqodb siaqodb)
 {
     this.siaqodb = siaqodb;
 }