Beispiel #1
0
 /// <summary>Call this method if you need to be sure of when the database is initialized
 /// (e.g. to catch versioning exceptions)</summary>
 /// <remarks>Really, this should be necessary, not optional...</remarks>
 public static void InitializeDatabase()
 {
     if (database != null)
     {
         return;
     }
     database = new Sqlite.SqliteDataStore(IO.Path.Combine(UserDataStore.Path, "database.sqlite"));
 }
Beispiel #2
0
        protected SqliteWordList(SqliteDataStore store, long setID)
        {
            DataStore = store;
            id        = setID;
            worker    = new Worker(store, this);
            undoList  = new UndoList <Command>();

            list              = new BindingList <WordListEntry>(worker.GetAllEntries());
            list.ListChanged += BindingListChanged;
        }
Beispiel #3
0
        public static SqliteWordList FromSetID(SqliteDataStore store, long setID)
        {
            var list = new SqliteWordList(store, setID);

            if (!list.worker.Exists())
            {
                list.Dispose();
                return(null);
            }

            return(list);
        }
Beispiel #4
0
		/// <summary>Call this method if you need to be sure of when the database is initialized
		/// (e.g. to catch versioning exceptions)</summary>
		/// <remarks>Really, this should be necessary, not optional...</remarks>
		public static void InitializeDatabase() {
			if (database != null)
				return;
			database = new Sqlite.SqliteDataStore(IO.Path.Combine(UserDataStore.Path, "database.sqlite"));
		}