// Replaces all existing StaticGestureInstances with these new ones
        #endregion

        #region StaticGestureClass
        public int SaveNewStaticGestureClass(string name, SGClass gesture)         // Returns id of gesture
        {
            string sql;
            string gestureJson = JsonConvert.SerializeObject(gesture);

            //string sampleInstance = JsonConvert.SerializeObject(gesture.SampleInstance);
            sql = String.Format("INSERT INTO StaticGestureClasses (name, sample_instance_json) VALUES ('{0}', '{1}')", name, gestureJson);
            executeNonQuery(sql);
            return(singleIntValueQuery("SELECT last_insert_rowid()"));            // Get the (auto-incremented) key
        }
Exemplo n.º 2
0
 public float DistanceTo(SGClass gestureClass)
 {
     return(gestureClass.DistanceTo(this));
 }