/// <summary> /// Serializes a configuration object to a file /// </summary> /// <param name="aConfig">The object to serialize</param> /// <param name="aConfLocation">The location where the configuration will be stored, including the name</param> public void serializeConfig(GestureLibraryConfiguration aConfig, string aConfLocation) { XmlSerializer mySerializer = new XmlSerializer(typeof(GestureLibraryConfiguration)); // To write to a file, create a StreamWriter object. StreamWriter myWriter = new StreamWriter(aConfLocation); mySerializer.Serialize(myWriter, aConfig); myWriter.Close(); }
/// <summary> /// Constructor for the GestureHandler class /// </summary> /// <param name="aDbLocation">location of the gesture database + name of the database</param> /// <param name="aConfLocation">location of a config file</param> public GestureHandler(string aDbLocation, LibEventHandler aEvHandler, GestureLibraryConfiguration aLibraryConf) { this.DatabaseLocation = @aDbLocation; this.evHandler = aEvHandler; this.conf = aLibraryConf; }