C# Class Common.RecentFileList

Inheritance: System.Windows.Controls.Separator
Afficher le fichier Open project: rsdn/nitra Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
OnMenuClick ( System.Windows.Controls.MenuItem menuItem ) : void

Private Methods

Méthode Description
GetFilepath ( System.Windows.Controls.MenuItem menuItem ) : string
GetMenuItemText ( int index, string filepath, string displaypath ) : string
LoadRecentFilesCore ( ) : List

Method Details

HookFileMenu() public méthode

public HookFileMenu ( ) : void
Résultat void

InsertFile() public méthode

public InsertFile ( string filepath ) : void
filepath string
Résultat void

InsertMenuItems() public méthode

public InsertMenuItems ( ) : void
Résultat void

LoadRecentFiles() public méthode

public LoadRecentFiles ( ) : void
Résultat void

MenuItem_Click() public méthode

public MenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

OnMenuClick() protected méthode

protected OnMenuClick ( System.Windows.Controls.MenuItem menuItem ) : void
menuItem System.Windows.Controls.MenuItem
Résultat void

RecentFileList() public méthode

public RecentFileList ( ) : Common.System
Résultat Common.System

RemoveFile() public méthode

public RemoveFile ( string filepath ) : void
filepath string
Résultat void

RemoveMenuItems() public méthode

public RemoveMenuItems ( ) : void
Résultat void

SetMenuItems() public méthode

public SetMenuItems ( ) : void
Résultat void

ShortenPathname() static public méthode

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
Résultat string

UseRegistryPersister() public méthode

public UseRegistryPersister ( ) : void
Résultat void

UseRegistryPersister() public méthode

public UseRegistryPersister ( string key ) : void
key string
Résultat void

UseXmlPersister() public méthode

public UseXmlPersister ( ) : void
Résultat void

UseXmlPersister() public méthode

public UseXmlPersister ( Stream stream ) : void
stream Stream
Résultat void

UseXmlPersister() public méthode

public UseXmlPersister ( string filepath ) : void
filepath string
Résultat void

_FileMenu_SubmenuOpened() public méthode

public _FileMenu_SubmenuOpened ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
Résultat void