C# Class MPTagThat.GridView.GridViewTracks

Show file Open project: MediaPortal/MPTagThat Class Usage Examples

Public Methods

Method Description
AddDatabaseSongsToGrid ( List songs ) : void
AddErrorMessage ( DataGridViewRow row, string message ) : void

Adds an Error Message to the Status Column

AutoNumber ( ) : void
CheckForChanges ( ) : void

Checks for Pending Changes

CheckSelections ( bool selectAll ) : bool

Checks, if we have something selected

ClearStatusColumn ( int rowIndex ) : void

Clears the Status column

DatabaseScan ( ) : void
DeleteTags ( TagTypes type ) : void

Remove the Tags

DeleteTracks ( ) : void

The Del key has been pressed. Send the selected files to the recycle bin

DiscardChanges ( ) : void

Discards any changes

ExecuteCommand ( string command ) : void
ExecuteCommand ( string command, object parameters, bool runAsync ) : void
ExecuteScript ( string scriptFile ) : void

Executes a script on all selected rows

FolderScan ( ) : void
GridViewTracks ( ) : System
SetBackgroundColorChanged ( int index ) : void

Sets the Color for changed Items

SetColorMP3Errors ( int index, Util error ) : void

Sets the Color for Tracks, that contain errors found by mp3val

SetGridRowColors ( int index ) : void

Sets the Grid Color based on the Line

SetMainRef ( Main main ) : void

Set Main Ref to Main Can't do it in constructir due to problems with Designer

SetProgressBar ( int maxCount ) : void

Sets the maximum value of Progressbar

UpdateMusicDatabase ( TrackData track ) : void
tracksGrid_AddToBurner ( object o, EventArgs e ) : void

Add to Burner

tracksGrid_AddToConvert ( object o, EventArgs e ) : void

Add to Converter Grid

tracksGrid_AddToPlayList ( object o, EventArgs e ) : void

Add to Playlist

tracksGrid_Copy ( object o, EventArgs e ) : void
tracksGrid_CreateFolderThumb ( object o, EventArgs e ) : void

Create a Folder Thumb out of the selected Track Picture

tracksGrid_Cut ( object o, EventArgs e ) : void
tracksGrid_Paste ( object o, EventArgs e ) : void
tracksGrid_SaveAsPlayList ( object o, EventArgs e ) : void

Save as Playlist

Private Methods

Method Description
AddTrack ( TrackData track ) : void

Adds a Track to the data grid

ApplyFileFilter ( string fileName ) : bool
ApplyTagFilter ( TrackData track ) : bool
ChangeErrorRowColor ( ) : void
CreateColumns ( ) : void

Create the Columns of the Grid based on the users setting

ExecuteCommandThread ( object sender, DoWorkEventArgs e ) : void
FormatMultipleEntry ( string str ) : string

Multiple Entry fields need to be formatted to contain a | at the end to be able to search correct

FormatSQL ( string searchString ) : string
GetFiles ( DirectoryInfo dirInfo, bool recursive ) : IEnumerable

Read a Folder and return the files

LanguageChanged ( ) : void

Language Change event has been fired. Apply the new language

LocaliseScreen ( ) : void
MakeRegexp ( string searchValue ) : string
OnMessageReceive ( QueueMessage message ) : void

Handle Messages

ProgressCancel_Executed ( object sender, CommandExecutedEventArgs e ) : void

The Progress Cancel has been fired from the Statusbar Button

ProgressCancel_Hover ( object sender, EventArgs e ) : void

We're hovering over the Progress Cancel button. If the Wait Cursor is active, change it to Default

ProgressCancel_Leave ( object sender, EventArgs e ) : void

We are leaving the Button again. If WaitCursor is active, we should set it back again

ResetProgressBar ( ) : void

Reset the Progressbar to Initiaövfalue

ResetWaitCursor ( ) : void

Resets the WaitCursor to the default

SaveSettings ( ) : void

Save the settings

SetWaitCursor ( ) : void

Sets the WaitCursor during various operations

ShowForm ( Form f ) : void
lookupTitlleOnGoogleImagesToolStripMenuItem_Click ( object sender, EventArgs e ) : void
tracksGrid_CellEndEdit ( object sender, DataGridViewCellEventArgs e ) : void

We're leaving a Cell after edit

tracksGrid_CellPainting ( object sender, DataGridViewCellPaintingEventArgs e ) : void
tracksGrid_CellValueChanged ( object sender, DataGridViewCellEventArgs e ) : void

Value of Cell has changed

tracksGrid_CellValueNeeded ( object sender, DataGridViewCellValueEventArgs e ) : void

This method is invoked, whenever the Grid decides that it needs a cell value. We get the required row from from the Songlist and retrieve the cell value using reflection

tracksGrid_CellValuePushed ( object sender, DataGridViewCellValueEventArgs e ) : void

A cell value has changed. Push it back into the Songlist

tracksGrid_ColumnHeaderMouseClick ( object sender, DataGridViewCellMouseEventArgs e ) : void

Handle Right Mouse Click to show Column Config Dialogue

tracksGrid_ColumnWidthChanged ( object sender, DataGridViewColumnEventArgs e ) : void

Handles changes in the column width

tracksGrid_CurrentCellDirtyStateChanged ( object sender, EventArgs e ) : void

Handles editing of data columns

tracksGrid_DataError ( object sender, DataGridViewDataErrorEventArgs e ) : void

Only allow valid values to be entered.

tracksGrid_Delete ( object sender, EventArgs e ) : void
tracksGrid_EditingControlShowing ( object sender, DataGridViewEditingControlShowingEventArgs e ) : void

We want to get Control, when editing a Cell, so that we can control the input

tracksGrid_MouseClick ( object sender, MouseEventArgs e ) : void

Handle Left Mouse Click for Numbering on Click Handle Right Mouse Click to open the context Menu in the Grid

tracksGrid_MouseDown ( object sender, MouseEventArgs e ) : void

Handle Drag and Drop Operation

tracksGrid_MouseEnter ( object sender, EventArgs e ) : void

Mouse is over Trackgrid

tracksGrid_MouseMove ( object sender, MouseEventArgs e ) : void

The mouse moves. Do a Drag & Drop if necessary

tracksGrid_MouseUp ( object sender, MouseEventArgs e ) : void

The Mouse has been released

tracksGrid_QueryContinueDrag ( object sender, QueryContinueDragEventArgs e ) : void

Determines, if Drag and drop should continue

tracksGrid_SelectAll ( object sender, EventArgs e ) : void
tracksGrid_Sorted ( ) : void

THe Grid has been sorted. We need to change the Background Color of the changed Rows

txtbox_KeyPress ( object sender, KeyPressEventArgs e ) : void

Allow only Digits and the slash when enetering data for Track or Disc

Method Details

AddDatabaseSongsToGrid() public method

public AddDatabaseSongsToGrid ( List songs ) : void
songs List
return void

AddErrorMessage() public method

Adds an Error Message to the Status Column
public AddErrorMessage ( DataGridViewRow row, string message ) : void
row DataGridViewRow
message string
return void

AutoNumber() public method

public AutoNumber ( ) : void
return void

CheckForChanges() public method

Checks for Pending Changes
public CheckForChanges ( ) : void
return void

CheckSelections() public method

Checks, if we have something selected
public CheckSelections ( bool selectAll ) : bool
selectAll bool
return bool

ClearStatusColumn() public method

Clears the Status column
public ClearStatusColumn ( int rowIndex ) : void
rowIndex int
return void

DatabaseScan() public method

public DatabaseScan ( ) : void
return void

DeleteTags() public method

Remove the Tags
public DeleteTags ( TagTypes type ) : void
type TagTypes
return void

DeleteTracks() public method

The Del key has been pressed. Send the selected files to the recycle bin
public DeleteTracks ( ) : void
return void

DiscardChanges() public method

Discards any changes
public DiscardChanges ( ) : void
return void

ExecuteCommand() public method

public ExecuteCommand ( string command ) : void
command string
return void

ExecuteCommand() public method

public ExecuteCommand ( string command, object parameters, bool runAsync ) : void
command string
parameters object
runAsync bool
return void

ExecuteScript() public method

Executes a script on all selected rows
public ExecuteScript ( string scriptFile ) : void
scriptFile string
return void

FolderScan() public method

public FolderScan ( ) : void
return void

GridViewTracks() public method

public GridViewTracks ( ) : System
return System

SetBackgroundColorChanged() public method

Sets the Color for changed Items
public SetBackgroundColorChanged ( int index ) : void
index int
return void

SetColorMP3Errors() public method

Sets the Color for Tracks, that contain errors found by mp3val
public SetColorMP3Errors ( int index, Util error ) : void
index int
error Util
return void

SetGridRowColors() public method

Sets the Grid Color based on the Line
public SetGridRowColors ( int index ) : void
index int
return void

SetMainRef() public method

Set Main Ref to Main Can't do it in constructir due to problems with Designer
public SetMainRef ( Main main ) : void
main Main
return void

SetProgressBar() public method

Sets the maximum value of Progressbar
public SetProgressBar ( int maxCount ) : void
maxCount int
return void

UpdateMusicDatabase() public method

public UpdateMusicDatabase ( TrackData track ) : void
track TrackData
return void

tracksGrid_AddToBurner() public method

Add to Burner
public tracksGrid_AddToBurner ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_AddToConvert() public method

Add to Converter Grid
public tracksGrid_AddToConvert ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_AddToPlayList() public method

Add to Playlist
public tracksGrid_AddToPlayList ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_Copy() public method

public tracksGrid_Copy ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_CreateFolderThumb() public method

Create a Folder Thumb out of the selected Track Picture
public tracksGrid_CreateFolderThumb ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_Cut() public method

public tracksGrid_Cut ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_Paste() public method

public tracksGrid_Paste ( object o, EventArgs e ) : void
o object
e EventArgs
return void

tracksGrid_SaveAsPlayList() public method

Save as Playlist
public tracksGrid_SaveAsPlayList ( object o, EventArgs e ) : void
o object
e EventArgs
return void