Пример #1
0
 internal override string[] ProcessVistaFiles(FileDialogNative.IFileDialog dialog)
 {
     FileDialogNative.IFileOpenDialog openDialog = (FileDialogNative.IFileOpenDialog)dialog;
     if (Multiselect)
     {
         FileDialogNative.IShellItemArray results;
         openDialog.GetResults(out results);
         uint count;
         results.GetCount(out count);
         string[] files = new string[count];
         for (uint i = 0; i < count; ++i)
         {
             FileDialogNative.IShellItem item;
             results.GetItemAt(i, out item);
             files[unchecked ((int)i)] = GetFilePathFromShellItem(item);
         }
         return(files);
     }
     else
     {
         FileDialogNative.IShellItem item;
         openDialog.GetResult(out item);
         return(new string[] { GetFilePathFromShellItem(item) });
     }
 }
Пример #2
0
 internal override string[] ProcessVistaFiles(FileDialogNative.IFileDialog dialog)
 {
     FileDialogNative.IShellItem      item2;
     FileDialogNative.IFileOpenDialog dialog2 = (FileDialogNative.IFileOpenDialog)dialog;
     if (this.Multiselect)
     {
         FileDialogNative.IShellItemArray array;
         uint num;
         dialog2.GetResults(out array);
         array.GetCount(out num);
         string[] strArray = new string[num];
         for (uint i = 0; i < num; i++)
         {
             FileDialogNative.IShellItem item;
             array.GetItemAt(i, out item);
             strArray[i] = FileDialog.GetFilePathFromShellItem(item);
         }
         return(strArray);
     }
     dialog2.GetResult(out item2);
     return(new string[] { FileDialog.GetFilePathFromShellItem(item2) });
 }