/// <summary>
        /// The method creates a ILastFocusedListViewDelegate
        /// </summary>
        /// <param name="lastFocusedListView"> The last focused ListView </param>
        /// <param name="mainWindow"> The main window of the application </param>
        /// <returns> The listView focused </returns>
        public static ILastFocusedListViewDelegate Create(LastFocusedListView lastFocusedListView, MainWindow mainWindow, DatabaseService service)
        {
            switch (lastFocusedListView)
            {
            case LastFocusedListView.Authors:
                return(new AuthorsLastFocused(mainWindow, service));

            case LastFocusedListView.Songs:
                return(new SongsLastFocused(mainWindow, service));

            default:
                break;
            }

            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Callback for focusing ListView of Songs
 /// </summary>
 /// <param name="sender">  The source of the event. </param>
 /// <param name="e"> An object that contains no event data.</param>
 private void SongsListView_GotFocus(object sender, RoutedEventArgs e)
 {
     lastFocused = LastFocusedListView.Songs;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Callback for focusing ListView of Authors
 /// </summary>
 /// <param name="sender">  The source of the event. </param>
 /// <param name="e"> An object that contains event data.</param>
 private void AuthorsListView_GotFocus(object sender, RoutedEventArgs e)
 {
     lastFocused = LastFocusedListView.Authors;
 }