FileManager is a free Delphi component that serves as a file manager for your application. Imagine a simple text editor. If the edited text is dirty (modified), prior to close or create a new text editor, it must ask user a filename in which it can save the text, or it saves without asking the filename if the text is saved before. There's also a sub menu (usually under File menu) that contains most recent files (MRU), that if user click on it, will launch the file. Of course it will ask to save current edited text prior to opening the file. This seems to be a simple task, but believe me, it can be confusing.
This component can handle all the above tasks seamlessly. It will save you lot of time, and is very easy to use. It is used extensively in all my programs, and so far so good.
This library is released under Mozilla Public License. You can use it in your freeware, shareware or commercial softwares. You can send your modification to me, and if I decide to include it in the main distribution, I will add your name as a contributor. You can read full licensing information here.
There is no special process to install it on Delphi. Just open FileManagersD7.dpk on Delphi IDE and press Install button. I use Delphi 7. If you use another Delphi version, you may have to make some minor changes.
The component will appear in priyatna.org tab.
Tells the component that a newdocument is being created. Usually you call this method in File > New event handler of the main menu.
Instructs the component to open a new file. If the currently edited file is modified, the component will ask user whether the file should be saved or not, ask a filename if necessary, and then ask a filename to be opened. Usually you call this method in File > Open event handler of the main menu.
Instructs the component to save the currently edited document. If necessary, it will ask the filename to the user. Usually you call this method in File > Save event handler of the main menu.
Instructs the component to save the currently edited document to a new file. Usually you call this method in File > Save as event handler of the main menu.
Tells the component that the application is about to close. It will ask the user whether the currently edited document should be saved or not, ask filename when necessary, etc. The user can cancel the closing. Usually you call this method in FormClose event handler of the main form. Feed the Action variable with the result of this function, so if the user cancels the closing, the form doesn't close.
Loads most recent files from an INI file. Usually you call this method in FormCreate event handler of the main form. The MRU list is maintained automatically by the component.
Saves most recent files to an INI file. Usually you call this method in FormDestroy event handler of the main form. The MRU list is maintained automatically by the component.
Loads most recent files from an a file. Usually you call this method in FormCreate event handler of the main form. The MRU list is maintained automatically by the component.
Saves most recent files to a file. Usually you call this method in FormDestroy event handler of the main form. The MRU list is maintained automatically by the component.
Shows most recent files under the specified sub menu. Usually you call this method in FormCreate event handler of the main form.
Instructs the component to open a specified file, without showing the open dialog. It is useful when you want to open a file supplied by command line.
Instructs the component to save the currently edited file to a specified file without showing the save dialog.
Is a read-only property that specifies the currently opened filename.
Specifies whether the current document is modified or not. You set this property to True to tell the component that the file is dirty, so it knows what action to do.
Specifies the maximum count of the most recent files maintained by the component.
Specifies the open dialog to use by the component. With this mechanism, you can customize the open dialog, for example, setting an appropriate Filter property.
Specifies the save dialog to use by the component. With this mechanism, you can customize the save dialog, for example, setting an appropriate Filter property.
Fired everytime the filename changes.
Fired everytime the currently edited document is modified.
Fired when the component needs to create a new document. Give a True result to tell the component that the new document is successfully created.
Fired when the component needs to open a file specified by FileName parameter. Give a True result to tell the component that the document is successfully opened.
Fired when the component needs to save a file specified by FileName parameter. Give a True result to tell the component that the document is successfully saved.
© 2007, Priyatna.org. All rights reserved.