C# Класс 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.
Наследование: IXmlSerializable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Add void
AddRange void
Clear void
IXmlSerializable System.Xml.Schema.XmlSchema
IXmlSerializable void
IXmlSerializable void
Insert void
RecentFilePropertyChanged void
RemoveAt void
RemoveRange void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AddFile() публичный Метод

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.
Результат void

Load() публичный Метод

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.
Результат void

RecentFileList() публичный Метод

Initializes a new instance of the RecentFileList class.
public RecentFileList ( ) : System.Collections.Generic
Результат System.Collections.Generic

Remove() публичный Метод

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.
Результат void