Ejemplo n.º 1
0
        public OpenedFile[] OpenFilesSync(SupportedFileType[] fileTypes, bool canSelectMultiple,
                                          string title, string directory)
        {
            var paths = SelectOpenPathsSync(fileTypes, canSelectMultiple, title, directory);
            var files = new List <OpenedFile>();

            for (int i = 0; i < paths.Length; i++)
            {
                files.Add(NativeFileSOMacWin.FileFromPath(paths[i]));
            }

            return(files.ToArray());
        }
Ejemplo n.º 2
0
        public OpenedFile[] OpenFilesSync(SupportedFileType[] fileTypes, bool canSelectMultiple = true,
                                          string title = "", string directory = "")
        {
            var paths       = SelectOpenPathsSync(fileTypes, canSelectMultiple, title, directory);
            var openedFiles = new List <OpenedFile>();

            foreach (var path in paths)
            {
                var file = NativeFileSOMacWin.FileFromPath(path);
                if (file != null)
                {
                    openedFiles.Add(file);
                }
            }
            isBusy = false;

            return(openedFiles.ToArray());
        }