C# Class Hourglass.Windows.ThemeManagerWindow

The window used to manage themes.
ファイルを表示 Open project: Dziemborowicz/Hourglass Class Usage Examples

Private Properties

Property Type Description
AddThemesToComboBox void
BindSelectedTheme void
BindState void
BindThemesComboBox void
BindTimerWindow void
CancelButtonClick void
CloneThemeForEditing Hourglass.Timing.Theme
CloseButtonClick void
ColorControlColorChanged void
DeleteButtonClick void
NameTextBoxTextChanged void
NewButtonClick void
PromptToSaveIfRequired bool
RevertChanges void
SaveButtonClick void
SaveChanges void
ThemesComboBoxSelectionChanged void
UnfocusAll bool
WindowClosing void

Public Methods

Method Description
BringToFront ( ) : bool

Brings the window to the front.

BringToFrontAndActivate ( ) : void

Brings the window to the front, activates it, and focusses it.

SetTimerWindow ( TimerWindow newTimerWindow ) : bool

Sets the TimerWindow that will be updated when a theme is selected in this window.

ThemeManagerWindow ( TimerWindow timerWindow ) : System

Initializes a new instance of the ThemeManagerWindow class.

Private Methods

Method Description
AddThemesToComboBox ( string title, IList themes ) : void

Adds the specified themes to the ThemesComboBox.

BindSelectedTheme ( ) : void

Binds the selected theme to the ThemesComboBox.

BindState ( ) : void

Binds the ThemeManagerWindowState to the controls.

BindThemesComboBox ( ) : void

Binds the themes from the ThemeManager to the ThemesComboBox.

BindTimerWindow ( ) : void

Binds the TimerWindow to the controls.

CancelButtonClick ( object sender, RoutedEventArgs e ) : void

Invoked when the CancelButton is clicked.

CloneThemeForEditing ( Theme theme ) : Theme

Clones a theme. This creates a clone of an existing Theme, but with a new identifier and a ThemeType.UserProvided type.

CloseButtonClick ( object sender, RoutedEventArgs e ) : void

Invoked when the CloseButton is clicked.

ColorControlColorChanged ( object sender, EventArgs e ) : void

Invoked when the ColorControl.Color property changes in a ColorControl.

DeleteButtonClick ( object sender, RoutedEventArgs e ) : void

Invoked when the DeleteThemeButton is clicked.

NameTextBoxTextChanged ( object sender, System.Windows.Controls.TextChangedEventArgs e ) : void

Invoked when the TextBox.Text property value changes in the NameTextBox.

NewButtonClick ( object sender, RoutedEventArgs e ) : void

Invoked when the NewThemeButton is clicked.

PromptToSaveIfRequired ( ) : bool

Prompts the user to save unsaved changes to the selected theme, if there are any.

RevertChanges ( ) : void

Reverts changes to the currently selected theme.

SaveButtonClick ( object sender, RoutedEventArgs e ) : void

Invoked when the SaveButton is clicked.

SaveChanges ( ) : void

Saves changes to the currently selected theme.

ThemesComboBoxSelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void

Invoked when the selection in the ThemesComboBox changes.

UnfocusAll ( ) : bool

Removes focus from all controls.

WindowClosing ( object sender, CancelEventArgs e ) : void

Invoked directly after Window.Close is called, and can be handled to cancel window closure.

Method Details

BringToFront() public method

Brings the window to the front.
public BringToFront ( ) : bool
return bool

BringToFrontAndActivate() public method

Brings the window to the front, activates it, and focusses it.
public BringToFrontAndActivate ( ) : void
return void

SetTimerWindow() public method

Sets the TimerWindow that will be updated when a theme is selected in this window.
public SetTimerWindow ( TimerWindow newTimerWindow ) : bool
newTimerWindow TimerWindow The to set.
return bool

ThemeManagerWindow() public method

Initializes a new instance of the ThemeManagerWindow class.
public ThemeManagerWindow ( TimerWindow timerWindow ) : System
timerWindow TimerWindow The to edit the theme for.
return System