Example #1
0
        // Add a to-do item to the database and collections.
        public void AddImageItem(ImageItem newImageItem)
        {
            // Add a to-do item to the data context.
            ImageDB.NPImages.InsertOnSubmit(newImageItem);

            // Save changes to the database.
            ImageDB.SubmitChanges();

            // Add a to-do item to the "all" observable collection.
            AllImageItems.Add(newImageItem);
            Debug.WriteLine("Image Added");
        }
Example #2
0
        private void StoreImageItem()
        {
            ImageItem TempImageItem = new ImageItem();
            TempImageItem.ImageName = Guid.NewGuid().ToString() + ".jpg";
            TempImageItem.IsSync = false;
            TempImageItem.IsCached = true;
            TempImageItem.IsFav = true;
            TempImageItem.DateTaken = DateTime.Now;
            TempImageItem.Latitude = latitude;
            TempImageItem.Longitude = longitude;
            TempImageItem.Comments = "Test Comment";
            TempImageItem.SaveImage(CapturedImage);

            App.ViewModel.AddImageItem(TempImageItem);
        }