Ejemplo n.º 1
0
        internal void InvokeSelectFolderEvent(SelectFolderEventArgs args)
        {
            var handler = SelectFolderEvent;

            if (handler != null)
            {
                handler(this, args);
            }
        }
Ejemplo n.º 2
0
        private void SelectFolderHandler(object sender, SelectFolderEventArgs args)
        {
            var folderPath = args.FolderPath;

            if (!Directory.Exists(folderPath))
            {
                MessageBox.Show("Folder does not exist. It might have been moved or deleted.");
                return;
            }

            var imageFiles = GetImageFilesHelper.GetImageFilesFromLocation(folderPath);

            if (imageFiles == null || imageFiles.Length <= 0)
            {
                MessageBox.Show("Folder does not contain any images with jpg or jpeg format.");
                return;
            }

            SetFolderPath(folderPath, imageFiles);
        }