C# Class Hourglass.Windows.ContextMenu

A System.Windows.Controls.ContextMenu for the TimerWindow.
Inheritance: System.Windows.Controls.ContextMenu
Datei anzeigen Open project: Dziemborowicz/Hourglass

Public Methods

Method Description
Bind ( TimerWindow window ) : void

Binds the ContextMenu to a TimerWindow.

Private Methods

Method Description
BuildMenu ( ) : void

Builds or rebuilds the context menu.

CheckableMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a checkable MenuItem is clicked.

ClearRecentInputsMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "Clear recent inputs" MenuItem is clicked.

ClearSavedTimersMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "Clear saved timers" MenuItem is clicked.

CloseMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "Close" MenuItem is clicked.

CreateSoundMenuItem ( Hourglass.Timing.Sound sound ) : void

Creates a MenuItem for a Sound.

CreateSoundMenuItemsFromList ( IList sounds ) : void

Creates a MenuItem for each Sound in the collection.

CreateThemeMenuItem ( Theme theme ) : void

Creates a MenuItem for a Theme.

CreateThemeMenuItemsFromList ( IList themes ) : void

Creates a MenuItem for each Theme in the collection.

DispatcherTimerTick ( object sender, EventArgs e ) : void

Invoked when the dispatcherTimer interval has elapsed.

GetHeaderForTheme ( Theme theme ) : object

Returns an object that can be set for the MenuItem.Header of a MenuItem that displays a Theme.

GetHeaderForTimer ( Timer timer ) : object

Returns an object that can be set for the MenuItem.Header of a MenuItem that displays a Timer.

GetIconForTimer ( Timer timer ) : object

Returns an object that can be set for the MenuItem.Icon of a MenuItem that displays a Timer.

ManageThemesMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "Manage themes" MenuItem is clicked.

NewTimerMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "New timer" MenuItem is clicked.

OpenAllSavedTimersMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when the "Open all saved timers" MenuItem is clicked.

RecentInputMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a recent TimerStart MenuItem is clicked.

SavedTimerMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a saved timer MenuItem is clicked.

ShowSavedTimer ( Timer savedTimer ) : void

Shows an existing Timer.

ShowSavedTimerInCurrentWindow ( Timer savedTimer ) : void

Shows an existing Timer in the current TimerWindow.

ShowSavedTimerInNewWindow ( Timer savedTimer ) : void

Shows an existing Timer in a new TimerWindow.

SoundMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a sound MenuItem is clicked.

ThemeMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a theme MenuItem is clicked.

ThemeTypeMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a theme type MenuItem is clicked.

UpdateMenuFromOptions ( ) : void

Reads the options from the TimerOptions and applies them to this menu.

UpdateOptionsFromMenu ( ) : void

Reads the options from this menu and applies them to the TimerOptions.

UpdateRecentInputsMenuItem ( ) : void

Updates the recentInputsMenuItem.

UpdateSavedTimersHeaders ( ) : void

Updates the MenuItem.Header of the items in the savedTimersMenuItem.

UpdateSavedTimersMenuItem ( ) : void

Updates the savedTimersMenuItem.

UpdateSoundMenuItem ( ) : void

Updates the soundMenuItem.

UpdateThemeMenuItem ( ) : void

Updates the themeMenuItem.

WindowContextMenuClosing ( object sender, System.Windows.Controls.ContextMenuEventArgs e ) : void

Invoked just before the context menu is closed.

WindowContextMenuOpening ( object sender, System.Windows.Controls.ContextMenuEventArgs e ) : void

Invoked when the context menu is opened.

WindowTitleMenuItemClick ( object sender, RoutedEventArgs e ) : void

Invoked when a window title MenuItem is clicked.

Method Details

Bind() public method

Binds the ContextMenu to a TimerWindow.
public Bind ( TimerWindow window ) : void
window TimerWindow A .
return void