Exemple #1
0
        private Resource addImage(Connection connection, Image image)
        {
            Resource resource = new Resource( new HickoryIT.Shared.Data.Type(null, "",""), "testname", "testdescription", "testvalue");

            // TODO: Add the resource to DB
            connection.InsertResource(resource);

            // Get properties of image and add this/those
            Info inf = new Info(image);

            foreach (string propertyname in inf.PropertyItems.Keys)
            {
                Debug.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString());
                Console.WriteLine(propertyname + ": " + (inf.PropertyItems[propertyname]).ToString());
            }
            // TODO: Save image to disc

            return resource;
        }