C# Class UserInterface.Standard

Interaktionslogik für Standard.xaml
Inheritance: IObserver, IPluginHost
Mostra file Open project: mhack/gamenoise Class Usage Examples

Public Properties

Property Type Description
PlayListRef ObservableCollection
SizedWidth double

Public Methods

Method Description
APluginWindowClosed ( object sender, EventArgs e ) : void
AddFilesAndFolders ( string filePaths, bool autoPlay ) : void

Add Files And Folders to Playlist

ApplySkin ( String skinName ) : void

Apply a skin to the form

HotkeyNextHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Next Hotkey

HotkeyOverlayHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Overlay Hotkey

HotkeyPlayPauseHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Play Hotkey

HotkeyPrevHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Prev Hotkey

HotkeyStopHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Stop Hotkey

HotkeyVolDownHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Volume Down Hotkey

HotkeyVolUpHotkeyPressed ( object sender, EventArgs e ) : void

Event Handler for Volume Up Hotkey

ListViewDrop ( object sender, System e ) : void

Checks if the dragged object could be dropped at position of mouse and drops if possible.

ListViewMouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Starts the Drag if the Item under the curser is a valid Drag Item

LoadHotKeys ( ) : void

loads the HotKeys

PluginMenuItemClick ( object sender, RoutedEventArgs e ) : void
QuickSort ( int sortMode, int leftItem, int rightItem ) : void

Quicksort Playlist

ShowPlugin ( IPlugin plugin ) : void
Standard ( App appHandle, Configuration aConfiguration, PluginManager aPluginManager ) : System

Constructor for Main Window - Init Visualisation - Text Scrolling - Add Event Handlers - Apply a Skin - Initialize Tray Icon

Update ( object subject ) : void

Update Method that is called to Update the Observer Standardt when Modell has changed

getBackgroundWorker ( ) : BackgroundWorker
getBasswrapper ( ) : IBassWrapper
getDispatcher ( ) : Dispatcher
getFileSavePath ( ) : string
getPlayControler ( ) : IPlayControler
getPlaylist ( ) : IPlaylist
getPluginmanager ( ) : IPluginManager
pluginClose ( IPlugin myPlugin ) : void
pluginFeedback ( string feedback, IPlugin plugin ) : void

Private Methods

Method Description
AddFeaturedSongs ( ) : void

Add the features songs automatically to the playlist

BackgroundWorker1DoWork ( object sender, DoWorkEventArgs e ) : void

Backgourndworker which ticks the Vis

BackgroundWorker1ProgressChanged ( object sender, ProgressChangedEventArgs e ) : void

Is called when backgroundworker reports tick

ButtonEqualizerStateForTrayIcon ( object sender, EventArgs e ) : void

switch Equalizer on/off for trayicon

ChangeSeekBarMouseLeftButtonDown ( object sender, RoutedEventArgs e ) : void

Event Handler for clicking in the seekbar, Left Button Down end the event

ChangeVolumeBarMouseLeftButtonDown ( object sender, RoutedEventArgs e ) : void

Event Handler for clicking in the Volume bar, Left Button Down starts the event

ClockScrollingTextTick ( Object sender, EventArgs e ) : void

Timer for the different scrolling Texts

ClockVisTick ( ) : void

Clock for the visualization. Every tick the visualization will be drawed

ColorCurrentPlayedSong ( ) : void

Sets the Color for the currently played Song

GetCurrentIndex ( GetPositionDelegate getPosition ) : int

Returns the index of the item in the ListView on the (paramter) position

GetListViewItem ( int index ) : System.Windows.Controls.ListViewItem

Returns the listview item at index(parameter)

InitBackgroundWorker ( ) : void

Initialize the Background Worker

InitPlugins ( ) : void

Initializes the avaiable Plugins

ListViewDragOver ( object sender, System e ) : void

Handles all things to do while an item to be dragged is atteched to the mouse. Also handles Scolling

MaxFromTray ( object sender, EventArgs e ) : void

Gets the Window back from tray

MenuItemDelete_Click ( object sender, RoutedEventArgs e ) : void

Handler for MenuItems

MoveToPlayingPosition_Click ( object sender, RoutedEventArgs e ) : void

Context Menu Item: Move to Played Position Moves Songs to actual Playing Position

OverlayTimerTick ( object sender, EventArgs e ) : void
QuickSwap ( int leftItem, int rightItem ) : void

Swap an Item

RefreshHotkeys ( ) : void

Refreshes the hotkeys is something changed

ShowPlugin ( String name ) : void
TrayIcon ( ) : void

creates a tray icon and the corresponding context menu

WindowLoaded ( object sender, RoutedEventArgs e ) : void

Window Loaded sets the Playlist Reference & binds it to the listView - Set Drag&Drop event Handlers - Backgroundworker initialisation - Loading Tmp-Settings - Set Totaltime Variable

Window_Closed ( object sender, EventArgs e ) : void

shut down the Window, called from buttonCloseClick

Window_DragEnter ( object sender, System e ) : void

File Drags from Windows Explorer

Window_Drop ( object sender, System e ) : void

Drop Files from Windows Explorer to Player

Window_MouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void

Drag the Window by just click on whitespace and drag

Window_SizeChanged ( object sender, EventArgs e ) : void

Window Size Changed Event Handler

Window_StateChanged ( object sender, EventArgs e ) : void

Will be called when the window is minimized oder maximized

buttonCloseClick ( object sender, EventArgs e ) : void

calls Shutdown to close the window

buttonEqualizerState_Checked ( object sender, RoutedEventArgs e ) : void

switch Equalizer on

buttonEqualizerState_Unchecked ( object sender, RoutedEventArgs e ) : void

switch Equalizer off

buttonLoadEQClick ( object sender, EventArgs e ) : void

shows a list with all available EQ settings. can be selected by double clicking

buttonMinimizeClick ( object sender, RoutedEventArgs e ) : void

minimize the window

buttonNewPlaylistClick ( object sender, EventArgs e ) : void

creates a new playlist

buttonNextClick ( object sender, EventArgs e ) : void

calls the function NextSong of PlayControler to Play the next song

buttonOpenFileClick ( object sender, EventArgs e ) : void

Open File Dialog Button

buttonOpenFolderClick ( object sender, EventArgs e ) : void

Open Folder Dialog Button

buttonOpenPlaylistClick ( object sender, EventArgs e ) : void

opens a playlist

buttonPause_Checked ( object sender, RoutedEventArgs e ) : void
buttonPlayPauseClick ( object sender, EventArgs e ) : void

starts a song, if already running Pause and unpause if paused

buttonPluginsClick ( object sender, EventArgs e ) : void

shows the settings window

buttonPrevClick ( object sender, EventArgs e ) : void

calls the function PreviousSong of PlayControler to Play the previous song

buttonResetEQClick ( object sender, EventArgs e ) : void

resets all the Equalizer Bands to 0

buttonSaveEQClick ( object sender, EventArgs e ) : void

shows a text input box to save the name of the EQ setting

buttonSavePlaylistClick ( object sender, EventArgs e ) : void

saves a playlist

buttonSearch_Click ( object sender, RoutedEventArgs e ) : void

Click on Search Clear Button

buttonSettingsClick ( object sender, EventArgs e ) : void

shows the settings window

buttonStopClick ( object sender, EventArgs e ) : void

Calls the Stop function of the PlayControler to Stop the song

canvasVis_MouseClick ( object sender, MouseButtonEventArgs e ) : void

Switches the visualizations mode

changeBalanceSlide ( object sender, EventArgs e ) : void

slider to change the Balance

changeSeekBarSlide ( object sender, EventArgs e ) : void

Change the Seekbar Value

changeSeekBar_DragStarted ( object sender, DragStartedEventArgs e ) : void

Event Handler for Dragging the Seekbar Thumb

changeVolumeBarSlide ( object sender, EventArgs e ) : void

slider event to change the Volume

checkboxIngameShowChecked ( object sender, RoutedEventArgs e ) : void

shows overlay

checkboxIngameShowUnChecked ( object sender, RoutedEventArgs e ) : void

Hides Overlay

comboBoxSort_SelectionChanged ( object sender, SelectionChangedEventArgs e ) : void

Sort Combobox changes

labelAlbum_MouseWheel ( object sender, MouseWheelEventArgs e ) : void

Adjusts the scroll text

labelArtist_MouseWheel ( object sender, MouseWheelEventArgs e ) : void

Scrolls the text

labelTitle_MouseWheel ( object sender, MouseWheelEventArgs e ) : void

Scrolls the text

listView_KeyUp ( object sender, System e ) : void

Deletes the selected items of the listView if del is pressed

listView_MouseDoubleClick ( object sender, MouseButtonEventArgs e ) : void

Double Click Action on ListView

listView_SizeChanged ( object sender, SizeChangedEventArgs e ) : void

Fits the listview rows to the actual size

radioButtonModeNormal_Checked ( object sender, RoutedEventArgs e ) : void

Playmode Button Normal

radioButtonModeRepeatAll_Checked ( object sender, RoutedEventArgs e ) : void

Playmode Button Repeatall

radioButtonModeRepeat_Checked ( object sender, RoutedEventArgs e ) : void

Playmode Button Repeat

radioButtonModeShuffle_Checked ( object sender, RoutedEventArgs e ) : void

Playmode Button Shuffle

scrollAlbum_ScrollChanged ( object sender, ScrollChangedEventArgs e ) : void

Scrolls the text

scrollArtist_ScrollChanged ( object sender, ScrollChangedEventArgs e ) : void

Adjusts the scroll text

scrollTitle_ScrollChanged ( object sender, ScrollChangedEventArgs e ) : void

Scrolls the text

searchView_MouseDoubleClick ( object sender, MouseButtonEventArgs e ) : void

Double Click Search View (same as listview)

searchView_SizeChanged ( object sender, SizeChangedEventArgs e ) : void

Same as listView

showPl_Checked ( object sender, RoutedEventArgs e ) : void

Restore listView Window after Performence Help

showPl_Unchecked ( object sender, RoutedEventArgs e ) : void

Hide listView for more Performence

sliderEQBand_DragCompleted ( object sender, EventArgs e ) : void

Event Handler to drag and set the EQ Bands

textBoxSearch_TextChanged ( object sender, TextChangedEventArgs e ) : void

Text in Search Box Changed Event

Method Details

APluginWindowClosed() public method

public APluginWindowClosed ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

AddFilesAndFolders() public method

Add Files And Folders to Playlist
public AddFilesAndFolders ( string filePaths, bool autoPlay ) : void
filePaths string FilePaths and Files to Add
autoPlay bool
return void

ApplySkin() public method

Apply a skin to the form
public ApplySkin ( String skinName ) : void
skinName String Name of the skin
return void

HotkeyNextHotkeyPressed() public method

Event Handler for Next Hotkey
public HotkeyNextHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyOverlayHotkeyPressed() public method

Event Handler for Overlay Hotkey
public HotkeyOverlayHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyPlayPauseHotkeyPressed() public method

Event Handler for Play Hotkey
public HotkeyPlayPauseHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyPrevHotkeyPressed() public method

Event Handler for Prev Hotkey
public HotkeyPrevHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyStopHotkeyPressed() public method

Event Handler for Stop Hotkey
public HotkeyStopHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyVolDownHotkeyPressed() public method

Event Handler for Volume Down Hotkey
public HotkeyVolDownHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

HotkeyVolUpHotkeyPressed() public method

Event Handler for Volume Up Hotkey
public HotkeyVolUpHotkeyPressed ( object sender, EventArgs e ) : void
sender object not used
e System.EventArgs not used
return void

ListViewDrop() public method

Checks if the dragged object could be dropped at position of mouse and drops if possible.
public ListViewDrop ( object sender, System e ) : void
sender object not used
e System MousePos
return void

ListViewMouseLeftButtonDown() public method

Starts the Drag if the Item under the curser is a valid Drag Item
public ListViewMouseLeftButtonDown ( object sender, System.Windows.Input.MouseButtonEventArgs e ) : void
sender object not used
e System.Windows.Input.MouseButtonEventArgs MousePos
return void

LoadHotKeys() public method

loads the HotKeys
public LoadHotKeys ( ) : void
return void

PluginMenuItemClick() public method

public PluginMenuItemClick ( object sender, RoutedEventArgs e ) : void
sender object
e System.Windows.RoutedEventArgs
return void

QuickSort() public method

Quicksort Playlist
public QuickSort ( int sortMode, int leftItem, int rightItem ) : void
sortMode int
leftItem int
rightItem int
return void

ShowPlugin() public method

public ShowPlugin ( IPlugin plugin ) : void
plugin IPlugin
return void

Standard() public method

Constructor for Main Window - Init Visualisation - Text Scrolling - Add Event Handlers - Apply a Skin - Initialize Tray Icon
public Standard ( App appHandle, Configuration aConfiguration, PluginManager aPluginManager ) : System
appHandle App
aConfiguration Organisation.Configuration
aPluginManager PluginManager
return System

Update() public method

Update Method that is called to Update the Observer Standardt when Modell has changed
public Update ( object subject ) : void
subject object Changed Subject
return void

getBackgroundWorker() public method

public getBackgroundWorker ( ) : BackgroundWorker
return BackgroundWorker

getBasswrapper() public method

public getBasswrapper ( ) : IBassWrapper
return IBassWrapper

getDispatcher() public method

public getDispatcher ( ) : Dispatcher
return Dispatcher

getFileSavePath() public method

public getFileSavePath ( ) : string
return string

getPlayControler() public method

public getPlayControler ( ) : IPlayControler
return IPlayControler

getPlaylist() public method

public getPlaylist ( ) : IPlaylist
return IPlaylist

getPluginmanager() public method

public getPluginmanager ( ) : IPluginManager
return IPluginManager

pluginClose() public method

public pluginClose ( IPlugin myPlugin ) : void
myPlugin IPlugin
return void

pluginFeedback() public method

public pluginFeedback ( string feedback, IPlugin plugin ) : void
feedback string
plugin IPlugin
return void

Property Details

PlayListRef public_oe property

public ObservableCollection PlayListRef
return ObservableCollection

SizedWidth public_oe property

Window Size to start
public double SizedWidth
return double