internal override void GetResult(Ookii.Dialogs.Wpf.Interop.IFileDialog dialog)
        {
            if (Multiselect)
            {
                Ookii.Dialogs.Wpf.Interop.IShellItemArray results;
                ((Ookii.Dialogs.Wpf.Interop.IFileOpenDialog)dialog).GetResults(out results);
                uint count;
                results.GetCount(out count);
                string[] fileNames = new string[count];
                for (uint x = 0; x < count; ++x)
                {
                    Ookii.Dialogs.Wpf.Interop.IShellItem item;
                    results.GetItemAt(x, out item);
                    string name;
                    item.GetDisplayName(NativeMethods.SIGDN.SIGDN_FILESYSPATH, out name);
                    fileNames[x] = name;
                }
                FileNamesInternal = fileNames;
            }
            else
            {
                FileNamesInternal = null;
            }

            if (ShowReadOnly)
            {
                Ookii.Dialogs.Wpf.Interop.IFileDialogCustomize customize = (Ookii.Dialogs.Wpf.Interop.IFileDialogCustomize)dialog;
                int selected;
                customize.GetSelectedControlItem(_openDropDownId, out selected);
                _readOnlyChecked = (selected == _readOnlyItemId);
            }

            base.GetResult(dialog);
        }
Exemplo n.º 2
0
        internal override void GetResult(IFileDialog dialog)
        {
            Ookii.Dialogs.Wpf.Interop.IFileDialogCustomize customize = (Ookii.Dialogs.Wpf.Interop.IFileDialogCustomize)dialog;
            int selected;

            customize.GetSelectedControlItem(_comboBoxId, out selected);

            SetRelativePathsProcessing(selected);

            base.GetResult(dialog);
        }