C# Класс Common.RecentFileList

Наследование: System.Windows.Controls.Separator
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
HookFileMenu ( ) : void
InsertFile ( string filepath ) : void
InsertMenuItems ( ) : void
LoadRecentFiles ( ) : void
MenuItem_Click ( object sender, EventArgs e ) : void
RecentFileList ( ) : Common.System
RemoveFile ( string filepath ) : void
RemoveMenuItems ( ) : void
SetMenuItems ( ) : void
ShortenPathname ( string pathname, int maxLength ) : string

Shortens a pathname for display purposes.

Shortens a pathname by either removing consecutive components of a path and/or by removing characters from the end of the filename and replacing then with three elipses (...)

In all cases, the root of the passed path will be preserved in it's entirety.

If a UNC path is used or the pathname and maxLength are particularly short, the resulting path may be longer than maxLength.

This method expects fully resolved pathnames to be passed to it. (Use Path.GetFullPath() to obtain this.)

UseRegistryPersister ( ) : void
UseRegistryPersister ( string key ) : void
UseXmlPersister ( ) : void
UseXmlPersister ( Stream stream ) : void
UseXmlPersister ( string filepath ) : void
_FileMenu_SubmenuOpened ( object sender, RoutedEventArgs e ) : void

Защищенные методы

Метод Описание
OnMenuClick ( System.Windows.Controls.MenuItem menuItem ) : void

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

Метод Описание
GetFilepath ( System.Windows.Controls.MenuItem menuItem ) : string
GetMenuItemText ( int index, string filepath, string displaypath ) : string
LoadRecentFilesCore ( ) : List

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

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

public HookFileMenu ( ) : void
Результат void

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

public InsertFile ( string filepath ) : void
filepath string
Результат void

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

public InsertMenuItems ( ) : void
Результат void

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

public LoadRecentFiles ( ) : void
Результат void

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

public MenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

OnMenuClick() защищенный Метод

protected OnMenuClick ( System.Windows.Controls.MenuItem menuItem ) : void
menuItem System.Windows.Controls.MenuItem
Результат void

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

public RecentFileList ( ) : Common.System
Результат Common.System

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

public RemoveFile ( string filepath ) : void
filepath string
Результат void

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

public RemoveMenuItems ( ) : void
Результат void

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

public SetMenuItems ( ) : void
Результат void

ShortenPathname() статический публичный Метод

Shortens a pathname for display purposes.
Shortens a pathname by either removing consecutive components of a path and/or by removing characters from the end of the filename and replacing then with three elipses (...)

In all cases, the root of the passed path will be preserved in it's entirety.

If a UNC path is used or the pathname and maxLength are particularly short, the resulting path may be longer than maxLength.

This method expects fully resolved pathnames to be passed to it. (Use Path.GetFullPath() to obtain this.)

static public ShortenPathname ( string pathname, int maxLength ) : string
pathname string
maxLength int
Результат string

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

public UseRegistryPersister ( ) : void
Результат void

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

public UseRegistryPersister ( string key ) : void
key string
Результат void

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

public UseXmlPersister ( ) : void
Результат void

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

public UseXmlPersister ( Stream stream ) : void
stream Stream
Результат void

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

public UseXmlPersister ( string filepath ) : void
filepath string
Результат void

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

public _FileMenu_SubmenuOpened ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Результат void