public ImageShrinkerViewModel()
 {
     ImageThumbs = new ObservableCollectionEx<ImageThumbViewModel>();
     Scale = 100;
     Quality = 90;
     ArchiveName = "BilderArchiv";
     _filenames = new Dictionary<string, string>();
     _selectedThumb = null;
 }
 public void Select(int index)
 {
     if (index < ImageThumbs.Count && index != -1)
     {
         _selectedThumb = ImageThumbs[index];
         PreViewImage = _selectedThumb.AbsolutePath;
     }
 }
        public void AddImage(string url)
        {
            ImageThumbViewModel thumb = new ImageThumbViewModel(url, this);

            string filename = Path.GetFileNameWithoutExtension(url);
            if (!string.IsNullOrEmpty(filename))
            {
                if (_filenames.ContainsKey(filename))
                {
                    filename = GetUniqueFileName(filename);
                    thumb.FileName = filename + ".jpg";
                }
                else
                    thumb.FileName = filename + ".jpg";
                _filenames.Add(filename, filename);

                ImageThumbs.Add(thumb);
            }
        }