Example #1
0
        private async void CancelImage_Click(object sender, RoutedEventArgs e)
        {
            NamedFile file = (sender as FrameworkElement).Tag as NamedFile;

            this.NamedImageFiles.Remove(file);
            await file.EmbeddedFile.DeleteAsync();
        }
Example #2
0
        private void UpImage_Click(object sender, RoutedEventArgs e)
        {
            NamedFile file  = (sender as FrameworkElement).Tag as NamedFile;
            int       index = this.NamedImageFiles.IndexOf(file);

            if (index != 0)
            {
                this.NamedImageFiles.Move(index, index - 1);
            }
        }
Example #3
0
        private Dictionary <string, StorageFile> RetrieveImageFiles()
        {
            Dictionary <string, StorageFile> imageFiles = new Dictionary <string, StorageFile>();

            for (int i = 0; i < this.NamedImageFiles.Count; i++)
            {
                NamedFile file     = this.NamedImageFiles[i];
                string    fileName = String.Format("{0:D2}. {1}.jpg", i, file.CustomName);
                imageFiles.Add(fileName, file.EmbeddedFile);
            }
            return(imageFiles);
        }