Avalonia Code OnlyItaliano

API › RAVAL

RRecentFiles class

public sealed class RRecentFiles

The list of the last files, saved in the settings.

Constructors

RRecentFiles(RSettings s, string key = "recent")

The list kept under key of the settings.

Properties

int Max { get; set; }

How many files are kept (10).

List<string> Items { get; }

The files, newest first.

Methods

void Add(string path)

Puts a file at the top of the list.

void Remove(string path)

Takes a file out of the list (it was moved or deleted).

void Clear()

Empties the list.

void Fill(MenuItem menu)

Fills the menu with one item per file («1 name.prj», the full path in the tooltip), and keeps it filled when the list changes; disabled when empty.

Events

event Action<string> Opened

When a file of the menu is chosen, with its path.