C# Class System.Waf.Applications.RecentFileList

This class encapsulates the logic for a recent file list.
This class can be used in a Settings file to store and load the recent file list as user settings. In Visual Studio you might need to enter the full class name "System.Waf.Applications.RecentFileList" in the "Select a type" dialog.
Inheritance: IXmlSerializable
Mostra file Open project: jbe2277/waf Class Usage Examples

Private Properties

Property Type Description
Add void
AddRange void
Clear void
IXmlSerializable System.Xml.Schema.XmlSchema
IXmlSerializable void
IXmlSerializable void
Insert void
RecentFilePropertyChanged void
RemoveAt void
RemoveRange void

Public Methods

Method Description
AddFile ( string fileName ) : void

Adds a file to the recent file list. If the file already exists in the list then it only changes the position in the list.

Load ( IEnumerable recentFiles ) : void

Loads the specified collection into the recent file list. Use this method when you need to initialize the RecentFileList manually. This can be useful when you are using an own persistence implementation.

Recent file items that exist before the Load method is called are removed.

RecentFileList ( ) : System.Collections.Generic

Initializes a new instance of the RecentFileList class.

Remove ( RecentFile recentFile ) : void

Removes the specified recent file.

Private Methods

Method Description
Add ( RecentFile recentFile ) : void
AddRange ( IEnumerable recentFilesToAdd ) : void
Clear ( ) : void
IXmlSerializable ( ) : XmlSchema
IXmlSerializable ( XmlReader reader ) : void
IXmlSerializable ( XmlWriter writer ) : void
Insert ( int index, RecentFile recentFile ) : void
RecentFilePropertyChanged ( object sender, PropertyChangedEventArgs e ) : void
RemoveAt ( int index ) : void
RemoveRange ( int index, int count ) : void

Method Details

AddFile() public method

Adds a file to the recent file list. If the file already exists in the list then it only changes the position in the list.
The argument fileName must not be null or empty.
public AddFile ( string fileName ) : void
fileName string The path of the recent file.
return void

Load() public method

Loads the specified collection into the recent file list. Use this method when you need to initialize the RecentFileList manually. This can be useful when you are using an own persistence implementation.
Recent file items that exist before the Load method is called are removed.
The argument recentFiles must not be null.
public Load ( IEnumerable recentFiles ) : void
recentFiles IEnumerable The recent files.
return void

RecentFileList() public method

Initializes a new instance of the RecentFileList class.
public RecentFileList ( ) : System.Collections.Generic
return System.Collections.Generic

Remove() public method

Removes the specified recent file.
The argument recentFile must not be null. The argument recentFile was not found in the recent files list.
public Remove ( RecentFile recentFile ) : void
recentFile RecentFile The recent file to remove.
return void