예제 #1
0
        public static void AddAnnotation(annotationData d)
        {
            string output = "ANNOTATION: ";

            output += "\nCreating database, if it doesn't already exist";
            string dbPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "ormdata.db3");

            SQLiteConnection db = new SQLiteConnection(dbPath);

            db.CreateTable <DatabaseManager_Annotation>();

            DatabaseManager_Annotation newData = new DatabaseManager_Annotation();

            newData.title      = d.title;
            newData.foreignKey = d.key;
            newData.data       = format_annotation(d.data);
            newData.date       = DateTime.Now;

            db.Insert(newData);

            if (debugPrint)
            {
                Console.WriteLine(output);
            }
        }
예제 #2
0
 public TraceAnnotation(annotationData d)
 {
     this.coordinate = d.data;
     this.title      = d.title;
     primarykey      = d.key;
 }