ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How terminate process IEFolderMView1.SetFolderEx
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

klausdoege

Germany
389 Posts

Posted - Jan 16 2017 :  07:45:45  Show Profile  Reply
Hello,
There is one way to abort this:
IEFolderMView1.SetFolderEx('D:', iefAllImagesAndVideos, '');
I would like to terminate the process if you have chosen a too large directory with subdirectories.
And the processing takes forever?

Klaus
www.klausdoege.de

w2m

USA
1990 Posts

Posted - Jan 16 2017 :  11:16:56  Show Profile  Reply
Hi Klaus,

Maybe you can try setting IEFolderMView1.MIO.Aborting := True. TImageEnMView can abort save/load processing by assigning True to the Aborting property.

I have never tried this, so it is just a suggestion.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jan 17 2017 :  07:00:09  Show Profile  Reply
Hi Bill,
IEFolderMView1.MIO.Aborting: = True has no success.
The problem only occurs when there are a lot of directories with subdirectories.
The call: IEFolderMView1.SetFolderEx (Dir, iefAllImagesAndVideos, '');
Blocks any further input, you can not set IEFolderMView1.MIO.Aborting to false.
Do you have any idea ?

Klaus
www.klausdoege.de
Go to Top of Page

xequte

38611 Posts

Posted - Jan 19 2017 :  00:16:47  Show Profile  Reply
Hi Klaus

You should be able to set Aborting := True; in the IEFolderMView1.OnProgress event to terminate the fill.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jan 19 2017 :  09:16:01  Show Profile  Reply
Hello Nigel,
ok i have checked this, but IEFolderMView1.OnProgress is not aktiv
when only read directory names.
I have not a posibility then to terminate the Process.
Only when all subdirectories names are read, then i can terminate.
But when the subdirs are verry much, then time is to long an i would terminate
the process. But how ?
I hope you unterstand my wrong english.
Have you a example witch work correct?

Klaus
www.klausdoege.de
Go to Top of Page

klausdoege

Germany
389 Posts

Posted - Jan 19 2017 :  11:25:36  Show Profile  Reply
Hi Nigel,
the Problem make this routine, by search to a complete Drive.
Then you must wait, wait and not posibility to terminate :-(
Regards
Klaus

// Return a list of all folders in the "Folder" property and optionally their sub-folders if "IncludeSubFolders" is enabled
function TImageEnFolderMView.GetFolders(ssDest: TStrings): integer;

  procedure _AddSubFolders(Folder: string);
  var
    DirName : WideString;
    dir: TIEDirContent;
    sNewFolder: String;
  begin
    Folder := IncludeTrailingBackslash( Folder );
    dir := TIEDirContent.Create( Folder + '*.*' );
    try
      while dir.GetItem( DirName, False, True, fShowHiddenFiles ) do
      begin
        sNewFolder := IncludeTrailingBackslash( Folder + DirName );
        if (ssDest.IndexOf( sNewFolder ) = -1) then
           ssDest.Add( sNewFolder );
        _AddSubFolders( sNewFolder );
      end;
    finally
      dir.Free;
    end;
  end;


Klaus
www.klausdoege.de
Go to Top of Page

xequte

38611 Posts

Posted - Jan 19 2017 :  18:20:11  Show Profile  Reply
Hi Klaus

The next update will allow the folder fill to be aborted too in OnProgress.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: