Example #1
0
        /// <summary>
        /// Called before <see cref="Microsoft.SDK.Samples.VistaBridge.Library.CommonFileDialog.OnFolderChanged"/>. This allows the implementer to stop navigation to a particular location.
        /// </summary>
        /// <param name="e">Cancelable event arguments.</param>
        protected virtual void OnFolderChanging(CommonFileDialogFolderChangeEventArgs e)
        {
            EventHandler <CommonFileDialogFolderChangeEventArgs> handler = FolderChanging;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #2
0
            public HRESULT OnFolderChanging(IFileDialog pfd, IShellItem psiFolder)
            {
                CommonFileDialogFolderChangeEventArgs args =
                    new CommonFileDialogFolderChangeEventArgs(CommonFileDialog.GetFileNameFromShellItem(psiFolder));

                if (!firstFolderChanged)
                {
                    parent.OnFolderChanging(args);
                }
                return(args.Cancel ? HRESULT.S_FALSE : HRESULT.S_OK);
            }
Example #3
0
 public HRESULT OnFolderChanging(IFileDialog pfd, IShellItem psiFolder)
 {
     CommonFileDialogFolderChangeEventArgs args =
         new CommonFileDialogFolderChangeEventArgs(parent.GetFileNameFromShellItem(psiFolder));
     if (!firstFolderChanged)
         parent.OnFolderChanging(args);
     return (args.Cancel ? HRESULT.S_FALSE : HRESULT.S_OK);
 }
Example #4
0
 protected virtual void OnFolderChanging(CommonFileDialogFolderChangeEventArgs e)
 {
     EventHandler<CommonFileDialogFolderChangeEventArgs> handler = FolderChanging;
     if (handler != null)
     {
         handler(this, e);
     }
 }